[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [ecf-dev] RE: ecf-dev Digest, Vol 35, Issue 19 | 
Hi Dicky,
Dicky Johan wrote:
Scott,
Thanks for your reply. Ok, here is the tricky part of what I am trying 
to accomplish. Assuming I am using the ECF ActiveMQ provider, and I 
manage to send a serialized message (ie, maybe using the remote 
services), but once ActiveMQ receives the message, (for example, the 
message can be a class like this):
class MessageToSend {
   public String provider = "ecf.yahoo";
   public String command = "SEND";
   public String message = "hello world";
   public String from = "sender@xxxxxxxxx <mailto:sender@xxxxxxxxx>";
   public String to = "target@xxxxxxxxx <mailto:target@xxxxxxxxx>";
}
ActiveMQ needs to instantiate the ECF provider, but ActiveMQ is not 
running in OSGi mode (ie, it is like a servlet), how can ActiveMQ 
instantiate the right provider and send the message? 
Well, there are two ways to do this:
1) you could run OSGi/Equinox/ECF on the server...and this would not be 
an issue as the ECF use of dynamic classloading/buddy loading takes care 
of the issue.
2) You can/put the needed classes on the classpath for the ActiveMQ 
process, and when the deserialization happens the class should be 
found.  Note that you will probably need to make some ECF classes also 
available on the classpath, as the ECF generic provider serializes some 
of it's own classes, and the if the server needs to deserialize these 
(i.e. if the server has some replicated state as opposed to just being a 
pass-through), then it will need to deserialize some ECF classes as well.
Should ActiveMQ make a http call back to a headless Eclipse that has 
all the ECF provider code? Or should I be running an embedded ActiveMQ 
broker within the headless Eclipse?
I would suggest the latter.  We already have an ECF-based ActiveMQ 
server application...mostly as an example/for testing, but you can could 
use it as example for your own.  Also, the new Runtime top-level project 
is all about OSGi/Equinox on the server, and ECF is moving into that 
project...so we will certainly be having more of a focus within ECF on 
server-side running of ECF.
Regards,
Scott