You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Philipp Bunge <bu...@crimson.ch> on 2009/10/21 22:47:13 UTC

Configuring Resource Adapter

Hi All

I've followed the following discussion on the users mailing list to
get the Jackrabbit JCA connector into my embedded openejb that I want
to use for some unit tests:
http://openejb.markmail.org/message/vygkhixxhj5jhssr

However, the repository never gets injected into my bean:
WARN - Injection data not found in enc:
jndiName='test.TestServiceBean/repository', target=class
test.TestServiceBean/repository

I guess this makes sense because I never actually configured the
resource adapter (I would like to specify the Jackrabbit specific
configuration file). I tried doing with in my jndi.properties as
follows:
repository = new://Resource?type=javax.jcr.Repository
repository.HomeDir = /tmp/jackrabbit
repository.ConfigFile = /tmp/jackrabbit/repository.xml

This fails however, as openejb will know nothing about the resource
adapter yet when it tries to create the resource.

Can anybody help me on how I need to configure the resource adapter?

I've attached the output of openejb if I leave out the configuration
lines in jndi.properties which I wrote above (which shows that the
resource adapter is being registered).

Thanks in advance,
Philipp

DEBUG - Using default 'openejb.nobanner=true'
Apache OpenEJB 3.1.1    build: 20090530-06:18
http://openejb.apache.org/
INFO - openejb.home = /Users/bunge/Projects/jackrabbit-jca/jcr-with-ejb
INFO - openejb.base = /Users/bunge/Projects/jackrabbit-jca/jcr-with-ejb
DEBUG - Using default
'openejb.assembler=org.apache.openejb.assembler.classic.Assembler'
DEBUG - Instantiating assembler class
org.apache.openejb.assembler.classic.Assembler
DEBUG - Using default 'openejb.jndiname.failoncollision=true'
DEBUG - Using default
'openejb.configurator=org.apache.openejb.config.ConfigurationFactory'
DEBUG - Using default 'openejb.validation.skip=false'
DEBUG - Using default 'openejb.deploymentId.format={ejbName}'
DEBUG - Using default 'openejb.debuggable-vm-hackery=false'
DEBUG - Using default 'openejb.webservices.enabled=true'
DEBUG - Using default 'openejb.vendor.config=geronimo, glassfish,
jboss, weblogic'  Possible values are: geronimo, glassfish, jboss,
weblogic
DEBUG - Using default 'openejb.provider.default=org.apache.openejb.embedded'
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)
DEBUG - Using default 'openejb.deployments.classpath=true'
DEBUG - Using default 'openejb.deployments.classpath.include='
DEBUG - Using default 'openejb.deployments.classpath.exclude=.*'
DEBUG - Using default 'openejb.deployments.classpath.require.descriptor=false'
DEBUG - Using default 'openejb.deployments.classpath.filter.descriptors=false'
DEBUG - Using default 'openejb.deployments.classpath.filter.systemapps=true'
DEBUG - Inspecting classpath for applications: 0 urls.
INFO - Found EjbModule in classpath:
/Users/bunge/Projects/jackrabbit-jca/jcr-with-ejb/target/classes
INFO - Found ConnectorModule in classpath:
/Users/bunge/.m2/repository/test/jackrabbit-test-jca/1.0-SNAPSHOT/jackrabbit-test-jca-1.0-SNAPSHOT.jar
DEBUG - URLs after filtering: 040
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/slf4j/slf4j-log4j12/1.5.3/slf4j-log4j12-1.5.3.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/maven/surefire/surefire-api/2.4.2/surefire-api-2.4.2.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/bouncycastle/bcprov-jdk14/136/bcprov-jdk14-136.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/jackrabbit/jackrabbit-spi/2.0-alpha11/jackrabbit-spi-2.0-alpha11.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.3/jcl-over-slf4j-1.5.3.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/tika/tika-core/0.4/tika-core-0.4.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/openejb/xbean-reflect/3.6-r779512/xbean-reflect-3.6-r779512.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/jackrabbit/jackrabbit-spi-commons/2.0-alpha11/jackrabbit-spi-commons-2.0-alpha11.jar!/
DEBUG - Descriptors path:
file:/Users/bunge/Projects/jackrabbit-jca/jcr-with-ejb/target/classes/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/poi/poi/3.5-beta6/poi-3.5-beta6.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/jackrabbit/jackrabbit-core/2.0-alpha11/jackrabbit-core-2.0-alpha11.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/jackrabbit/jackrabbit-jca/2.0-alpha11/jackrabbit-jca-2.0-alpha11.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/commons/commons-compress/1.0/commons-compress-1.0.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/quartz/quartz/1.5.2/quartz-1.5.2.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/tika/tika-parsers/0.4/tika-parsers-0.4.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/bouncycastle/bcmail-jdk14/136/bcmail-jdk14-136.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/jackrabbit/jackrabbit-api/2.0-alpha11/jackrabbit-api-2.0-alpha11.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/pdfbox/pdfbox/0.7.3/pdfbox-0.7.3.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/lucene/lucene-core/2.4.1/lucene-core-2.4.1.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/javax/jcr/jcr/2.0-b114/jcr-2.0-b114.jar!/
DEBUG - Descriptors path:
file:/Users/bunge/Projects/jackrabbit-jca/jcr-with-ejb/target/test-classes/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/poi/poi-ooxml/3.5-beta6/poi-ooxml-3.5-beta6.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/test/jackrabbit-test-jca/1.0-SNAPSHOT/jackrabbit-test-jca-1.0-SNAPSHOT.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/maven/surefire/surefire-booter/2.4.2/surefire-booter-2.4.2.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/jempbox/jempbox/0.2.0/jempbox-0.2.0.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/fontbox/fontbox/0.1.0/fontbox-0.1.0.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/openejb/commons-dbcp-all/1.3-r699049/commons-dbcp-all-1.3-r699049.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/poi/ooxml-schemas/1.0/ooxml-schemas-1.0.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/jackrabbit/jackrabbit-jcr-commons/2.0-alpha11/jackrabbit-jcr-commons-2.0-alpha11.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/openejb/xbean-asm-shaded/3.6-r779512/xbean-asm-shaded-3.6-r779512.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/net/sourceforge/nekohtml/nekohtml/1.9.9/nekohtml-1.9.9.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/poi/poi-scratchpad/3.5-beta6/poi-scratchpad-3.5-beta6.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/slf4j/slf4j-api/1.5.3/slf4j-api-1.5.3.jar!/
DEBUG - Descriptors path:
jar:file:/Users/bunge/.m2/repository/org/apache/openejb/xbean-finder-shaded/3.6-r779512/xbean-finder-shaded-3.6-r779512.jar!/
DEBUG - Using default 'openejb.deployments.classpath.ear=true'
INFO - Beginning load:
/Users/bunge/Projects/jackrabbit-jca/jcr-with-ejb/target/classes
DEBUG - Using default 'openejb.tempclassloader.skip=none'  Possible
values are: none, annotations, enums
DEBUG - Using default 'openejb.tempclassloader.skip=none'  Possible
values are: none, annotations, enums
INFO - Beginning load:
/Users/bunge/.m2/repository/test/jackrabbit-test-jca/1.0-SNAPSHOT/jackrabbit-test-jca-1.0-SNAPSHOT.jar
DEBUG - Using default 'openejb.tempclassloader.skip=none'  Possible
values are: none, annotations, enums
DEBUG - Using default 'openejb.tempclassloader.skip=none'  Possible
values are: none, annotations, enums
INFO - Configuring enterprise application: classpath.ear
INFO - Configuring Service(id=Default Stateless Container,
type=Container, provider-id=Default Stateless Container)
INFO - Auto-creating a container for bean TestServiceBean:
Container(type=STATELESS, id=Default Stateless Container)
DEBUG - No existing resource found while attempting to Auto-link
unmapped resource-ref 'test.TestServiceBean/repository' of type
'javax.jcr.Repository' for 'TestServiceBean'.  Looked for
Resource(id=test.TestServiceBean/repository) and
Resource(id=repository)
INFO - Auto-linking resource-ref 'test.TestServiceBean/repository' in
bean TestServiceBean to
Resource(id=jackrabbit-test-jca-1.0-SNAPSHOT.jar)
INFO - Using 'openejb.descriptors.output=true'
INFO - Using 'openejb.descriptors.output=true'
INFO - Dumping Generated ejb-jar.xml to:
/var/folders/uC/uCihKAMlFOaBZpwoObMKXk+++TI/-Tmp-/ejb-jar-6206571270106634467classes.xml
INFO - Dumping Generated openejb-jar.xml to:
/var/folders/uC/uCihKAMlFOaBZpwoObMKXk+++TI/-Tmp-/openejb-jar-8163138139187416652classes.xml
INFO - Configuring Service(id=jackrabbit-test-jca-1.0-SNAPSHOT.jarRA,
type=Resource, provider-id=jackrabbit-test-jca-1.0-SNAPSHOT.jarRA)
INFO - Configuring Service(id=jackrabbit-test-jca-1.0-SNAPSHOT.jar,
type=Resource, provider-id=jackrabbit-test-jca-1.0-SNAPSHOT.jar)
DEBUG - [TransactionSupport=xa]
DEBUG - [ResourceAdapter=jackrabbit-test-jca-1.0-SNAPSHOT.jarRA]
INFO - Using 'openejb.validation.output.level=VERBOSE'
INFO - Enterprise application "classpath.ear" loaded.
INFO - Assembling app: classpath.ear
DEBUG - Using default 'openejb.tempclassloader.skip=none'  Possible
values are: none, annotations, enums
DEBUG - Starting ResourceAdapter(id=jackrabbit-test-jca-1.0-SNAPSHOT.jarRA)
WARN - Property "ResourceAdapter" not supported by
"jackrabbit-test-jca-1.0-SNAPSHOT.jar"
DEBUG - Using default
'openejb.jndiname.strategy.class=org.apache.openejb.assembler.classic.JndiBuilder$TemplatedStrategy'
DEBUG - Using default
'openejb.jndiname.format={deploymentId}{interfaceType.annotationName}'
DEBUG - Using default 'openejb.localcopy=true'
INFO - Jndi(name=TestServiceBeanLocal) --> Ejb(deployment-id=TestServiceBean)
INFO - Created Ejb(deployment-id=TestServiceBean,
ejb-name=TestServiceBean, container=Default Stateless Container)
INFO - Deployed Application(path=classpath.ear)
DEBUG - Containers        : 1
DEBUG - Type        Container ID
DEBUG -    STATELESS   Default Stateless Container
DEBUG - Deployments       : 1
DEBUG - Type        Deployment ID
DEBUG -    STATELESS   TestServiceBean
DEBUG - SecurityService   : org.apache.openejb.core.security.SecurityServiceImpl
DEBUG - TransactionManager:
org.apache.geronimo.transaction.manager.GeronimoTransactionManager
DEBUG - OpenEJB Container System ready.
WARN - Injection data not found in enc:
jndiName='test.TestServiceBean/repository', target=class
test.TestServiceBean/repository

