You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by lazarkirchev <la...@gmail.com> on 2012/04/10 14:43:21 UTC

Specify the factory class for a DataSource

Hello,

Is it possible when deploying a DataSource resource with a resources.xml
file to specify a factory class? I am asking because according to the
documentation the Resource description in resources.xml does not have
property for factory class.

For example, when deploying a resource in Tomcat with context.xml, a factory
class can be specified. Is it possible to do something similar in OpenEJB?

Regards,
Lazar

--
View this message in context: http://openejb.979440.n4.nabble.com/Specify-the-factory-class-for-a-DataSource-tp4545473p4545473.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Specify the factory class for a DataSource

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

openejb has something closed: you can define a custom service provider
(through META-INF/service-jar.xml) and then use it in your resources.xml

here a sample service-jar.xml:
http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webapps/resources-declared-in-webapp/src/main/resources/META-INF/org.superbiz/service-jar.xml

and here a usage of this resource:
http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webapps/resources-declared-in-webapp/src/main/resources/META-INF/resources.xml

(from the sample:
http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webapps/resources-declared-in-webapp
)

- Romain


2012/4/10 lazarkirchev <la...@gmail.com>

> Hello,
>
> Is it possible when deploying a DataSource resource with a resources.xml
> file to specify a factory class? I am asking because according to the
> documentation the Resource description in resources.xml does not have
> property for factory class.
>
> For example, when deploying a resource in Tomcat with context.xml, a
> factory
> class can be specified. Is it possible to do something similar in OpenEJB?
>
> Regards,
> Lazar
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Specify-the-factory-class-for-a-DataSource-tp4545473p4545473.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>