Hi, I'm using the Scheduler service under JBoss 3.2
I implemented the "org.jboss.varia.scheduler.Schedulable" interface, and created a Mbean inside a sar to configure it.
The Schedule uses hibernate to do my job once a day. It works very well, and it's fairly easy to implement.
The problem is that now I want to control the transaction by using the hibernate's Transaction object. It uses the Jboss UserTransaction object, but I just don't know how to configure my MBean to have access to the UserTransaction Object. I'm getting this error:
Handling a Scheduler call failed
java.lang.RuntimeException: org.hibernate.TransactionException: Could not find UserTransaction in JNDI:
at schedule.TWMSchedule.perform(TWMSchedule.java:60)...
Caused by: javax.naming.NameNotFoundException: UserTransaction not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
my mbean is configured in the same sar I use with hibernate:
<mbean code="org.jboss.varia.scheduler.Scheduler"
name=":service=Scheduler">
<attribute name="StartAtStartup">true</attribute>
<attribute name="SchedulableClass">schedule.TWMSchedule</attribute>
<attribute name="InitialStartDate">22/12/2005 13:12</attribute>
<attribute name="SchedulePeriod">120000</attribute>
<attribute name="InitialRepetitions">-1</attribute>
</mbean>
Any help would be welcome.
Thanks