Re: Configuring Resource Adapter

Posted by thabach <ba...@evolootion.ch>.
Hi Tom

you should succeed in looking up the ManagedConnectionFactory in the global
JNDI tree under "java:openejb/Resource/repository" (see also this 
http://markmail.org/thread/kp4wft7lnwq4sybh thread ).

Cheers, Christian.


ttsuchi wrote:
> 
> Hello,
> 
> I am also trying to use Jackrabbit via JCA.  I've placed the Jackrabbit
> RAR in the classpath and hard-coded some config-property-value in the
> META-INF/ra.xml file.  However, it's still not getting injected to my
> EJBs.  I tried
> 
> @Resource
> Repository repository;
> 
> ... but this is null. The log says:
> 
> INFO - Configuring Service(id=repositoryRA, type=Resource,
> provider-id=repositoryRA)
> INFO - Configuring Service(id=repository, type=Resource,
> provider-id=repository)
> DEBUG - [TransactionSupport=xa]
> DEBUG - [ResourceAdapter=repositoryRA]
> DEBUG - Using default 'openejb.validation.output.level=medium'.  Possible
> values are: terse, medium, verbose
> INFO - Enterprise application "classpath.ear" loaded.
> DEBUG - Starting ResourceAdapter(id=Default JMS Resource Adapter)
> DEBUG - LocalIntialContext.close()
> INFO - Assembling app: classpath.ear
> INFO - Using 'openejb.tempclassloader.skip=annotations'
> DEBUG - Starting ResourceAdapter(id=repositoryRA)
> WARN - Property "ResourceAdapter" not supported by "repository"
> ...
> WARN - Injection data not found in enc:
> jndiName='com.mycompany.SomeBean/repository', target=class
> com.mycompany.SomeBean/repository
> 
> Somehow I don't think the resource has been mapped in the JNDI tree to
> start with...  How is the JNDI name for the inbound resource configured in
> OpenEJB? Also, is there any documentation for JCA support in OpenEJB?
> 
> Thanks,
> Tom
> 
> 
> Philipp Bunge-2 wrote:
>> 
>> Hi David!
>> 
>>> I've been hacking on this and it looks like I'll need more changes that
>>> I
>>> anticipated -- some related code that really needs to be fixed up.
>>>
>>> In the meantime you can use the <config-property-value> element directly
>>> in
>>> the ra.xml file to setup Jackrabbit.
>> 
>> Thanks for looking in to it!
>> Yes, in the meantime I managed to work around it, so it's not as sexy
>> as it could be but at least my unit tests work. :-)
>> 
>> And thanks for all your work on OpenEJB! It's something we really
>> appreciate a lot!
>> 
>> Cheers,
>> Philipp
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Configuring-Resource-Adapter-tp26000024p26535010.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Configuring Resource Adapter

