1 2 Previous Next 21 Replies Latest reply on Jul 12, 2013 11:03 AM by mbogner Go to original post
      • 15. Re: JBoss AS7 + ActiveMQ: Unable to bind QueueConnectionFactory to JNDI
        mbogner

        As there is still a lot of interest on my blog about my described solution: I updated the info to get activemq work together with jboss 7.1.1.

         

        Greetz

        • 16. Re: JBoss AS7 + ActiveMQ: Unable to bind QueueConnectionFactory to JNDI
          chienlou

          When configuration standalone-full.xml to declare external activeMQ, should we remove the hornetq declaration ?

           

                  <subsystem xmlns="urn:jboss:domain:messaging:1.1">

                      <hornetq-server>

                          <persistence-enabled>true</persistence-enabled>

                          <journal-file-size>102400</journal-file-size>

                          <journal-min-files>2</journal-min-files>

           

           

                          <connectors>

                              <netty-connector name="netty" socket-binding="messaging"/>

                              <netty-connector name="netty-throughput" socket-binding="messaging-throughput">

                                  <param key="batch-delay" value="50"/>

                              </netty-connector>

                              <in-vm-connector name="in-vm" server-id="0"/>

                          </connectors>

           

           

                          <acceptors>

                              <netty-acceptor name="netty" socket-binding="messaging"/>

                              <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">

                                  <param key="batch-delay" value="50"/>

                                  <param key="direct-deliver" value="false"/>

                              </netty-acceptor>

                              <in-vm-acceptor name="in-vm" server-id="0"/>

                          </acceptors>

           

           

                          <security-settings>

                              <security-setting match="#">

                                  <permission type="send" roles="guest"/>

                                  <permission type="consume" roles="guest"/>

                                  <permission type="createNonDurableQueue" roles="guest"/>

                                  <permission type="deleteNonDurableQueue" roles="guest"/>

                              </security-setting>

                          </security-settings>

           

           

                          <address-settings>

                              <address-setting match="#">

                                  <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                                  <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                                  <redelivery-delay>0</redelivery-delay>

                                  <max-size-bytes>10485760</max-size-bytes>

                                  <address-full-policy>BLOCK</address-full-policy>

                                  <message-counter-history-day-limit>10</message-counter-history-day-limit>

                              </address-setting>

                          </address-settings>

           

           

                          <jms-connection-factories>

                              <connection-factory name="InVmConnectionFactory">

                                  <connectors>

                                      <connector-ref connector-name="in-vm"/>

                                  </connectors>

                                  <entries>

                                      <entry name="java:/ConnectionFactory"/>

                                  </entries>

                              </connection-factory>

                              <connection-factory name="RemoteConnectionFactory">

                                  <connectors>

                                      <connector-ref connector-name="netty"/>

                                  </connectors>

                                  <entries>

                                      <entry name="RemoteConnectionFactory"/>

                                      <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                                  </entries>

                              </connection-factory>

                              <pooled-connection-factory name="hornetq-ra">

                                  <transaction mode="xa"/>

                                  <connectors>

                                      <connector-ref connector-name="in-vm"/>

                                  </connectors>

                                  <entries>

                                      <entry name="java:/JmsXA"/>

                                  </entries>

                              </pooled-connection-factory>

                          </jms-connection-factories>

           

           

                          <jms-destinations>

                              <jms-queue name="testQueue">

                                  <entry name="queue/test"/>

                                  <entry name="java:jboss/exported/jms/queue/test"/>

                              </jms-queue>

                              <jms-topic name="testTopic">

                                  <entry name="topic/test"/>

                                  <entry name="java:jboss/exported/jms/topic/test"/>

                              </jms-topic>

                          </jms-destinations>

                      </hornetq-server>

                  </subsystem>

          • 17. Re: JBoss AS7 + ActiveMQ: Unable to bind QueueConnectionFactory to JNDI
            jbertram

            There's no reason why you necessarily should remove it.  At the risk of stating the obvious, whether you remove it or not depends on whether you need it or not.

            • 18. Re: JBoss AS7 + ActiveMQ: Unable to bind QueueConnectionFactory to JNDI
              chienlou

              Yes I dont need it and I actually face a problem wether I want to want to integrate with internal or external AMQ:

              Following the setups here https://community.jboss.org/wiki/IntegrationOfJBossAS7WithActiveMQ#ActiveMQ_as_an_internal_messaging_broker

              Or the tutorial here: https://community.jboss.org/message/725419#725419

               

              I face a similar problem:

               

              PS D:\dev\runtime\jboss-as-7.1.1.Final\bin> .\standalone.bat -c standalone-full.xml

              Calling "D:\dev\runtime\jboss-as-7.1.1.Final\bin\standalone.conf.bat"

              ===============================================================================

               

               

                JBoss Bootstrap Environment

               

               

                JBOSS_HOME: D:\dev\runtime\jboss-as-7.1.1.Final

               

               

                JAVA: C:\Program Files\Java\jdk1.6.0_39\bin\java

               

               

                JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.cl

              ient.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war

              ning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.config=standalone.xml

               

               

              ===============================================================================

               

               

              15:08:39,020 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

              15:08:39,200 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

              15:08:39,245 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

              15:08:40,260 INFO  [org.xnio] XNIO Version 3.0.3.GA

              15:08:40,272 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-h

              ttp)

              15:08:40,280 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

              15:08:40,293 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

              15:08:40,346 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

              15:08:40,419 INFO  [org.jboss.as.jacorb] (ServerService Thread Pool -- 38) JBAS016300: Activating JacORB Subsystem

              15:08:40,423 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 54) JBAS013101: Activating Security Subsystem

              15:08:40,428 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 37) JBAS010280: Activating Infinis

              pan subsystem.

              15:08:40,430 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 58) JBAS015537: Activating WebServices Exten

              sion

              15:08:40,442 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 49) JBAS011940: Activating OSGi Subsystem

              15:08:40,460 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 32) JBAS016200: Activating ConfigAdmin Subsy

              stem

              15:08:40,474 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 48) JBAS011800: Activating Naming Subsystem

              15:08:40,500 INFO  [org.jboss.as.naming] (MSC service thread 1-5) JBAS011802: Starting Naming Service

              15:08:40,504 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-7) JBAS015400: Bound mail session [java:jboss/mai

              l/Default]

              15:08:40,513 INFO  [org.jboss.jaxr] (MSC service thread 1-5) JBAS014000: Started JAXR subsystem, binding JAXR connection

              factory into JNDI as: java:jboss/jaxr/ConnectionFactory

              15:08:40,565 INFO  [org.jboss.as.security] (MSC service thread 1-7) JBAS013100: Current PicketBox version=4.0.7.Final

              15:08:40,657 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) JBAS010403: Deployi

              ng JDBC-compliant driver class org.h2.Driver (version 1.3)

              15:08:40,659 INFO  [org.jboss.as.connector] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (JBoss IronJacam

              ar 1.0.9.Final)

              15:08:40,891 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-5) JBoss Web Services - S

              tack CXF Server 4.0.2.GA

              15:08:41,283 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) JBAS015012: Started FileSystemDeplo

              ymentService for directory D:\dev\runtime\jboss-as-7.1.1.Final\standalone\deployments

              15:08:41,292 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting fa

              iled deployment activemq-rar.rar

              15:08:41,299 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting fa

              iled deployment MDB.jar

              15:08:41,601 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:4447

              15:08:41,607 INFO  [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100: Listening on /127.0.0.1:9999

              15:08:41,616 WARN  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011600: AIO wasn't located on this platform, it

              will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal

              15:08:41,625 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-7) Starting Coyote HTTP/1.1 on http-1

              27.0.0.1-127.0.0.1-8080

              15:08:41,697 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) live server is starting wit

              h configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=D:\dev\runtime\jbo

              ss-as-7.1.1.Final\standalone\data\messagingjournal,bindingsDirectory=D:\dev\runtime\jboss-as-7.1.1.Final\standalone\data

              \messagingbindings,largeMessagesDirectory=D:\dev\runtime\jboss-as-7.1.1.Final\standalone\data\messaginglargemessages,pag

              ingDirectory=D:\dev\runtime\jboss-as-7.1.1.Final\standalone\data\messagingpaging)

              15:08:41,717 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) Waiting to obtain live lock

               

               

              15:08:41,757 INFO  [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-2) Using NIO

              Journal

              15:08:41,832 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data sourc

              e [java:jboss/datasources/ExampleDS]

              15:08:41,833 INFO  [org.hornetq.core.server.impl.FileLockNodeManager] (MSC service thread 1-2) Waiting to obtain live lo

              ck

              15:08:41,838 INFO  [org.hornetq.core.server.impl.FileLockNodeManager] (MSC service thread 1-2) Live Server Obtained live

              lock

              15:08:41,905 WARN  [jacorb.codeset] (MSC service thread 1-3) Warning - unknown codeset (Cp1252) - defaulting to ISO-8859

              -1

              15:08:41,937 INFO  [org.jboss.as.jacorb] (MSC service thread 1-3) JBAS016330: CORBA ORB Service started

              15:08:42,024 INFO  [org.jboss.as.jacorb] (MSC service thread 1-7) JBAS016328: CORBA Naming Service started

              15:08:42,641 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-2) Started Netty Acceptor

              version 3.2.5.Final-a96d88c 127.0.0.1:5445 for CORE protocol

              15:08:42,649 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-2) Started Netty Acceptor

              version 3.2.5.Final-a96d88c 127.0.0.1:5455 for CORE protocol

              15:08:42,652 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) Server is now live

              15:08:42,654 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) HornetQ Server version 2.2.

              13.Final (HQ_2_2_13_FINAL_AS7, 122) [5435c532-d531-11e2-afd0-9cebe809a9e9]) started

              15:08:42,661 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) trying to deploy queue jms.

              topic.testTopic

              15:08:42,685 INFO  [org.jboss.as.messaging] (MSC service thread 1-3) JBAS011601: Bound messaging object to jndi name jav

              a:/topic/test

              15:08:42,687 INFO  [org.jboss.as.messaging] (MSC service thread 1-3) JBAS011601: Bound messaging object to jndi name jav

              a:jboss/exported/jms/topic/test

              15:08:42,709 INFO  [org.jboss.as.messaging] (MSC service thread 1-5) JBAS011601: Bound messaging object to jndi name jav

              a:/ConnectionFactory

              15:08:42,712 INFO  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011601: Bound messaging object to jndi name jav

              a:jboss/exported/jms/RemoteConnectionFactory

              15:08:42,718 INFO  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011601: Bound messaging object to jndi name jav

              a:/RemoteConnectionFactory

              15:08:42,724 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-8) trying to deploy queue jms.

              queue.testQueue

              15:08:42,735 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-1) JBAS010406: Registered connection factor

              y java:/JmsXA

              15:08:42,738 INFO  [org.jboss.as.messaging] (MSC service thread 1-8) JBAS011601: Bound messaging object to jndi name jav

              a:/queue/test

              15:08:42,743 INFO  [org.jboss.as.messaging] (MSC service thread 1-8) JBAS011601: Bound messaging object to jndi name jav

              a:jboss/exported/jms/queue/test

              15:08:42,753 INFO  [org.hornetq.ra.HornetQResourceAdapter] (MSC service thread 1-1) HornetQ resource adaptor started

              15:08:42,754 INFO  [org.jboss.as.connector.services.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC servi

              ce thread 1-1) IJ020002: Deployed: file://RaActivatorhornetq-ra

              15:08:42,760 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-7) JBAS010401: Bound JCA ConnectionFactory

              [java:/JmsXA]

              15:08:42,789 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990

              15:08:42,790 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 3996ms

              - Started 175 of 257 services (78 services are passive or on-demand)

              15:08:42,804 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "activem

              q-rar.rar"

              15:08:42,804 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "MDB.jar

              "

              15:08:43,795 INFO  [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-7) IJ020001: Required license ter

              ms for file:/D:/dev/runtime/jboss-as-7.1.1.Final/standalone/tmp/vfs/temp5e33b4f006fcb317/activemq-rar.rar-f8b6aa56d1d2eb

              23/contents/

              15:08:43,832 INFO  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-7) IJ020001: Required license

              terms for file:/D:/dev/runtime/jboss-as-7.1.1.Final/standalone/tmp/vfs/temp5e33b4f006fcb317/activemq-rar.rar-f8b6aa56d1d

              2eb23/contents/

              15:08:43,924 INFO  [org.apache.activemq.xbean.XBeanBrokerFactory$1] (Starting ActiveMQ Broker) Refreshing org.apache.act

              ivemq.xbean.XBeanBrokerFactory$1@13110f31: startup date [Tue Jun 25 15:08:43 EDT 2013]; root of context hierarchy

              15:08:43,994 INFO  [org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader] (Starting ActiveMQ Broker) Loading

              XML bean definitions from class path resource [broker-config.xml]

              15:08:44,609 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (Starting ActiveMQ Broker) Pre

              -instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@669b824: defining bean

              s [org.apache.activemq.xbean.XBeanBrokerService#0]; root of factory hierarchy

              15:08:44,834 INFO  [org.apache.activemq.store.kahadb.plist.PListStoreImpl] (Starting ActiveMQ Broker) PListStore:[D:\dev

              \runtime\jboss-as-7.1.1.Final\bin\activemq-data\localhost\tmp_storage] started

              15:08:44,866 INFO  [org.apache.activemq.broker.BrokerService] (Starting ActiveMQ Broker) Using Persistence Adapter: Kaha

              DBPersistenceAdapter[D:\dev\runtime\jboss-as-7.1.1.Final\bin\standalone\data\activemq]

              15:08:45,333 INFO  [org.apache.activemq.store.kahadb.MessageDatabase] (Starting ActiveMQ Broker) KahaDB is version 4

              15:08:45,349 INFO  [org.apache.activemq.store.kahadb.MessageDatabase] (Starting ActiveMQ Broker) Recovering from the jou

              rnal ...

              15:08:45,351 INFO  [org.apache.activemq.store.kahadb.MessageDatabase] (Starting ActiveMQ Broker) Recovery replayed 1 ope

              rations from the journal in 0.014 seconds.

              15:08:45,507 INFO  [org.apache.activemq.broker.BrokerService] (Starting ActiveMQ Broker) Apache ActiveMQ 5.8.0 (localhos

              t, ID:mcorniquet-pc-55722-1372187325386-0:1) is starting

              15:08:45,526 INFO  [org.apache.activemq.transport.TransportServerThreadSupport] (Starting ActiveMQ Broker) Listening for

              connections at: tcp://127.0.0.1:61616

              15:08:45,529 INFO  [org.apache.activemq.broker.TransportConnector] (Starting ActiveMQ Broker) Connector tcp://localhost:

              61616 Started

              15:08:45,537 INFO  [org.apache.activemq.broker.BrokerService] (Starting ActiveMQ Broker) Apache ActiveMQ 5.8.0 (localhos

              t, ID:mcorniquet-pc-55722-1372187325386-0:1) started

              15:08:45,540 INFO  [org.apache.activemq.broker.BrokerService] (Starting ActiveMQ Broker) For help or more information pl

              ease see: http://activemq.apache.org

              15:08:45,553 WARN  [org.apache.activemq.broker.BrokerService] (Starting ActiveMQ Broker) Store limit is 102400 mb, whils

              t the data directory: D:\dev\runtime\jboss-as-7.1.1.Final\bin\standalone\data\activemq only has 7312 mb of usable space

              15:08:45,556 ERROR [org.apache.activemq.broker.BrokerService] (Starting ActiveMQ Broker) Temporary Store limit is 51200

              mb, whilst the temporary data directory: D:\dev\runtime\jboss-as-7.1.1.Final\bin\activemq-data\localhost\tmp_storage onl

              y has 7312 mb of usable space

              15:08:45,597 INFO  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-7) IJ020002: Deployed: file:/D

              :/dev/runtime/jboss-as-7.1.1.Final/standalone/tmp/vfs/temp5e33b4f006fcb317/activemq-rar.rar-f8b6aa56d1d2eb23/contents/

              15:08:45,807 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "MDB.jar" was

              rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.uni

              t.\"MDB.jar\".component.SimpleMDB.CREATEjboss.ra.\"activemq-rar-5.6-SNAPSHOT\"Missing[jboss.deployment.unit.\"MDB.jar\".

              component.SimpleMDB.CREATEjboss.ra.\"activemq-rar-5.6-SNAPSHOT\"]"]}

              15:08:45,822 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "activemq-rar.

              rar" was rolled back with no failure message

              15:08:45,840 INFO  [org.apache.activemq.broker.BrokerService] (MSC service thread 1-2) Apache ActiveMQ 5.8.0 (localhost,

              ID:mcorniquet-pc-55722-1372187325386-0:1) is shutting down

              15:08:45,856 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment MDB.jar in 4

              8ms

              15:08:47,532 INFO  [org.apache.activemq.broker.TransportConnector] (MSC service thread 1-2) Connector tcp://localhost:61

              616 Stopped

              15:08:47,538 INFO  [org.apache.activemq.store.kahadb.plist.PListStoreImpl] (MSC service thread 1-2) PListStore:[D:\dev\r

              untime\jboss-as-7.1.1.Final\bin\activemq-data\localhost\tmp_storage] stopped

              15:08:47,540 INFO  [org.apache.activemq.store.kahadb.KahaDBStore] (MSC service thread 1-2) Stopping async queue tasks

              15:08:47,543 INFO  [org.apache.activemq.store.kahadb.KahaDBStore] (MSC service thread 1-2) Stopping async topic tasks

              15:08:47,547 INFO  [org.apache.activemq.store.kahadb.KahaDBStore] (MSC service thread 1-2) Stopped KahaDB

              15:08:47,845 INFO  [org.apache.activemq.broker.BrokerService] (MSC service thread 1-2) Apache ActiveMQ 5.8.0 (localhost,

              ID:mcorniquet-pc-55722-1372187325386-0:1) uptime 3.002 seconds

              15:08:47,846 INFO  [org.apache.activemq.broker.BrokerService] (MSC service thread 1-2) Apache ActiveMQ 5.8.0 (localhost,

              ID:mcorniquet-pc-55722-1372187325386-0:1) is shutdown

              15:08:47,901 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment activemq-rar

              .rar in 2080ms

              15:08:47,904 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

              JBAS014775:    New missing/unsatisfied dependencies:

                    service jboss.ra."activemq-rar-5.6-SNAPSHOT" (missing) dependents: [service jboss.deployment.unit."MDB.jar".compon

              ent.SimpleMDB.CREATE]

               

               

              15:08:47,919 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS014654: Composite operat

              ion was rolled back

              15:08:47,925 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite oper

              ation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unav

              ailable dependencies" => ["jboss.deployment.unit.\"MDB.jar\".component.SimpleMDB.CREATEjboss.ra.\"activemq-rar-5.6-SNAPS

              HOT\"Missing[jboss.deployment.unit.\"MDB.jar\".component.SimpleMDB.CREATEjboss.ra.\"activemq-rar-5.6-SNAPSHOT\"]"]}}}

               

               

              Any help would be appreciated, thanks

              • 19. Re: JBoss AS7 + ActiveMQ: Unable to bind QueueConnectionFactory to JNDI
                jbertram

                The first thing I recommend you do is to start your own thread instead of hijacking this one.

                • 20. Re: JBoss AS7 + ActiveMQ: Unable to bind QueueConnectionFactory to JNDI
                  chienlou

                  OK I came out with a dirty solution. Instead of declaring the AMQ as XA <transaction-support>XATransaction</transaction-support> ( like stated here https://community.jboss.org/wiki/IntegrationOfJBossAS7WithActiveMQ#ActiveMQ_as_an_internal_messaging_broker )

                  and having my MDB injected with

                     @Resource(mappedName = "java:/activemq/ConnectionFactory")    private ConnectionFactory connectionFactory;    @Resource(mappedName = "java:/activemq/queue_out") // Note the mapped name of the queue 

                  Since it failed at the init phase of startup, I replace with LocationTransaction <transaction-support>LocationTransaction </transaction-support> for the adaptor.

                  And my MDB doesnt have connectionFactory nor session establisment etc. Just the reading queue declared in annotation and implementation of onMessage(javax.jms.Message message)

                   

                   

                  @MessageDriven(name = "MDB", activationConfig = {
                                      @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
                                      @ActivationConfigProperty(propertyName = "destination", propertyValue = "twc_sony_q"),
                                      @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })
                  @ResourceAdapter("activemq-rar.rar")
                  public class QueueConsumer implements MessageListener {
                  
                  
                            private Logger logger = Logger.getLogger(QueueConsumer.class);
                  
                  
                            public void onMessage(Message message) {
                                      try {
                                                logger.debug(((TextMessage) message).getText());
                                      } catch (JMSException e) {
                                                throw new EJBException("Error in JMS reading operation", e);
                                      }
                            }
                  
                  

                   

                   

                  What's the impact of this transaction-mode-switch in the context of JMS and JBoss/AMQ ?

                   

                  Thanks

                   


                  • 21. Re: JBoss AS7 + ActiveMQ: Unable to bind QueueConnectionFactory to JNDI
                    mbogner

                    Hi,

                     

                    I wrote a new article with 2 ways to configure and use the ressource adapter under http://blog.coffeebeans.at/?p=606. I tested both ways successfully and prefer the second one with the configuration in the standalone.xml.

                     

                    The adapter supports two transaction modes: auto and dups_ok. You can find a description of these modes under http://activemq.apache.org/cms/cms-api-overview.html, chapter CMS Session.

                     

                    Best Regards

                    1 2 Previous Next