tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thabach <b...@evolootion.ch>
Subject Re: RAR deployment, ConnectionFactory Instantiation and JNDI.
Date Tue, 03 Nov 2009 14:49:24 GMT

I succeeded in looking up the ManagedConnectionFactory under
"java:openejb/Resource/classes". Apologies for bothering you while having
lengthy posts in talking to myself over the mailing list :thinking: !

Cheers, Christian.



thabach wrote:
> 
> Heya 
> 
> 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/" +
> serviceInfo.id, service);
> 
> Strange enough the serviceInfo.id 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
> http://openejb.apache.org/
> 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
> 'openejb.deployments.classpath.include=.*target/classes.*|.*target/test-classes.*'
> INFO - Found ConnectorModule in classpath:
> C:\Develop\_jee_local\_jee_ws\loopback-adapter\target\classes
> INFO - Beginning load:
> C:\Develop\_jee_local\_jee_ws\loopback-adapter\target\classes
> INFO - Configuring enterprise application: classpath.ear
> INFO - Configuring Service(id=classesRA, type=Resource,
> provider-id=classesRA)
> 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 
>> http://old.nabble.com/Re%3A-Unit-testing-code-containing-DirContext-resource-injection-p24836874.html
>> 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  http://cwiki.apache.org/GMOxDOC22/geronimo-raxml.html 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: http://old.nabble.com/RAR-deployment%2C-ConnectionFactory-Instantiation-and-JNDI.-tp26157843p26160177.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message