views:

491

answers:

0

Hi, I am attempting to retry a container managed transaction from an EJB, in JBoss. I have tried creating a retry handler and I am currently getting the below error.

11:35:02,765 INFO  [EARDeployer] Init J2EE application: file:/E:/Jboss/jboss-4.2.2.GA/server/default/deploy/RetryTest.ear
11:35:02,984 WARN  [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=RetryTest-ejb.jar
org.jboss.xb.binding.JBossXBException: Failed to parse source: Element type "retry-handlers" must be declared. @ *unknown*[13,32]
        at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:179)
        at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:169)
        at org.jboss.ejb3.metamodel.JBossDDObjectFactory.parse(JBossDDObjectFactory.java:82)
        at org.jboss.ejb3.Ejb3HandlerFactory$DDFactory.<init>(Ejb3HandlerFactory.java:45)
        at org.jboss.ejb3.Ejb3HandlerFactory.getInstance(Ejb3HandlerFactory.java:83)
        at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:383)
        at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:327)
        at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:77)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
        at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
        at $Proxy0.create(Unknown Source)
        at org.jboss.system.ServiceController.create(ServiceController.java:330)
        at org.jboss.system.ServiceController.create(ServiceController.java:273)
        at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

Jboss.xml file

<?xml version="1.0" encoding="UTF-8"?>
<jboss>
    <container-configuration extends="Standard Stateless SessionBean">
         <container-name>Retry</container-name>
         <container-interceptors>
            <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
            <interceptor>retrytest.RetryInterceptor</interceptor>
            <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
            <!-- CMT -->
            <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT
               <retry-handlers>
                  <handler>retrytest.RetryHandler</handler>

               </retry-handlers>
            </interceptor>
            </container-interceptors>
        </container-configuration>
    <enterprise-beans>
      <session>
        <ejb-name>SimpleSessionBean</ejb-name>
        <jndi-name>RetryTest/SimpleSessionBean</jndi-name>
        <configuration-name>Retry</configuration-name>
      </session>      
    </enterprise-beans>
</jboss>

Does anyone have any ideas, I have also tried creating a Retry Interceptor, but that is Failing with a Null Pointer Exception are there any good references for retrying container managed transactions with Jboss EJB, examples etc?