1 Reply Latest reply on Nov 17, 2005 7:09 AM by epbernard

    .PAR files deprecated in the latest EJB3.0 specs?

    hr_stoyanov

      Hi all,
      Will .par files be supported in the final EJB3.0 spec and if not, what is the latest JBoss 4.03sp1 behavior in this regard?

      I am trying to package some EJB3.0 code (for JBoss usage) when I came across this statement at the Sun's Project GlassFish site:

      https://glassfish.dev.java.net/javaee5/persistence/entity-persistence-support.html
      --------------------------------------------------------
      Starting with build #24 GlassFish now supports the latest packaging proposal made by JSR 220 expert group. As a result of this, EJB 3.0 entity bean classes are no more packaged in a .par file. Like any other POJO classes, they can be packaged along
      with the component classes that use them. So they are allowed to be packaged in the following ways:

      1. In an ejb-jar file along with other EJB classes.
      2. In WEB-INF/classes directory along with other web application classes.
      3. In any of the jar files directly located in WEB-INF/lib directory.
      4. In any of the utility jar files in an ear file including jar files that belong to lib directory in an ear file
      5. In an application client jar file.

      Note: a rar file does not contain entity bean classes.

      Each of the above jar files or directory needs to contain a META-INF/persistence.xml. The schema which defines the structure of this XML document is available here.

      Example of a simple persistence.xml file:

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <persistence-unit name ="em1">

      <jta-data-source>jdbc/DataSource1</jta-data-source>

      </persistence-unit>