Alex Manly [http://community.jboss.org/people/alexmanly] created the discussion

"Re: Drools, Spring integration and JTA in container"

To view the discussion, visit: http://community.jboss.org/message/599210#599210

--------------------------------------------------------------
Hi,

I have managed to get the spring context to load by overriding the 
SingleSessionCommandService as you mentioned.  Here is my code:



   public void initTransactionManager(Environment env) {
        Object tm = env.get( EnvironmentName.TRANSACTION_MANAGER );
        if ( tm != null && tm.getClass().getName().equals( 
"org.springframework.transaction.jta.JtaTransactionManager" ) ) {
            logger.debug( "Instantiating Spring JtaTransactionManager" );
            this.txm = new 
JtaTransactionManager(((org.springframework.transaction.jta.JtaTransactionManager)tm).getUserTransaction(),
                                                  env.get( 
EnvironmentName.TRANSACTION_SYNCHRONIZATION_REGISTRY ),
                                                  
((org.springframework.transaction.jta.JtaTransactionManager)tm).getTransactionManager()
 ); 
            this.jpm = new DefaultJpaManager(this.env);
        } else {
          // continue as normal
        }




I agree.....very messy.  Thanks for your help.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/599210#599210]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to