On Sat, Jan 15, 2011 at 3:21 AM, Danushka Menikkumbura <[email protected]>wrote:

> Otherwise the OSGi-fied classes are not visible to the CarbonContext.
>

But the Axis2 JMS transport has nothing to do with Carbon or CarbonContext.
Why do we have to force the users to go through this? As I said this is
going to break a lot of existing stuff :(

If we are sticking to this approach and not going to fix this, then we
should start updating all our JMS related documentation and make it clear
how to configure the JMS listener in Carbon based servers. However I still
don't understand how we can handle the cases like WebsphereMQ and WebLogic.

Thanks,
Hiranya


>
> Danushka
>
>
> On Fri, Jan 14, 2011 at 10:50 PM, Hiranya Jayathilaka <[email protected]>wrote:
>
>>
>>
>> On Fri, Jan 14, 2011 at 5:34 PM, Danushka Menikkumbura <[email protected]
>> > wrote:
>>
>>> The CarbonInitialContextFactory was introduced to solve this issue. You
>>> need to have an Orbit bundle for ActiveMQ and set an instance of it's ICF in
>>> the CarbonInitialContextFactory. Then use CarbonInitialContextFactory as
>>> your ICF in JMS transport configuration.
>>>
>>
>> Is this mandatory with the Carbon trunk? In that case it is not very user
>> friendly IMO. The Axis2 JMS transport should work with any JMS broker
>> without having to export the client libraries as OSGi bundles. It is not
>> practical to maintain Orbit bundles for all the JMS brokers people use with
>> Carbon (eg: ActiveMQ, WebsphereMQ, WebLogic...).
>>
>> We shouldn't be forcing the users to use CarbonInitialContextFactory
>> either. This will break all currently working JMS transport configurations.
>>
>> Thanks,
>> Hiranya
>>
>>
>>>
>>> Thanks,
>>> Danushka
>>>
>>> On Fri, Jan 14, 2011 at 5:06 PM, Rajika Kumarasiri <[email protected]>wrote:
>>>
>>>> I just got a ESB build up and running from trunk and tried sample #250 (
>>>> which is a JMS sample) but JMS is broken. I just placed the Activemq jars
>>>> inside $CARBON_HOME/repository/components/lib and start the server which
>>>> gave the following stack trace.
>>>>
>>>> Caused by: javax.naming.NoInitialContextException: Failed to create
>>>> InitialContext using factory specified in hash table. [Root exception is
>>>> java.lang.ClassNotFoundException: class
>>>> org.apache.activemq.jndi.ActiveMQInitialContextFactory not found]
>>>>     at
>>>> org.wso2.carbon.utils.multitenancy.CarbonContextHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextHolder.java:738)
>>>>     at
>>>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:664)
>>>>     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
>>>> org.apache.axis2.transport.jms.JMSConnectionFactory.<init>(JMSConnectionFactory.java:91)
>>>>     ... 11 more
>>>> Caused by: java.lang.ClassNotFoundException: class
>>>> org.apache.activemq.jndi.ActiveMQInitialContextFactory not found
>>>>     at
>>>> org.wso2.carbon.utils.multitenancy.CarbonContextHolder.classForName(CarbonContextHolder.java:1343)
>>>>     at
>>>> org.wso2.carbon.utils.multitenancy.CarbonContextHolder.access$500(CarbonContextHolder.java:74)
>>>>     at
>>>> org.wso2.carbon.utils.multitenancy.CarbonContextHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextHolder.java:734)
>>>>     ... 16 more
>>>>
>>>> Then I placed the same set of jars also inside $CARBON_HOME/lib folder
>>>> which gave the following stack traces.
>>>>
>>>> ERROR - ListenerManager Couldn't initialize the jmstransport listener
>>>> org.apache.axis2.transport.base.BaseTransportException: JNDI lookup of
>>>> name QueueConnectionFactory returned a
>>>> org.apache.activemq.ActiveMQConnectionFactory while a interface
>>>> javax.jms.ConnectionFactory was expected
>>>>     at
>>>> org.apache.axis2.transport.base.BaseUtils.handleException(BaseUtils.java:166)
>>>>     at org.apache.axis2.transport.jms.JMSUtils.lookup(JMSUtils.java:522)
>>>>     at
>>>> org.apache.axis2.transport.jms.JMSConnectionFactory.<init>(JMSConnectionFactory.java:92)
>>>>     at
>>>> org.apache.axis2.transport.jms.JMSConnectionFactoryManager.loadConnectionFactoryDefinitions(JMSConnectionFactoryManager.java:58)
>>>>     at
>>>> org.apache.axis2.transport.jms.JMSConnectionFactoryManager.<init>(JMSConnectionFactoryManager.java:45)
>>>>     at
>>>> org.apache.axis2.transport.jms.JMSListener.doInit(JMSListener.java:58)
>>>>     at
>>>> org.apache.axis2.transport.base.AbstractTransportListenerEx.init(AbstractTransportListenerEx.java:62)
>>>>     at
>>>> org.apache.axis2.engine.ListenerManager.init(ListenerManager.java:83)
>>>>     at
>>>> org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:395)
>>>>     at
>>>> org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:282)
>>>>     at
>>>> org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:117)
>>>>     at
>>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:916)
>>>>     at
>>>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
>>>>     at
>>>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:330)
>>>>
>>>> I need to test the CSG work that I am working on, so it'd be great if we
>>>> can fix these immediately.
>>>>
>>>> Rajika
>>>>
>>>> _______________________________________________
>>>> Carbon-dev mailing list
>>>> [email protected]
>>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Carbon-dev mailing list
>>> [email protected]
>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>
>>>
>>
>>
>> --
>> Hiranya Jayathilaka
>> Senior Software Engineer;
>> WSO2 Inc.;  http://wso2.org
>> E-mail: [email protected];  Mobile: +94 77 633 3491
>> Blog: http://techfeast-hiranya.blogspot.com
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> [email protected]
>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
Hiranya Jayathilaka
Senior Software Engineer;
WSO2 Inc.;  http://wso2.org
E-mail: [email protected];  Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com
_______________________________________________
Carbon-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to