I have been unable to determine from my searches and reading of the documentation whether it is currently possible to deploy my .rar file inside an .ear on JBoss 3.2.3. Many posts seemed to imply that it would be "available soon", but they were from about a year ago. I thought I'd give it a shot, but haven't been fully successful. Am I barking up the wrong tree?
If it's possible, hopefully I'm doing something simple wrong. Specifically, I am trying to deploy hibernate as a .rar file inside my application's .ear. When I deploy the ear with a hibernate-ds.xml file in the META-INF of the .rar, it seems to unpack the rar quite happily, but never binds it to any jndi name. Naturally the bean's lookups of "java:comp/env/hibernate/SessionFactory" fail with "javax.naming.NameNotFoundException: hibernate not bound" messages.
Below are the contents of my ra.xml, hibernate-ds.xml, and jboss-service.xml files. I've also added some output from when JBoss unpacks the rar, and finally portions of ejb-jar.xml and jboss.xml that refer to the connector. It's a lot of stuff, sorry. I figured it beats making you guys ask me for it :-)
Note that in hibernate-ds.xml, I've tried no-tx-connection-factory, local-tx-connection-factory, and xa-tx-connection-factory, all to no avail. I've also tried a few names in the ejb-jar.xml and jboss.xml, but I'm not seeing it anywhere in JndiView (except references in bean namespaces), so I figured they wouldn't work anyway.
Thanks for any advice you can offer,
Ben
[ra.xml]
<spec-version>1.0</spec-version>
<eis-type>Hibernate Sessions</eis-type>
<version>2.0</version>
<license>
<description>LGPL</description>
<license-required>false</license-required>
</license>
<resourceadapter>
<managedconnectionfactory-class>net.sf.hibernate.jca.ManagedConnectionFactoryImpl</managedconnectionfactory-class>
<connectionfactory-interface>net.sf.hibernate.SessionFactory</connectionfactory-interface>
<connectionfactory-impl-class>net.sf.hibernate.jca.JCASessionFactoryImpl</connectionfactory-impl-class>
<connection-interface>net.sf.hibernate.Session</connection-interface>
<connection-impl-class>net.sf.hibernate.jca.JCASessionImpl</connection-impl-class>
<transaction-support>XATransaction</transaction-support>
<config-property>
<config-property-name>Dialect</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>net.sf.hibernate.dialect.Oracle9Dialect</config-property-value>
</config-property>
<config-property>
<config-property-name>MapResources</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>com/threedmt/testrar/Member.hbm.xml</config-property-value>
</config-property>
<config-property>
<config-property-name>DatasourceJndi</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>jdbc/UserDataDS</config-property-value>
</config-property>
<config-property>
<config-property-name>HibernateProperties</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>UseOuterJoin=false,ShowSql=false</config-property-value>
</config-property>
1.0, 10.3.1
If no authentication mechanism is specified as part of the deployment
descriptor, the resource adapter supports no standard security
authentication mechanism as part of thesecurity contract.
<authentication-mechanism>
<description>BasicPassword</description>
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
<credential-interface>javax.resource.security.PasswordCredential</credential-interface>
</authentication-mechanism>
-->
<reauthentication-support>true</reauthentication-support>
<!--
JCA 1.0, 10.3.1 (what is that supposed to mean???)
The security permissions listed in the deployment descriptor are
different from those required by the default permission set (refer
to Section 11.2 for more details on security permissions).
<security-permission>
<description></description>
<security-permission-spec>
</security-permission-spec>
</security-permission>
-->
</resourceadapter>
</connector>
[hibernate-ds.xml]
<connection-factories>
<local-tx-connection-factory>
<jndi-name>hibernate/SessionFactory</jndi-name>
<adapter-display-name>Hibernate Resource Adapter</adapter-display-name>
</local-tx-connection-factory>
</connection-factories>[jboss-service.xml]
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE server>
<!-- Generated file - Do not edit! -->
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateSplat">
<depends>jboss.jca:service=RARDeployer</depends>
<attribute name="MapResources">com/threedmt/testrar/Member.hbm.xml</attribute>
<attribute name="JndiName">hibernate/SessionFactory</attribute>
<attribute name="Datasource">java:jdbc/UserDataDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.Oracle9Dialect</attribute>
<attribute name="UseOuterJoin">false</attribute>
<attribute name="ShowSql">false</attribute>
</mbean>
</server>
[RAR-related output from deployment of the ear]
15:00:32,486 INFO [RARMetaData] License terms present. See deployment descriptor.
15:00:32,490 INFO [RARMetaData] Loading BasicPassword
15:00:32,495 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/META-INF/hibernate-ds.xml
15:00:32,519 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/cglib2.jar
15:00:32,535 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/commons-collections-2.1.jar
15:00:32,557 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/commons-lang.jar
15:00:32,567 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/commons-logging-1.0.3.jar
15:00:32,605 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/dom4j.jar
15:00:32,612 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/ehcache-0.6.jar
15:00:32,681 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/hibernate2.jar
15:00:32,687 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/hibernated-splat-common.jar
15:00:32,712 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/jcs.jar
15:00:32,752 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/log4j.jar
15:00:32,775 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/mysql-connector-java-3.0.9-stable-bin.jar
15:00:32,780 INFO [RARDeployer] nested deployment: file:/usr/local/jboss3.2/server/bjc/tmp/deploy/tmp14268SplatEJBApp.ear-contents/hibernate.rar-contents/odmg.jar
[ejb-jar.xml portion for a bean that uses the connector]
<session >
<description><![CDATA[]]></description><ejb-name>GroupManagerBean</ejb-name>
<home>com.threedmt.testrar.ejb.session.GroupManagerBeanHome</home>
<remote>com.threedmt.testrar.ejb.session.GroupManagerBeanRemote</remote>
<local-home>com.threedmt.testrar.ejb.session.GroupManagerBeanLocalHome</local-home>
<local>com.threedmt.testrar.ejb.session.GroupManagerBeanLocal</local>
<ejb-class>com.threedmt.testrar.ejb.session.GroupManagerBeanSession</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<resource-ref >
<res-ref-name>jdbc/UserDataDS</res-ref-name>
<res-type>DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref >
<res-ref-name>hibernate/SessionFactory</res-ref-name>
<res-type>net.sf.hibernate.SessionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref></session>
[Corresponding portion of jboss.xml]
<session>
<ejb-name>GroupManagerBean</ejb-name>
<jndi-name>comp/env/ejb/GroupManagerBeanHome</jndi-name>
<local-jndi-name>comp/env/ejb/GroupManagerBeanLocalHome</local-jndi-name>
<resource-ref>
<res-ref-name>jdbc/UserDataDS</res-ref-name>
<jndi-name>jdbc/UserDataDS</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>hibernate/SessionFactory</res-ref-name>
<jndi-name>comp/env/hibernate/SessionFactory</jndi-name>
</resource-ref>
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
