users@glassfish.java.net

Re: Glassfish b55 persistence unit deployment problem

From: <glassfish_at_javadesktop.org>
Date: Thu, 12 Jul 2007 07:19:02 PDT

Hi Hong,

This is rather a large application that depends on quite a number of external things to run, so it is going to be a bit difficult for you to get it going if I just send it to you. To give you an idea of how the ear is packaged, there is one EJB module that contains all the data entities (SuprimaDataEntities.jar). There are two other EJB modules (SuprimaDataAccess.jar and SuprimaLiteDataAccess.jar) that each have a persistence unit defined that references the data entities jar, as shown here (persistence.xml - one has pu name of Suprima, other has pu name of SuprimaLite) :-

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="Suprima" transaction-type="JTA">
    <jta-data-source>jdbc/__Suprima</jta-data-source>
    <jar-file>SuprimaDataEntities.jar</jar-file>
    <properties>
      <property name="toplink.logging.level" value="INFO"/>
    </properties>
  </persistence-unit>
</persistence>

This has been working fine since glassfish v1 !

Please let me know if you still require the complete application.

Thanks,

Steve.
[Message sent by forum member 'suttridge_farm' (suttridge_farm)]

http://forums.java.net/jive/thread.jspa?messageID=226336