Hello to all. I have this problem: I want try to manage transaction with my own transaction manager by a bean and use the following configuration file:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns:sm="http://servicemix.apache.org/config/1.0" xmlns:jms="http://servicemix.apache.org/jms/1.0" xmlns:bean="http://servicemix.apache.org/bean/1.0" xmlns:amq="http://activemq.org/config/1.0" xmlns:amqra="http://activemq.org/ra/1.0" xmlns:jencks="http://jencks.org/2.0" xmlns:esb="http://esbinaction.com/transaction"> <bean id="jndi" class="org.apache.xbean.spring.jndi.SpringInitialContextFactory" factory-method="makeInitialContext" singleton="true" /> <amq:broker id="broker"> <amq:destinationPolicy> <amq:policyMap> <amq:policyEntries> <amq:policyEntry queue=">"> <amq:deadLetterStrategy> <amq:individualDeadLetterStrategy queuePrefix="DLQ." /> </amq:deadLetterStrategy> </amq:policyEntry> </amq:policyEntries> </amq:policyMap> </amq:destinationPolicy> <amq:transportConnectors> <amq:transportConnector uri="tcp://localhost:61616" /> </amq:transportConnectors> </amq:broker> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:servicemix.properties" /> </bean> <import resource="classpath:security.xml" /> <import resource="classpath:tx.xml" /> <import resource="classpath:jndi.xml" /> <!-- the JBI container --> <sm:container id="jbi" embedded="true" depends-on="jndi,broker" autoEnlistInTransaction="true" transactionManager="#transactionManager"> <sm:flows> <sm:sedaFlow /> <sm:jcaFlow connectionManager="#connectionManager" jmsURL="tcp://localhost:61616" /> </sm:flows> <sm:endpoints> <jms:endpoint service="esb:JMSTransactionService" endpoint="jmsTransactionEndpoint" targetService="esb:TransactionService" role="consumer" defaultMep="http://www.w3.org/2004/08/wsdl/in-only" processorName="jca" connectionFactory="#connectionFactory" resourceAdapter="#resourceAdapter" bootstrapContext="#bootstrapContext" synchronous="true"> <jms:activationSpec> <amqra:activationSpec destination="servicemix.transaction.in" destinationType="javax.jms.Queue"/> </jms:activationSpec> </jms:endpoint> <bean:endpoint service="esb:TransactionService" endpoint="transactionEndpoint" bean="#transactionBean"/> </sm:endpoints> </sm:container> <!-- <bean id="transactionBean" class="esb.mysimple.transaction.TransactionComponent" /> --> <bean id="transactionBean" class="esb.mysimple.transaction.SimpleSpringSplitComponentTransaction" > <property name="responseCheckMail" ref="responseCheckMailBean"/> <property name="responseCheckCard" ref="responseCheckCreditCardBean"/> </bean> <bean id="responseCheckMailBean" class="esb.mysimple.transaction.ResponseCheckMail"> </bean> <bean id="responseCheckCreditCardBean" class="esb.mysimple.transaction.ResponseCheckCreditCard"> </bean> <!-- A managed JMS ConnectionFactory for ActiveMQ --> <amqra:managedConnectionFactory id="activemqMCF" resourceAdapter="#resourceAdapter" /> <amqra:resourceAdapter id="resourceAdapter" serverUrl="tcp://localhost:61616?jms.redeliveryPolicy.maximumRedeliveries=2&jms.asyncDispatch=true&jms.useAsyncSend=true"/> <jencks:connectionFactory id="connectionFactory" managedConnectionFactory="#activemqMCF" connectionManager="#connectionManager" /> </beans> When i launch servicemix i have the error belove: servicemix.bat: Ignoring predefined value for SERVICEMIX_HOME Starting Apache ServiceMix ESB: 3.2.1 Loading Apache ServiceMix from servicemix.xml on the CLASSPATH Exception in thread "JMX connector" org.springframework.beans.factory.NoSuchBean DefinitionException: No bean named 'broker' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory. getBeanDefinition(DefaultListableBeanFactory.java:356) at org.springframework.beans.factory.support.AbstractBeanFactory.getMerg edBeanDefinition(AbstractBeanFactory.java:916) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:243) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.AbstractAutowireCapableBean Factory.createBean(AbstractAutowireCapableBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb ject(AbstractBeanFactory.java:251) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr y.getSingleton(DefaultSingletonBeanRegistry.java:156) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:248) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:160) at org.apache.xbean.spring.jndi.SpringInitialContextFactory.getInitialCo ntext(SpringInitialContextFactory.java:83) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6 67) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288 ) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServe r.java:619) at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServ er.java:412) at org.apache.activemq.broker.jmx.ManagementContext$1.run(ManagementCont ext.java:90) INFO - JBIContainer - ServiceMix 3.2.1 JBI Container (Service Mix) is starting INFO - JBIContainer - For help or more informations please se e: http://incubator.apache.org/servicemix/ WARN - ManagementContext - Failed to start rmi registry: internal error: ObjID already in use INFO - ConnectorServerFactoryBean - JMX connector available at: service:jmx :rmi:///jndi/rmi://localhost:1099/jmxrmi INFO - ComponentMBeanImpl - Initializing component: #SubscriptionMa nager# INFO - DeploymentService - Restoring service assemblies INFO - ComponentMBeanImpl - Initializing component: servicemix-jms INFO - ComponentMBeanImpl - Initializing component: servicemix-bean INFO - JBIContainer - ServiceMix JBI Container (ServiceMix) s tarted -- View this message in context: http://old.nabble.com/problem-with-transaction-and-servicemix-standalone-tp27026882p27026882.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
