activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: where to put java classes/jars for bean invocation via camel?
Date Mon, 04 Oct 2010 20:32:10 GMT
On Mon, 2010-10-04 at 21:20 +0100, Illtud Daniel wrote:
> Stan, thank you very much for the prompt reply
> 
> On 04/10/10 20:38, Stan Lewis wrote:
> > activemq's lib directory is the right place for it, make sure you
> > either put the class in a directory hierarchy that matches the class's
> > package name or build it into a Jar file.
> 
> Ah, see, now you have already found the bounds of my java
> knowlege (told you it didn't go very far...).
> 
> Here's what I have:
> 
> $ cd /tmp
> $ cat HelloWorld.java
> package uk.org.llgc.testing;
> 
> public class HelloWorld {
> 
>      public String hello(String name) {
>          return "Hello " + name;
>      }
> }
> $ javac HelloWorld.java
> $ cd /usr/local/activemq/lib
> $ mkdir -p uk/org/llgc/testing
> $ cp /tmp/HelloWorld.class uk/org/llgc/testing
> 
> I have that one line defining the bean in camel.xml:
> 
>          <bean id="hello" class="HelloWorld"/>
> 
> 
> ...there must be some other reference to the package that needs
> making somewhere, right?
> 

try it this way:  

   <bean id="hello" class="uk.org.llgc.testing.HelloWorld"/>

Regards

-- 
Tim Bish

Open Source Integration: http://fusesource.com

Follow me on Twitter: http://twitter.com/tabish121
My Blog: http://timbish.blogspot.com/


Mime
View raw message