Posted by Philipp Bunge <bu...@crimson.ch>.
Hi Tom

> I am also trying to use Jackrabbit via JCA.  I've placed the Jackrabbit RAR
> in the classpath and hard-coded some config-property-value in the
> META-INF/ra.xml file.  However, it's still not getting injected to my EJBs.
> I tried
>
> @Resource
> Repository repository;
>
> ... but this is null.

I had that issue as well, but the problem was actually unrelated to
any JNDI issues. I had forgotten to create the Jackrabbit repository
directory and that's why the resource adapter wasn't working. Took me
a while to figure out though, as the errors didn't show up in my logs.
I only noticed once I stepped through with a debugger.

I also set the connector ID as Christian wrote, but more out of
cosmetic reasons. It didn't actually have an effect on the deployment
in my case.

Cheers,
Philipp

Re: Configuring Resource Adapter

Posted by ttsuchi <To...@hotmail.com>.
Hello,

I am also trying to use Jackrabbit via JCA.  I've placed the Jackrabbit RAR
in the classpath and hard-coded some config-property-value in the
META-INF/ra.xml file.  However, it's still not getting injected to my EJBs. 
I tried

@Resource
Repository repository;

... but this is null. The log says:

INFO - Configuring Service(id=repositoryRA, type=Resource,
provider-id=repositoryRA)
INFO - Configuring Service(id=repository, type=Resource,
provider-id=repository)
DEBUG - [TransactionSupport=xa]
DEBUG - [ResourceAdapter=repositoryRA]
DEBUG - Using default 'openejb.validation.output.level=medium'.  Possible
values are: terse, medium, verbose
INFO - Enterprise application "classpath.ear" loaded.
DEBUG - Starting ResourceAdapter(id=Default JMS Resource Adapter)
DEBUG - LocalIntialContext.close()
INFO - Assembling app: classpath.ear
INFO - Using 'openejb.tempclassloader.skip=annotations'
DEBUG - Starting ResourceAdapter(id=repositoryRA)
WARN - Property "ResourceAdapter" not supported by "repository"
...
WARN - Injection data not found in enc:
jndiName='com.mycompany.SomeBean/repository', target=class
com.mycompany.SomeBean/repository

