activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Reload Java EIP Rules
Date Tue, 20 Nov 2007 09:55:10 GMT
On 20/11/2007, Rob Davies <rajdavies@gmail.com> wrote:
> ActiveMQ 5 requires Java 5 - so this won't be a problem for AgentSmth
> We just need to override the Smith.redefineClass() method in a
> derived class to add some eventing to stop the routes and reload the
> classes

That should work! :)

If it doesn't - or we hit some limitation of AgentSmith (e.g. I've
seen talk of AgentSmith not reloading stuff if you add new methods or
fields to a class), I guess we could always build our own little
reloading classloader thingy?

e.g. we could do something like this in camel...

<camelContext>
  <rules dir="lib/rules" package="org.foo"/>
</camelContext>

which would then create a single ClassLoader for all the *.jar files
in that directory and then load and activate all the rules in there.

If any of the jars change, we could stop all those rules, ditch the
classloader and reload all the jars again and re-activate the rules
again.

I guess AgentSmith might be more clever and realise just which rules
have actually changed maybe? I wonder if eclipse has any clever
hot-swap ninja we could reuse?

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message