geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francisco Borges <franci...@x-hive.com>
Subject Can't connect to ConnectionFactory, need resource-ref?
Date Tue, 03 Jul 2007 09:53:18 GMT
Hello,

I'm trying to port this J2EE module to Geronimo1.2, but I'm not familiar 
with EJB's, so I might be missing something obvious. 

[...]

I managed to deploy both our resource adapter to a connection factory (as 
a RAR file), and our sample session (JAR+EJB). 

I can start running the sample, but from it I can't get a connection to 
the ConnectionFactory.

From "12.3.6 Resolving References from EJBs" at  
<http://www.chariotsolutions.com/geronimo/geronimo-1.1/ejb-structure.html> 
I gather that on Geronimo (differently from JBoss) after deploying the 
RAR, in order to be able to find it from my sample app, I need to declare 
it as a resource-ref at the sample's "openejb-jar.xml" and "ejb-jar.xml".  
Is this correct? 

If so, how should I do this? I managed to declare a resource-ref on 
openejb-jar.xml, but not on the ejb-jar.xml.

On the openejb-jar.xml, I have:

""""
      <session>
         <ejb-name>XhiveSampleSessionBean</ejb-name>
         <jndi-name>com.xhive.ejb.XhiveSampleSessionEJB</jndi-name>
         <ejb-ref>
            <ref-name>ejb/XhiveDS</ref-name>
            <ejb-link>XhiveDS</ejb-link>
         </ejb-ref>
      </session>
""""

What should I add to ejb-jar.xml?

I've tried adding something like
"""
    <session>
      <ejb-name>XhiveSampleSessionBean</ejb-name>
	[....]      
      <resource-ref>
	      <res-ref-name>ejb/XhiveDS</res-ref-name>
	     <res-type>
			com.xhive.j2ee.connector.interfaces.XhiveCCIConnectionFactoryIf
	    </res-type>
     </resource-ref>
     </session>
"""
 
But with this last change the Sample EJB won't deploy. For clarity, I'm 
attaching the 4 xml files I'm using for RAR and EJB+JAR deployment.

Any hints, or tips are heartily appreciated,

Cheers,
-- 
Francisco Borges



Mime
View raw message