You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by David Jencks <da...@yahoo.com> on 2006/12/07 01:58:38 UTC

Re: ActiveMQConnectionFactory as an administered object

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 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
>>>
>>
>