activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Illtud Daniel <illtud.dan...@llgc.org.uk>
Subject Re: where to put java classes/jars for bean invocation via camel?
Date Mon, 04 Oct 2010 20:20:05 GMT
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?

-- 
Illtud Daniel                                 illtud.daniel@llgc.org.uk
Prif Swyddog Technegol                          Chief Technical Officer
Llyfrgell Genedlaethol Cymru                  National Library of Wales

Mime
View raw message