tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thabach <>
Subject Re: RAR deployment, ConnectionFactory Instantiation and JNDI.
Date Tue, 03 Nov 2009 09:56:59 GMT


I think I got a bit further, but still am confused.

OpenEJB in its Assembler::createResource() method does create both an
instance of my  ResourceAdapter and an instance of my
ManagedConnectionFactory. Both instances are bound to JNDI through (also
from Assembler::createResource()):

containerSystem.getJNDIContext().bind("openejb/Resource/" +,

Strange enough the is 'classesRA' for the ResourceAdapter and
'classes' for the ManagedConnectionFactory, respectively (see log, below).
Is this normal or am I missing something in my implementation ? 

Further, when I try to lookup either "openejb/Resource/classesRA" or
"openejb/Resource/classes", I get an NameNotFoundException. How can I get a
reference to the ManagedConnectionFactory object through the initialContext
Any help is very much appreciated, Christian.

(== log on staring up my outbound ResourceAdapter with OpenEJB ==)

Apache OpenEJB 3.1.2    build: 20091010-03:11
INFO - openejb.home = C:\Develop\_jee_local\_jee_ws\loopback-adapter
INFO - openejb.base = C:\Develop\_jee_local\_jee_ws\loopback-adapter
INFO - Configuring Service(id=Default Security Service,
type=SecurityService, provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager,
type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Using
INFO - Found ConnectorModule in classpath:
INFO - Beginning load:
INFO - Configuring enterprise application: classpath.ear
INFO - Configuring Service(id=classesRA, type=Resource,
INFO - Configuring Service(id=classes, type=Resource, provider-id=classes)
INFO - Enterprise application "classpath.ear" loaded.
INFO - Creating TransactionManager(id=Default Transaction Manager)
DEBUG - defaultTransactionTimeoutSeconds=600
DEBUG - TxRecovery=false
DEBUG - bufferSizeKb=32
DEBUG - checksumEnabled=true
DEBUG - adler32Checksum=true
DEBUG - flushSleepTimeMilliseconds=50
DEBUG - logFileDir=txlog
DEBUG - logFileExt=log
DEBUG - logFileName=howl
DEBUG - maxBlocksPerFile=-1
DEBUG - maxBuffers=0
DEBUG - maxLogFiles=2
DEBUG - minBuffers=4
DEBUG - threadsWaitingForceThreshold=-1
DEBUG - createService.success
INFO - Creating SecurityService(id=Default Security Service)
DEBUG - createService.success
INFO - Assembling app: classpath.ear
INFO - Creating Resource(id=classesRA)
DEBUG - createService.success
INFO - Creating Resource(id=classes)
DEBUG - TransactionSupport=none
DEBUG - ResourceAdapter=classesRA
INFO - Creating ConnectionManager for Resource(id=classes)
DEBUG - createService.success
INFO - Deployed Application(path=classpath.ear)

thabach wrote:
> Heya 
> I am implementing an outbound-resourceadapter. The RAR seems to deploy
> fine, but the ManagedConnectionFactory's createConnectionFactory method is
> never triggered by the container. 
> As I learned every application server has some complement to the ra.xml.
> In JBoss for example there are the *-ds.xml files as mentioned in an 
> earlier post . In such *-ds.xml files, for example the JNDI name of the
> instantiated ConnectionFactory object is given. 
> Instantiation of the ConnectionFactory object (the call to the
> ManagedConnectionFactory's createConnectionFactory method) and binding to
> JNDI registry is triggered by JBoss at *-ds.xml file processing.
> I want to accomplish the same with OpenEJB. I found an ra.xml
> complementing file 
> for Geronimo, but see no JNDI name declaration in there and don't know how
> to apply it for OpenEJB.
> How does one configure matter for OpenEJB ? How to trigger the creation of
> a ManagedConnectionFactory, the instantiation of the ConnectionFactory
> object and the binding of the latter to JNDI ?
> Any help very much appreciated, cheers, Christian. 

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message