users@glassfish.java.net

Re: JPA with hibernate as Persistence provider & Glassfish

From: <glassfish_at_javadesktop.org>
Date: Mon, 26 Mar 2007 00:52:15 PST

Jan Luehe,

I am not using WebApplication...my scenario as follows

I have Session & MessageDriven beans (ejb3.0) deployed on Sunone server 9.0 and java swing client will send a message to queue and MDB will process (as it will be listening to the Queue) by delegating message to Session bean which will interact with Database through HibernatePersistacceProvider and gets results from Database then publishes to Topic in whick the client has registered to receive the message.

The sun-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
<sun-ejb-jar>
  <enterprise-beans>
    <ejb>
      <ejb-name>UfisSessionFacadeBean</ejb-name>
      <jndi-name>com.ufis.beans.UfisSessionFacadeRemote</jndi-name>
    </ejb>
    <ejb>
      <ejb-name>UfisGenericDataReadBean</ejb-name>
      <jndi-name>ejb/UfisGenericDataReadBean</jndi-name>
    </ejb>
  </enterprise-beans>
</sun-ejb-jar>

The Persistance.xml
<?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="UfisModuleVersion1PU"> -->
  <persistence-unit name="UfisModuleVersion1PU" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>NewUfis</jta-data-source>
    <class>com.ufis.persistance.Exits</class>
    <class>com.ufis.persistance.GateExitRelation</class>
    <class>com.ufis.persistance.Registrations</class>
    <class>com.ufis.xmlobjects.SecurityObjects</class>
    <properties>
      <property name="hibernate.query.jpaql_strict_compliance" value="false"/>
    </properties>
  </persistence-unit>
</persistence>

So in this sceniro where do i need to setup the classloader property as i don't use any web.xml and i use only sun-ejb-jar.xml & persistance.xml

 <sun-web-app>
    <class-loader delegate="false"/>
  </sun-web-app>

Please help me in giving kind of detailed help how to setup and all.
[Message sent by forum member 'bandip' (bandip)]

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