[jboss-user] [jBPM] - Re: Drools, Spring integration and JTA in container

Alex Manly do-not-reply at jboss.com
Mon Apr 11 08:34:18 EDT 2011


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]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110411/83e87e0e/attachment-0001.html 


More information about the jboss-user mailing list