-
1. Re: Jms Component & WebLogic
jradecki Oct 3, 2011 3:59 PM (in response to pchandler)Yeah, that can be a pain getting to work...You'll have to update w/the correct weblogic
Edited by: jradical on Oct 3, 2011 7:57 PM
Edited by: jradical on Oct 3, 2011 7:58 PM
-
2. Re: Jms Component & WebLogic
pchandler Oct 3, 2011 5:11 PM (in response to jradecki)Yes. I have wired-up standalone ActiveMQ, Websphere, and SonicMQ. However, I am looking for a WebLogic standalone (no JNDI) example. No sure what the WebLogic JMS provider specific connection factory class is and how to configure it?
-
3. Re: Jms Component & WebLogic
jradecki Oct 3, 2011 10:42 PM (in response to pchandler)Seriously can't help you there w/a non jndi impl; I don't even know if Oracle still maintains Weblogic. However; if your looking to connect w/a proxy client outside the app server; a 4 line jndi emulator is what you need. Let me know if you need the code. Wow, Weblogic..."Now, that's a name I've not heard in a long time...a long time." (Obi-Wan).
Also, an amq bridge maybe an option for you.
"Some JMS providers, WebLogic for instance, do not expose a setter for connection properties like host and port (setBrokerUrl) on their ConnectionFactory object. In this case you need to set outboundQueueConnectionFactoryName and jndiOutboundTemplate in your activemq.xml config file."
http://activemq.apache.org/jms-to-jms-bridge.html
No big deal w/that. Little reflection and BI can get you around that. Good luck!
-
4. Re: Jms Component & WebLogic
pchandler Oct 5, 2011 12:42 PM (in response to jradecki)It looks like Weblogic considers a ConnectionFactory a "JMS Administer Object". Hence, you create/maintain/configure the ConnectionFactory Object outside of your Java JMS code. More true to the JMS Specification.
Here is the answer:
Creating a JNDI ConnectionFactory Object in WebLogic's Java Named Directory.
1. I Downloaded, Installed, Configured, and Started the WebLogic Server
2. I then logged into the WebLogic Console http://myHostName:7001/console
3. I followed the instructions
Wire-up a JMS component as follows:
<beans> <!-- To configure/install the weblogic JMS connection factory see: http://download.oracle.com/docs/cd/E13222_01/wls/docs90/ConsoleHelp/taskhelp/jms_modules/connection_factories/CreateConnectionFactories.html --> <!-- Defines the Client connection to the JNDI Server --> <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop> <prop key="java.naming.provider.url">t3://localhost:7001</prop> <!-- opional ... --> <prop key="java.naming.security.principal">weblogic</prop> <prop key="java.naming.security.credentials">weblogic</prop> </props> </property> </bean> <!-- Gets a Weblogic JMS Connection factory object from JDNI Server by jndiName--> <bean id="webLogicJmsConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate" ref="jndiTemplate"></property> <property name="jndiName" value="jms/connectionFactory"></property> <!-- the connection factory object is store under this name --> </bean> <!-- Create a new WebLogic Jms Camel Component --> <bean id="weblogicJmsCamelComponent" class="org.apache.camel.component.jms.JmsComponent"> <property name="connectionFactory" ref="webLogicJmsConnectionFactory"></property> </bean> </beans>