Somehow I don't think the resource has been mapped in the JNDI tree to start
with...  How is the JNDI name for the inbound resource configured in
OpenEJB? Also, is there any documentation for JCA support in OpenEJB?

Thanks,
Tom


Philipp Bunge-2 wrote:
> 
> Hi David!
> 
>> I've been hacking on this and it looks like I'll need more changes that I
>> anticipated -- some related code that really needs to be fixed up.
>>
>> In the meantime you can use the <config-property-value> element directly
>> in
>> the ra.xml file to setup Jackrabbit.
> 
> Thanks for looking in to it!
> Yes, in the meantime I managed to work around it, so it's not as sexy
> as it could be but at least my unit tests work. :-)
> 
> And thanks for all your work on OpenEJB! It's something we really
> appreciate a lot!
> 
> Cheers,
> Philipp
> 
> 

-- 
View this message in context: http://old.nabble.com/Configuring-Resource-Adapter-tp26000024p26521977.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Configuring Resource Adapter

Posted by Philipp Bunge <bu...@crimson.ch>.
Hi David!

> I've been hacking on this and it looks like I'll need more changes that I
> anticipated -- some related code that really needs to be fixed up.
>
> In the meantime you can use the <config-property-value> element directly in
> the ra.xml file to setup Jackrabbit.

Thanks for looking in to it!
Yes, in the meantime I managed to work around it, so it's not as sexy
as it could be but at least my unit tests work. :-)

And thanks for all your work on OpenEJB! It's something we really
appreciate a lot!

Cheers,
Philipp

