Hi Guys,
I am trying to convert an existing app from websphere to TomEE.
I am trying to create references in web.xml to workManager and timerManager 
resources such as

<resource-ref id="ResourceRef_wm_JMSWorkManager">
        <res-ref-name>wm/JMSWorkManager</res-ref-name>
        <res-type>commonj.work.WorkManager</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>

     <resource-ref id="ResourceRef_tm_default">
        <res-ref-name>tm/default</res-ref-name>
        <res-type>commonj.timers.TimerManager</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Unshareable</res-sharing-scope>
    </resource-ref>


I have followed the following instructions for common in tomcat:-

http://commonj.myfoo.de/install.shtml

I downloaded the distro jar files, and added them to my ${Tomee_Install}/lib 
folder.
I then added resources to my tomee.xml file for the tomee server:-

<Resource id="wm/JMSWorkManager" type="commonj.work.WorkManager"
                                  
factory-name="de.myfoo.commonj.work.FooWorkManagerFactory">
              minThreads=1
              maxThreads=10
       </Resource>
On server startup, I am seeing the following output:-
Oct 30, 2014 9:39:30 AM org.apache.openejb.OpenEJB$Instance <init>
SEVERE: OpenEJB has encountered a fatal error and cannot be started: Assembler 
failed to build the container system.
org.apache.openejb.OpenEJBException: Failed Configuring 
Service(id=wm/JMSWorkManager): Cannot determine a provider for 
Resource(id=wm/JMSWorkManager, type=commonj.work.WorkManager, provider=null).

I have not configured the resource correctly for TOMEE and I was wondering if 
you could help me with the syntax?
The example given on the websites hasn't got the newer syntax:-

http://commonj.myfoo.de/tuning.shtml .

I am also seeing newer implementations for thread/timer management in TOMEE, 
such as the following resources.
<Resource id="wm/default" 
type="javax.enterprise.concurrent.ManagedExecutorService"/>
  <Resource id="wm/default" type="ManagedExecutorService"/>
  <Resource id="wm/default" type="ManagedScheduledExecutorService"/>
  <Resource id="wm/default" 
type="javax.enterprise.concurrent.ManagedScheduledExecutorService"/>
  <Resource id="wm/default" 
type="javax.enterprise.concurrent.ManagedThreadFactory"/>

Should I try these instead, and if so, would I need to change my web.xml to 
work with these implementations? (I am guessing the answer here is yes...)

I don't see any samples on the site for these resources, although they should 
be straightforward..
Many thanks for your time and help,
Brian.






Reply via email to