This discussion is archived
1 Reply Latest reply: Aug 25, 2011 11:54 PM by 575628 RSS

WebLogic 10.3.0, web-service-enabled session beans, and CMT transactions

575628 Newbie
Currently Being Moderated
Cross post from the Enterprise JavaBeans forum.

Does WebLogic 10.3.0 support CMT for JAX-WS Web-Service enabled EJB 3.0 session beans?

When a client invokes the following Web service:
@WebService
@Stateless
@TransactionManagement( TransactionManagementType.CONTAINER )
public class TestService        
{
    @WebMethod    
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public String echo( @WebParam( name = "param" ) final String param)
    {
        Context context = new InitialContext();
        TransactionSynchronizationRegisttry registry = 
          (TransactionSynchronizationRegistry) 
            context.lookup( "java:comp/TransactionSynchronizationRegistry" ); 
        registry.putResource("foo", "bar");
        return param;
    }
}
WebLogic throws this exception:
SEVERE: Transaction does not exist
java.lang.IllegalStateException: Transaction does not exist
     at weblogic.transaction.internal.TransactionManagerImpl.putResource(TransactionManagerImpl.java:2033)
     at weblogic.transaction.internal.TransactionManagerImpl.putResource(TransactionManagerImpl.java:2029)
Is this a bug in WL 10.3.0?

Thanks in advance.

Edited by: user572625 on Aug 18, 2011 12:29 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points