Return-Path: Delivered-To: apmail-openejb-users-archive@www.apache.org Received: (qmail 76140 invoked from network); 3 Nov 2009 09:57:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Nov 2009 09:57:23 -0000 Received: (qmail 34251 invoked by uid 500); 3 Nov 2009 09:57:23 -0000 Delivered-To: apmail-openejb-users-archive@openejb.apache.org Received: (qmail 34216 invoked by uid 500); 3 Nov 2009 09:57:22 -0000 Mailing-List: contact users-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openejb.apache.org Delivered-To: mailing list users@openejb.apache.org Received: (qmail 34206 invoked by uid 99); 3 Nov 2009 09:57:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 09:57:22 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 09:57:19 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1N5G8J-0008Le-2z for users@openejb.apache.org; Tue, 03 Nov 2009 01:56:59 -0800 Message-ID: <26160043.post@talk.nabble.com> Date: Tue, 3 Nov 2009 01:56:59 -0800 (PST) From: thabach To: users@openejb.apache.org Subject: Re: RAR deployment, ConnectionFactory Instantiation and JNDI. In-Reply-To: <26157843.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: bach@evolootion.ch References: <26157843.post@talk.nabble.com> 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.-tp26157843p26160043.html Sent from the OpenEJB User mailing list archive at Nabble.com.