activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucio Piccoli" <Lucio.Picc...@eyecon.com.au>
Subject WAR deployment confusion
Date Wed, 31 May 2006 08:41:26 GMT
WLS 7.x
Jdk1.4.2
activeMQ-4-RC2
Hi all,

I am new to activeMQ and struggling to fit it into my architecture.

I am past the hair pulling stage, and into the nail biting stage with
ActiveMQ integration with Weblogic.

I have something working but not sure why it is working my 3 questions are
below.

I have read countless JNDI support and Connection pages. As good as they are
I am still confused.

1) WAR deployments
Can the activeMQ be deployed in it own WAR and used by other WAR on the same
app server?
I can't get this work as it complains about the following. It seems that the
when the servlet is invoked it  is trying to startup another broker
instance. I don't understand why? 

Any ideas?

<May 31, 2006 6:32:19 PM EST> <Notice> <WebLogicServer> <000360> <Server
started
 in RUNNING mode>
TestServelt init
May 31, 2006 6:33:08 PM org.apache.activemq.broker.jmx.ManagementContext
findMBe
anServer
SEVERE: Couldnot load MBeanServer
java.lang.NoClassDefFoundError: javax/management/remote/JMXServiceURL
        at
org.apache.activemq.broker.jmx.ManagementContext.createConnector(Mana
gementContext.java:323)
        at
org.apache.activemq.broker.jmx.ManagementContext.createMBeanServer(Ma
nagementContext.java:293)
        at
org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(Mana
gementContext.java:272)
        at
org.apache.activemq.broker.jmx.ManagementContext.getMBeanServer(Manag
ementContext.java:145)
        at
org.apache.activemq.broker.jmx.ManagementContext.start(ManagementCont
ext.java:69)
        at
org.apache.activemq.broker.BrokerService.start(BrokerService.java:353
)
        at
org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnec
t(VMTransportFactory.java:102)
        at
org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTrans
portFactory.java:48)
        at
org.apache.activemq.transport.TransportFactory.doConnect(TransportFac
tory.java:42)
        at
org.apache.activemq.transport.TransportFactory.connect(TransportFacto
ry.java:76)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnectio
n(ActiveMQConnectionFactory.java:222)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnectio
n(ActiveMQConnectionFactory.java:210)
        at
org.apache.activemq.ActiveMQConnectionFactory.createQueueConnection(A
ctiveMQConnectionFactory.java:172)
        at
com.ogs.mig.payment.test.TestServlet.setMessageReceiver(TestServlet.j
ava:135)
        at com.ogs.mig.payment.test.TestServlet.init(TestServlet.java:65)
        at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(Servl
etStubImpl.java:1092)
        at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
eManager.java:685)
        at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:916)
        at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub


2) MessageConsumers 
Deploying both the broker and the app inside a single WAR works OK. However
since the client is a tight ass and using WLS express I can't use MDB. So I
am trying to instantiate MessageConsumers inside a servlet. The servlet gets
preloaded using the <load-on-startup> in the web.xml. However the servlet
loads before the broker is loaded and it complains about the follow.
It seems like the servlet instance is trying to create a broker is ready and
complains badly.
Is there a simple mechanism that allows POJO to be configured as
MessageConsumers within a WebApp?

ay 31, 2006 6:37:38 PM org.apache.activemq.broker.jmx.ManagementContext
findMBenServer
EVERE: Couldnot load MBeanServer
ava.lang.NoClassDefFoundError: javax/management/remote/JMXServiceURL
       at
org.apache.activemq.broker.jmx.ManagementContext.createConnector(Mana
ementContext.java:323)
       at
org.apache.activemq.broker.jmx.ManagementContext.createMBeanServer(Ma
agementContext.java:293)
       at
org.apache.activemq.broker.jmx.ManagementContext.findMBeanServer(Mana

3) ConnectionFactory Lookup. 
    When using the 
javax.jms.TopicConnectionFactory factory =
(javax.jms.TopicConnectionFactory)ctx.lookup("ConnectionFactory");

only the name "ConnectionFactory" can be found. Anything else is not found.
I am using the jndi.properties from 
http://www.activemq.org/site/jndi-support.html


which is  below. As can be seen the connectionFactoryNames field is
commented out. How is the above code working? Why is there a need for
specific factory's?


---------jndi.properties------------------

java.naming.factory.initial =
org.apache.activemq.jndi.ActiveMQInitialContextFactory

# use the following property to configure the default connector
java.naming.provider.url = vm://localhost

# use the following property to specify a class path resource or URL
# used to configure an embedded broker using the XML configuration file
#brokerXmlConfig = file:src/conf/sample-conf/default.xml

# use the following property to specify the JNDI name the connection factory
# should appear as. 
#connectionFactoryNames = connectionFactory, queueConnectionFactory,
topicConnectionFactry

# register some queues in JNDI using the form
# queue.[jndiName] = [physicalName]
queue.MyQueue = example.MyQueue


# register some topics in JNDI using the form
# topic.[jndiName] = [physicalName]
topic.MyTopic = example.MyTopic
    
-------------end jndi.properties----------------  



Mime
View raw message