camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Smith <>
Subject JMS Component WITHOUT Spring
Date Mon, 19 Jul 2010 18:06:10 GMT
Where I work, Spring has been declared "evil" so I am attempting to use
camel without any of the Spring JARs but I can't find any examples of how to
setup a JMS component without a Spring dependency. I am using Tibco as the
JMS provider and it is providing JNDI.

Here is a sample code snippet which shows the JNDI and JMS setup that I need
for the component:

final CamelContext context = new DefaultCamelContext();
final Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, Constants.TOPIC_PROVIDER_URL));
final Context jndiContext = new InitialContext(env);
final TopicConnectionFactory topicConnectionFactory =


This compiles without any Spring JARs but, when I run it I get the following
exception thrown by the last line of code:

Caused by: java.lang.ClassNotFoundException:

NOTE: I am currently looking into the possibility that this is actually an
issue with the DefaultCamelContext being dependent on Spring rather that it
being a JMS or component issue. In any case, I would appreciate any advice
or guidance on this.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message