Hi, currently you'll need to define it in resources.xml:
<Resource id="..." class-name="..."> attribute = value </Resource> The easier is probably to do a little wrapper to simply provide the class name (otherwise a factory attribute is available but it doesn't seem to match perfectly you case) With next release it should be fine out of the box (you can try the snapshot tomorrow normally): https://issues.apache.org/jira/browse/TOMEE-452 *Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2012/10/7 arthur choi <[email protected]> > Using TomEE+ 1.5, Eclipse Juno, CommonJ WorkManager (Impl from > http://commonj.myfoo.de/) > > 1) Created a dynamic web app. > > 2) Added two jar files (common-twm.jar, foo-common-1.1.0.jar) from CommonJ > <WebContent>/WEB-INF/lib > > 3) Added context.xml to <WebContent>/META-INF > > <Context reloadable="true"> > <Resource name="wm/FooWorkManager" auth="Container" > type="commonj.work.WorkManager" > factory="de.myfoo.commonj.work.FooWorkManagerFactory" > maxThreads="10" /> > </Context> > > 4) Use the same code from http://commonj.myfoo.de/ and run > > == > > Encountered the following deploy issue => > > > SEVERE: Unable to deploy collapsed ear in war > > StandardEngine[Catalina].StandardHost[localhost].StandardContext[/testtomee] > org.apache.openejb.OpenEJBException: No provider available for resource-ref > 'null' of type 'commonj.work.WorkManager' for 'localhost/testtomee'. > at > > org.apache.openejb.config.AutoConfig.autoCreateResource(AutoConfig.java:1770) > at > org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1763) > at > org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1714) > at > org.apache.openejb.config.AutoConfig.processJndiRefs(AutoConfig.java:728) > at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:702) > at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:195) > at > > org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:363) > at > > org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:850) > at > > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:791) > at > > org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:746) > at > > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118) > at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:722) > > ============ > > New to TomEE and OpenEJB. Looks like missing something from OpenEJB. How do > I specify the CommonJ resource provider in TomEE+? Appreciate your help. > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/Integrating-CommonJ-WorkManager-to-TomEE-tp4657843.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >
