You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "alexandre.correa" <al...@gmail.com> on 2006/11/28 22:17:50 UTC
ActiveMQConnectionFactory as an administered object
Hi folks,
I'm trying to configure ActiveMQConnectionFactory as an administered object
in JBoss4.0.2, so I can register an ActiveMQ ConnectionFactory into JBoss
JNDI (I'm using ActiveMQ4.0.1 with a remote broker). The problem is that I
don't know which properties I must set for it.
I've included this code into my ActiveMQ datasource descriptor:
<mbean code="org.jboss.resource.deployment.AdminObject"
name="activemq:name=ActiveMQConnectionFactory">
<attribute name="JNDIName">ConnectionFactory</attribute>
<depends optional-attribute-name="RARName">
jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'
</depends>
<attribute name="Type">javax.jms.ConnectionFactory</attribute>
<attribute name="Properties"></attribute>
</mbean>
When I deploy the datasource, I get this error (not sure if it can help):
20:14:47,846 ERROR [JNDIReferenceFactory]
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at java.util.Properties.setProperty(Properties.java:128)
at
org.apache.activemq.ActiveMQConnectionFactory.populateProperties(ActiveMQConnectionFactory.java:415)
at
org.apache.activemq.jndi.JNDIBaseStorable.getProperties(JNDIBaseStorable.java:67)
at
org.apache.activemq.jndi.JNDIReferenceFactory.createReference(JNDIReferenceFactory.java:98)
at
org.apache.activemq.jndi.JNDIBaseStorable.getReference(JNDIBaseStorable.java:79)
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:537)
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:516)
at javax.naming.InitialContext.bind(InitialContext.java:359)
at org.jboss.naming.Util.bind(Util.java:85)
Someone has sucessfully configured ActiveMQConnectionFactory this way?
Someone has a hint for that?
Thanks,
Alexandre
--
View this message in context: http://www.nabble.com/ActiveMQConnectionFactory-as-an-administered-object-tf2721025.html#a7587911
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQConnectionFactory as an administered object
Posted by Adrian Co <ac...@exist.com>.
Sorry for the confusion. My bad.
I was referring to the NPE that has been fixed. I'm not sure if
deploying the connection factory as an admin object in jboss is correct
or not. :(
David Jencks wrote:
>
> On Nov 28, 2006, at 2:36 PM, Adrian Co wrote:
>
>> This is a known bug that has been fixed in the 4.1 branch. Can you
>> give that a shot? :)
>
> Really???????
>
> I'd expect that you'd deploy a connection factory as a connection
> factory not an administered object... thus getting app server managed
> pooling, tx enlistement, mdb support, etc etc. What is the reason for
> deploying a connection factory as an admin object, which are normally
> queues and topics?
>
> thanks
> david jencks
>
>>
>> alexandre.correa wrote:
>>> Hi folks,
>>>
>>> I'm trying to configure ActiveMQConnectionFactory as an administered
>>> object
>>> in JBoss4.0.2, so I can register an ActiveMQ ConnectionFactory into
>>> JBoss
>>> JNDI (I'm using ActiveMQ4.0.1 with a remote broker). The problem is
>>> that I
>>> don't know which properties I must set for it.
>>>
>>> I've included this code into my ActiveMQ datasource descriptor:
>>>
>>> <mbean code="org.jboss.resource.deployment.AdminObject"
>>> name="activemq:name=ActiveMQConnectionFactory">
>>> <attribute name="JNDIName">ConnectionFactory</attribute>
>>> <depends optional-attribute-name="RARName">
>>>
>>> jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'
>>> </depends>
>>> <attribute name="Type">javax.jms.ConnectionFactory</attribute>
>>> <attribute name="Properties"></attribute>
>>> </mbean>
>>>
>>> When I deploy the datasource, I get this error (not sure if it can
>>> help):
>>>
>>> 20:14:47,846 ERROR [JNDIReferenceFactory]
>>> java.lang.NullPointerException
>>> at java.util.Hashtable.put(Hashtable.java:396)
>>> at java.util.Properties.setProperty(Properties.java:128)
>>> at
>>> org.apache.activemq.ActiveMQConnectionFactory.populateProperties(ActiveMQConnectionFactory.java:415)
>>>
>>> at
>>> org.apache.activemq.jndi.JNDIBaseStorable.getProperties(JNDIBaseStorable.java:67)
>>>
>>> at
>>> org.apache.activemq.jndi.JNDIReferenceFactory.createReference(JNDIReferenceFactory.java:98)
>>>
>>> at
>>> org.apache.activemq.jndi.JNDIBaseStorable.getReference(JNDIBaseStorable.java:79)
>>>
>>> at
>>> org.jnp.interfaces.NamingContext.bind(NamingContext.java:537)
>>> at
>>> org.jnp.interfaces.NamingContext.bind(NamingContext.java:516)
>>> at javax.naming.InitialContext.bind(InitialContext.java:359)
>>> at org.jboss.naming.Util.bind(Util.java:85)
>>>
>>> Someone has sucessfully configured ActiveMQConnectionFactory this way?
>>> Someone has a hint for that?
>>>
>>> Thanks,
>>> Alexandre
>>>
>>
>
Re: ActiveMQConnectionFactory as an administered object
Posted by David Jencks <da...@yahoo.com>.
On Nov 28, 2006, at 2:36 PM, Adrian Co wrote:
> This is a known bug that has been fixed in the 4.1 branch. Can you
> give that a shot? :)
Really???????
I'd expect that you'd deploy a connection factory as a connection
factory not an administered object... thus getting app server managed
pooling, tx enlistement, mdb support, etc etc. What is the reason
for deploying a connection factory as an admin object, which are
normally queues and topics?
thanks
david jencks
>
> alexandre.correa wrote:
>> Hi folks,
>>
>> I'm trying to configure ActiveMQConnectionFactory as an
>> administered object
>> in JBoss4.0.2, so I can register an ActiveMQ ConnectionFactory
>> into JBoss
>> JNDI (I'm using ActiveMQ4.0.1 with a remote broker). The problem
>> is that I
>> don't know which properties I must set for it.
>>
>> I've included this code into my ActiveMQ datasource descriptor:
>>
>> <mbean code="org.jboss.resource.deployment.AdminObject"
>> name="activemq:name=ActiveMQConnectionFactory">
>> <attribute name="JNDIName">ConnectionFactory</attribute>
>> <depends optional-attribute-name="RARName">
>> jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'
>> </depends>
>> <attribute name="Type">javax.jms.ConnectionFactory</attribute>
>> <attribute name="Properties"></attribute>
>> </mbean>
>>
>> When I deploy the datasource, I get this error (not sure if it can
>> help):
>>
>> 20:14:47,846 ERROR [JNDIReferenceFactory]
>> java.lang.NullPointerException
>> at java.util.Hashtable.put(Hashtable.java:396)
>> at java.util.Properties.setProperty(Properties.java:128)
>> at
>> org.apache.activemq.ActiveMQConnectionFactory.populateProperties
>> (ActiveMQConnectionFactory.java:415)
>> at
>> org.apache.activemq.jndi.JNDIBaseStorable.getProperties
>> (JNDIBaseStorable.java:67)
>> at
>> org.apache.activemq.jndi.JNDIReferenceFactory.createReference
>> (JNDIReferenceFactory.java:98)
>> at
>> org.apache.activemq.jndi.JNDIBaseStorable.getReference
>> (JNDIBaseStorable.java:79)
>> at org.jnp.interfaces.NamingContext.bind
>> (NamingContext.java:537)
>> at org.jnp.interfaces.NamingContext.bind
>> (NamingContext.java:516)
>> at javax.naming.InitialContext.bind(InitialContext.java:359)
>> at org.jboss.naming.Util.bind(Util.java:85)
>>
>> Someone has sucessfully configured ActiveMQConnectionFactory this
>> way?
>> Someone has a hint for that?
>>
>> Thanks,
>> Alexandre
>>
>
Re: ActiveMQConnectionFactory as an administered object
Posted by "alexandre.correa" <al...@gmail.com>.
Thanks Adrian for the quick response.
I've got to register the ActiveMQConnectionFactory object properly with the
4.1 branch.
Thanks again,
Alexandre
Adrian Co wrote:
>
> This is a known bug that has been fixed in the 4.1 branch. Can you give
> that a shot? :)
>
>
--
View this message in context: http://www.nabble.com/ActiveMQConnectionFactory-as-an-administered-object-tf2721025.html#a7598765
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQConnectionFactory as an administered object
Posted by Adrian Co <ac...@exist.com>.
This is a known bug that has been fixed in the 4.1 branch. Can you give
that a shot? :)
alexandre.correa wrote:
> Hi folks,
>
> I'm trying to configure ActiveMQConnectionFactory as an administered object
> in JBoss4.0.2, so I can register an ActiveMQ ConnectionFactory into JBoss
> JNDI (I'm using ActiveMQ4.0.1 with a remote broker). The problem is that I
> don't know which properties I must set for it.
>
> I've included this code into my ActiveMQ datasource descriptor:
>
> <mbean code="org.jboss.resource.deployment.AdminObject"
> name="activemq:name=ActiveMQConnectionFactory">
> <attribute name="JNDIName">ConnectionFactory</attribute>
> <depends optional-attribute-name="RARName">
> jboss.jca:service=RARDeployment,name='activemq-ra-4.0.1.rar'
> </depends>
> <attribute name="Type">javax.jms.ConnectionFactory</attribute>
> <attribute name="Properties"></attribute>
> </mbean>
>
> When I deploy the datasource, I get this error (not sure if it can help):
>
> 20:14:47,846 ERROR [JNDIReferenceFactory]
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:396)
> at java.util.Properties.setProperty(Properties.java:128)
> at
> org.apache.activemq.ActiveMQConnectionFactory.populateProperties(ActiveMQConnectionFactory.java:415)
> at
> org.apache.activemq.jndi.JNDIBaseStorable.getProperties(JNDIBaseStorable.java:67)
> at
> org.apache.activemq.jndi.JNDIReferenceFactory.createReference(JNDIReferenceFactory.java:98)
> at
> org.apache.activemq.jndi.JNDIBaseStorable.getReference(JNDIBaseStorable.java:79)
> at org.jnp.interfaces.NamingContext.bind(NamingContext.java:537)
> at org.jnp.interfaces.NamingContext.bind(NamingContext.java:516)
> at javax.naming.InitialContext.bind(InitialContext.java:359)
> at org.jboss.naming.Util.bind(Util.java:85)
>
> Someone has sucessfully configured ActiveMQConnectionFactory this way?
> Someone has a hint for that?
>
> Thanks,
> Alexandre
>