Hi Dan,

I'm interested in what you're doing with JMX, as I do a lot of axis2
programming with JBoss / EJB which as you may know is a very heavily
user of JMX. See my comments inline:

On 6/30/06, Dan Peder Eriksen <[EMAIL PROTECTED]> wrote:
Hello,

I'm a master degree student from the university of Tromsø working on
a middlware platform for context sensitive services. The middlware is
built by using MBeans (JMX http://java.sun.com/products/JavaManagement)
and Axis 2 has been installed on an embedded installation of Jetty
5.1.11RC0.

We want to make it possible for components deployed in the middleware
to expose certain methods as web services using axis 2. When trying to
use the API some problems have arisen.

The two problems I encounter when trying to do this is:
1. A way to register already created objects as a service, so I supply
the instance of the object (the component) instead of axis 2 creating
the instance for me.

You happen to be lucky and this issue was just implemented in recent
days - if I understand you correctly ;-) . In my case I did the Spring
support that does its own loading of objects, but ran into the same
issue. The Spring classes haven't been updated yet, but hope to do
that in the next few days.

In the latest svn take a look at
modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java

You can now define ServiceObjectSupplier as you would ServiceClass in
your services.xml, and return your object as you see fit.

2. A way to programmatically register services. This most also be possible
at runtime as the middleware supports hot deployment.

So what I'm looking at creating (if it doesnt already exists) for our
middleware is something like this, pseudocode:

//My component I want to register
Component comp = Middleware.getComponent("Component Name");

//Methods the service should expose, everything
Method[] methods = comp.getClass().getMethods();

//Singelton pattern
Axis axis = Axis.getInstance();

//Deploy Service
axis.deployService("Service Name", comp, methods);


If does not exist already it's something I would like to create. I'm sure
it
would be usefull for others aswell. Where would one start to create
something
like this?

This is not the area I typically work on, though I'll take an educated
guess. Others may be able to give better advice.

You either need an axis2.xml or you can create one programatically via
AxisConfiguration . From there you can go with the exploded dir
options as this tutorial explains:

http://www.wso2.net/kb/90

AFAIK, however, the exploded dir option is not hot deploy. To do that,
my possibly completely wrong thoughts, based on entirely too much
world cup fever, would be:

1) First get the axisConfiguration as descibed above.
2) Then get the AxisService corresponding to the service to create from
axisConfiguration.
3)  AxisService createService(String implClass, AxisConfiguration
axisConfig) throws org.apache.axis2.AxisFault;
4) To invoke:

new ServiceClient(ConfigurationContext configContext, AxisService axisService);
serviceClient.sendReceive(OMElement);

HTH,
Robert
http://www.braziloutsource.com/


HTH,
Robert
http://www.braziloutsource.com/


Sincerely Dan Peder Eriksen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to