Re: Configuring Resource Adapter

Posted by David Blevins <da...@visi.com>.
Hi Philipp,

I've been hacking on this and it looks like I'll need more changes  
that I anticipated -- some related code that really needs to be fixed  
up.

In the meantime you can use the <config-property-value> element  
directly in the ra.xml file to setup Jackrabbit.

This support may also be useful if you'd like to set it up differently  
for various tests:

   http://openejb.apache.org/3.0/alternate-descriptors.html

It *should* work for ra.xml files as well.

-David


On Oct 22, 2009, at 12:36 AM, Philipp Bunge wrote:

> Hi David!
>
> Thanks for taking a look! I really appreciate it!
>
> I've attached a the maven test project that I had hacked together.
>
> Thanks,
> Philipp
>
>
> On Wed, Oct 21, 2009 at 11:58 PM, David Blevins <david.blevins@visi.com 
> > wrote:
>>
>> On Oct 21, 2009, at 1:47 PM, Philipp Bunge wrote:
>>
>>> However, the repository never gets injected into my bean:
>>> WARN - Injection data not found in enc:
>>> jndiName='test.TestServiceBean/repository', target=class
>>> test.TestServiceBean/repository
>>>
>>> I guess this makes sense because I never actually configured the
>>> resource adapter (I would like to specify the Jackrabbit specific
>>> configuration file). I tried doing with in my jndi.properties as
>>> follows:
>>> repository = new://Resource?type=javax.jcr.Repository
>>> repository.HomeDir = /tmp/jackrabbit
>>> repository.ConfigFile = /tmp/jackrabbit/repository.xml
>>>
>>> This fails however, as openejb will know nothing about the resource
>>> adapter yet when it tries to create the resource.
>>
>> Though, what you tried to do makes a lot of sense and is pretty  
>> intuitive.
>>  It's pretty exciting actually as I had a good long look at the  
>> pieces
>> involved and think there's a way we can make this work.
>>
>> Going to see if I can hack up something for you.
>>
>> -David
>>
>>
> <jackrabbit-jca.tar.bz2>


Re: Configuring Resource Adapter

Posted by Philipp Bunge <bu...@crimson.ch>.
Hi David!

Thanks for taking a look! I really appreciate it!

I've attached a the maven test project that I had hacked together.

Thanks,
Philipp


On Wed, Oct 21, 2009 at 11:58 PM, David Blevins <da...@visi.com> wrote:
>
> On Oct 21, 2009, at 1:47 PM, Philipp Bunge wrote:
>
>> However, the repository never gets injected into my bean:
>> WARN - Injection data not found in enc:
>> jndiName='test.TestServiceBean/repository', target=class
>> test.TestServiceBean/repository
>>
>> I guess this makes sense because I never actually configured the
>> resource adapter (I would like to specify the Jackrabbit specific
>> configuration file). I tried doing with in my jndi.properties as
>> follows:
>> repository = new://Resource?type=javax.jcr.Repository
>> repository.HomeDir = /tmp/jackrabbit
>> repository.ConfigFile = /tmp/jackrabbit/repository.xml
>>
>> This fails however, as openejb will know nothing about the resource
>> adapter yet when it tries to create the resource.
>
> Though, what you tried to do makes a lot of sense and is pretty intuitive.
>  It's pretty exciting actually as I had a good long look at the pieces
> involved and think there's a way we can make this work.
>
> Going to see if I can hack up something for you.
>
> -David
>
>

Re: Configuring Resource Adapter

Posted by David Blevins <da...@visi.com>.
On Oct 21, 2009, at 1:47 PM, Philipp Bunge wrote:

> However, the repository never gets injected into my bean:
> WARN - Injection data not found in enc:
> jndiName='test.TestServiceBean/repository', target=class
> test.TestServiceBean/repository
>
> I guess this makes sense because I never actually configured the
> resource adapter (I would like to specify the Jackrabbit specific
> configuration file). I tried doing with in my jndi.properties as
> follows:
> repository = new://Resource?type=javax.jcr.Repository
> repository.HomeDir = /tmp/jackrabbit
> repository.ConfigFile = /tmp/jackrabbit/repository.xml
>
> This fails however, as openejb will know nothing about the resource
> adapter yet when it tries to create the resource.

Though, what you tried to do makes a lot of sense and is pretty  
intuitive.  It's pretty exciting actually as I had a good long look at  
the pieces involved and think there's a way we can make this work.

Going to see if I can hack up something for you.

-David