You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Anthony Fryer <ap...@hotmail.com> on 2013/01/01 01:45:43 UTC
How do i deploy a ManagedConnectionFactory in a war file?
I have a jar file that contains all the JCA implementation classes including
ResourceAdapter and ManagedConnectionFactory implementation classes. In
that jar file project, when i run my test cases with tomee, i get the
following printed out to the console that shows the classes being detected
by tomee and resources being created...
INFO - Found ConnectorModule in classpath:
d:\users\anthony\documents\dev\sabreresourceadapter\sabre-resource-adapter\sabre-ra-jca\target\test-classes
INFO - Beginning load:
d:\users\anthony\documents\dev\sabreresourceadapter\sabre-resource-adapter\sabre-ra-jca\target\test-classes
INFO - Configuring enterprise application:
D:\Users\Anthony\Documents\DEV\SabreResourceAdapter\sabre-resource-adapter\sabre-ra-jca
WARNING - Method 'lookup' is not available for 'javax.annotation.Resource'.
Probably using an older Runtime.
INFO - Configuring Service(id=Default Managed Container, type=Container,
provider-id=Default Managed Container)
INFO - Auto-creating a container for bean
com.virginaustralia.sabre.jca.MultiUserConnectionPoolTest:
Container(type=MANAGED, id=Default Managed Container)
INFO - Creating Container(id=Default Managed Container)
INFO - Using directory D:\Users\Anthony\AppData\Local\Temp for stateful
session passivation
INFO - Auto-linking resource-ref 'java:comp/env/eis/sabre/900001' in bean
com.virginaustralia.sabre.jca.MultiUserConnectionPoolTest to
Resource(id=eis/sabre/900001)
INFO - Dumping Generated ra.xml to:
D:\Users\Anthony\AppData\Local\Temp\ra-9057826138595557674sabre-ra-jca.xml
INFO - Configuring Service(id=sabre-ra-jcaRA, type=Resource,
provider-id=sabre-ra-jcaRA)
INFO - Configuring Service(id=eis/sabre/900001, type=Resource,
provider-id=eis/sabre/900001)
In my webapp, i have that jar as a dependency and have created a ra.xml file
and put it in the WEB-INF folder. When I startup tomee for the webapp i
don't see any log messages in the console that indicate the ResourceAdapter
and ManagedConnectionFactory have been found and created by tomee. How
exactly should i package this resource adapter up in my war file? Should I
be putting a .rar file in WEB-INF/lib instead of just the .jar file? Where
should i put the ra.xml file?
--
View this message in context: http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Thought to it too but then thought today rar were rar and not jar.
Btw i didnt test but connector 1.6 allows to use annotations and we scan
them so maybe you can use it directly
Le 9 janv. 2013 03:52, "Anthony Fryer" <ap...@hotmail.com> a écrit :
> Just thinking about the spec, i wonder if .rar files could be replaced with
> just a .jar file with a META-INF/ra.xml. That would make sense to me.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660185.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Anthony Fryer <ap...@hotmail.com>.
Just thinking about the spec, i wonder if .rar files could be replaced with
just a .jar file with a META-INF/ra.xml. That would make sense to me.
--
View this message in context: http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660185.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Anthony Fryer <ap...@hotmail.com>.
Just tested using a WEB-INF/ra.xml file and including the resource adapter
jar in WEB-INF/lib and I can see the resource adapter service initialized
using tomee-1.5.2-SNAPHOT. Thanks so much for that. Now just need to
update the spec to get this included :)
INFO: Assembling app:
D:\Users\Anthony\Documents\DEV\Unify\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\kiosk-checkin-webapp
09/01/2013 12:35:20 PM org.apache.openejb.assembler.classic.Assembler
createRecipe
INFO: Creating Resource(id=kiosk-checkin-webappRARA)
Constructing SabreResourceAdapter...
Starting up sabre resource adapter...
09/01/2013 12:35:20 PM org.apache.openejb.assembler.classic.Assembler
createRecipe
INFO: Creating Resource(id=eis/sabre/900001)
09/01/2013 12:35:20 PM org.apache.openejb.assembler.classic.Assembler
createResource
INFO: Creating ConnectionManager for Resource(id=eis/sabre/900001)
--
View this message in context: http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660184.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
didn't try with eclipse but worked for hazelcast resource adapter with
tomee mvn plugin: https://issues.apache.org/jira/browse/TOMEE-710
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2013/1/7 Anthony Fryer <ap...@hotmail.com>:
> I initially specified the wrong link. When i edited it, it didn't resend the
> email. The correct link is
> http://java.net/projects/javaee-spec/lists/users/archive/2012-09/message/9
>
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660118.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Anthony Fryer <ap...@hotmail.com>.
I initially specified the wrong link. When i edited it, it didn't resend the
email. The correct link is
http://java.net/projects/javaee-spec/lists/users/archive/2012-09/message/9
--
View this message in context: http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660118.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
I see "The mailing list users@javaee-spec.java.net does not have any
messages in its archive." following your link, not sure why
tw i don't see anything blocking technically to support it. If it
doesn't break tck we should be able to do it.
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2013/1/7 Anthony Fryer <ap...@hotmail.com>:
> Which spec defines the collapsed ear packaging? I'm looking
> javaee-platform-6_0-fr-spec.pdf but can't see mention of 'collapsed ear'
> anywhere.
>
> Anyhow, is only ejb lite supported in a collapsed ear? I found a
> conversation thread where David wanted to be able to deploy rars in wars.
> Would be really nice to be able to do that...
>
> http://java.net/projects/javaee-spec/lists/users/archive/2012-09/message/91
>
>
>
>
>
> --
> View this message in context: http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660116.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Anthony Fryer <ap...@hotmail.com>.
Which spec defines the collapsed ear packaging? I'm looking
javaee-platform-6_0-fr-spec.pdf but can't see mention of 'collapsed ear'
anywhere.
Anyhow, is only ejb lite supported in a collapsed ear? I found a
conversation thread where David wanted to be able to deploy rars in wars.
Would be really nice to be able to do that...
http://java.net/projects/javaee-spec/lists/users/archive/2012-09/message/91
--
View this message in context: http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660116.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
...but was changed by the spec
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2013/1/7 Jean-Louis MONTEIRO <je...@gmail.com>:
> The collapsed EAR (not fully compatible with what it really is nowadays)
> was an OpenEJB feature.
> With Java EE 6, we pushed that feature to the spec so that now it's fully
> standard.
>
> Jean-Louis
>
>
> 2013/1/6 Anthony Fryer <ap...@hotmail.com>
>
>> If the collapsed ear concept is a "tomee' specific idea and not part of the
>> spec, could I request that a resource adapter could also be deployed in a
>> war file, similarly to ejbs?
>>
>>
>>
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660105.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>
>
>
> --
> Jean-Louis
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
The collapsed EAR (not fully compatible with what it really is nowadays)
was an OpenEJB feature.
With Java EE 6, we pushed that feature to the spec so that now it's fully
standard.
Jean-Louis
2013/1/6 Anthony Fryer <ap...@hotmail.com>
> If the collapsed ear concept is a "tomee' specific idea and not part of the
> spec, could I request that a resource adapter could also be deployed in a
> war file, similarly to ejbs?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660105.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
--
Jean-Louis
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Anthony Fryer <ap...@hotmail.com>.
If the collapsed ear concept is a "tomee' specific idea and not part of the
spec, could I request that a resource adapter could also be deployed in a
war file, similarly to ejbs?
--
View this message in context: http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660105.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Currently i dont think but if you dont develop the rar you can configure it
in tomee.xml then simply dev your war in eclipse
Le 3 janv. 2013 23:40, "Anthony Fryer" <ap...@hotmail.com> a écrit :
> I have tried using an EAR file and I think it works but have come across
> other issues that i'll try to resolve with deploying a singleton in a war
> file contained in an EAR.
>
> Even if the ear option does work, i'd still much prefer to be able to
> deploy
> the resource adapter in the war file because that way i can use eclipse wtp
> to automatically deploy the war to tomee and quickly develop and debug my
> application. Is it possible to setup eclipse wtp to automatically publish
> ear files to tomee?
>
> I have no idea what the specification says about war files and resource
> adapters but it would be really nice if i could do this with tomee.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660058.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Anthony Fryer <ap...@hotmail.com>.
I have tried using an EAR file and I think it works but have come across
other issues that i'll try to resolve with deploying a singleton in a war
file contained in an EAR.
Even if the ear option does work, i'd still much prefer to be able to deploy
the resource adapter in the war file because that way i can use eclipse wtp
to automatically deploy the war to tomee and quickly develop and debug my
application. Is it possible to setup eclipse wtp to automatically publish
ear files to tomee?
I have no idea what the specification says about war files and resource
adapters but it would be really nice if i could do this with tomee.
--
View this message in context: http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993p4660058.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: How do i deploy a ManagedConnectionFactory in a war file?
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,
Did you try to put it in an ear instead of war directly?
Le 1 janv. 2013 00:46, "Anthony Fryer" <ap...@hotmail.com> a écrit :
> I have a jar file that contains all the JCA implementation classes
> including
> ResourceAdapter and ManagedConnectionFactory implementation classes. In
> that jar file project, when i run my test cases with tomee, i get the
> following printed out to the console that shows the classes being detected
> by tomee and resources being created...
>
> INFO - Found ConnectorModule in classpath:
>
> d:\users\anthony\documents\dev\sabreresourceadapter\sabre-resource-adapter\sabre-ra-jca\target\test-classes
> INFO - Beginning load:
>
> d:\users\anthony\documents\dev\sabreresourceadapter\sabre-resource-adapter\sabre-ra-jca\target\test-classes
> INFO - Configuring enterprise application:
>
> D:\Users\Anthony\Documents\DEV\SabreResourceAdapter\sabre-resource-adapter\sabre-ra-jca
> WARNING - Method 'lookup' is not available for 'javax.annotation.Resource'.
> Probably using an older Runtime.
> INFO - Configuring Service(id=Default Managed Container, type=Container,
> provider-id=Default Managed Container)
> INFO - Auto-creating a container for bean
> com.virginaustralia.sabre.jca.MultiUserConnectionPoolTest:
> Container(type=MANAGED, id=Default Managed Container)
> INFO - Creating Container(id=Default Managed Container)
> INFO - Using directory D:\Users\Anthony\AppData\Local\Temp for stateful
> session passivation
> INFO - Auto-linking resource-ref 'java:comp/env/eis/sabre/900001' in bean
> com.virginaustralia.sabre.jca.MultiUserConnectionPoolTest to
> Resource(id=eis/sabre/900001)
> INFO - Dumping Generated ra.xml to:
> D:\Users\Anthony\AppData\Local\Temp\ra-9057826138595557674sabre-ra-jca.xml
> INFO - Configuring Service(id=sabre-ra-jcaRA, type=Resource,
> provider-id=sabre-ra-jcaRA)
> INFO - Configuring Service(id=eis/sabre/900001, type=Resource,
> provider-id=eis/sabre/900001)
>
> In my webapp, i have that jar as a dependency and have created a ra.xml
> file
> and put it in the WEB-INF folder. When I startup tomee for the webapp i
> don't see any log messages in the console that indicate the ResourceAdapter
> and ManagedConnectionFactory have been found and created by tomee. How
> exactly should i package this resource adapter up in my war file? Should I
> be putting a .rar file in WEB-INF/lib instead of just the .jar file? Where
> should i put the ra.xml file?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/How-do-i-deploy-a-ManagedConnectionFactory-in-a-war-file-tp4659993.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>