Hi tomee has basically 2 kinds of resources: global and application ones. Both use the same syntax but one in tomee.xml (global) the other in WEB-INF/resources.xml (app).
Syntax is: <Resource id="name" class-name="com.foo.MyImpl"> a = 1 b= 2 c = value </Resource> It ends in openejb:Resource/name or java:openejb/Resource/name. You can also use java:global/name if you need. For JCA connectors normally once they are deployed (either from a war or in the container) then you can access them from the name you have in the logs with @Resource(name = "myconnectorRA") - this name is logged at startup. Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-11-26 12:17 GMT+01:00 rherschke <[email protected]>: > After several hours of trial-and-error and googling for any kind of at least > a little bit of documentation, I'm very disappointed of tomee! > > The main problem is configuring a resource adapter. No! Not an ActiveMQ or a > Datasource or a Topic or a Mail-Session... Just a plain JCA Resource > Adapter - either with CCI or with another ConnectionInterface... > > So please provide a working example that will explain: > > 1. how to configure AdministeredObjects in the JNDI Namespace > > In Glassfish one can use glassfish-resources.xml or the console to create > any instances of an AdministeredObject defined in a JCA RA. What is the > corresponding way in Tomee? > > For example: The RA defines an Administered Object com.my.ra.MyAdminObject > with ConfigProperties a,b and c. > > How do I add a global (for all Applications) instance of > com.my.ra.MyAdminObject with a = 1, b = 4 and c = 42 in the JNDI Namespace > at: java:global/env/MyAdminObjectOne > > How do I ad another local (only for my WAR) instance of > com.my.ra.MyAdminObject with another configuration to > java:comp/env/MyAdminObjectTwo > > --> in JEE 7 this can be done via: > > > How to do this in Tomee? > > 2. how to configure ConnectionFactory lookups in the JNDI Namespace > > In Glassfish one can use glassfish-resources.xml or the console to create a > Connection Pool and the corresponding Connection and bind it to a JNDI name. > > For example: The RA defines ManagedConnection, ManagedConnectionFactory and > a com.my.ra.MyConnectionFactory extends ConnectionFactory as well as > com.my.ra.MyConnection extends Connection and the corresponding Impls. > > How do I specify, that any WAR can lookup this MyConnectionFactory via a > @Resource? > How do I bind MyConnectionFactoryImpl of the my-ra ResourceAdapter to a JNDI > name java:comp/env/eis/my-ra/MyConnection? > How do I specify Values for Config-Properties of the > ManagedConnectionFactory? > > --> in JEE 7 there is: > > > How to do this in Tomee? > > 3. (same as 2. but with CCI Implementations instead of MyConnectionFactory > interfaces) > > Please provide an EXACT documentation of this kind of Resource-Adapter > configuration in https://tomee.apache.org/containers-and-resources.html. > > You could use http://connectorz.adam-bien.com as an example JCA RA. > > Thanks, > Robert > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Please-provide-a-working-example-for-configuring-any-kind-of-resource-adapters-in-tomee-tp4673033.html > Sent from the TomEE Users mailing list archive at Nabble.com.
