Folks,
To complete a flurry of 'remote management' activity this week by many
of us, I'd like to announce that :
1) The 'HelloWorld' demo has been upgraded to have an AltRMI interface.
To recap, the demo as is allows you to point a web browser to a port and
see the following in the browser's window:
HelloWorld!
Requests so far = 1
By invoking 'build cornerstone check-altrmi' you'll launch the tester
that, via AltRMI, changes the message in the block to:
Howdie Partner!
Requests so far = 2
2) I've done some more work with Jesktop. Actually the apps (that are
not Apache license) have moved from Perforce hosting to SourceForge.
One of those is Beanshell. I've added the client side AltRMI jars to
that app and also added a new command arLookup.bsh (attached). In the
Shell you can now do the folllowing ('bsh %' is beanshells prompt)
before using the browser to see the results:
bsh % fred = arLookup("127.0.0.1",8666,"helloworld");
bsh % fred.setGreeting("How do you do");
The interesting point about this is that Beanshell contains no classes
from Cornerstone-demos. It has no knowledge of it and is merely
actioning methods calls agains a bean. It could to a similar lookup on
any service anywhere. setGreeting() is just an example of a method that
can be exposed.
---
Granted we see Eung-Ju working on RMI and Peter delivering JMX. AltRMI
is for those people that want to deal with legacy interfaces. For
example the Servlet API. It is not MBean, nor is it RMI. Ganted also it
may be a bit hard and pointless to publish via AltRMI.
---
For those that want to repeat the tests.............
1) 'build jesktop install' (in cornerstone)
2) 'build demo install' (in cornerstone)
3) delete all bar jesktop.sar and avalon-altrmidemo.sar from
<phoenix>/dist/apps/
4) run phoenix as usual.
5) point browser to http://localhost:7666/
6) 'build demo check-altrmi' (in cornerstone)
7) refresh browser
8) In Jesktop go to SimpleInstaller and install Beanshell from
http://jesktopapps.sourceforge.net/apps/ (though give me an hour to
upload a new version).
9) launch beanshell and do the bsh% bits above.
---
For those that are interested in possibilities. We could have many
beanshell 'bsh' scripts :
startService(..)
listServices()
stopService(..)
shutdown(..)
.. all these commands could use management facades.
Regards,
- Paul H
bsh.help.arLookup = "usage: arLookup(host, port, name), returns object";
/*
By Paul Hammant : Specifically for Jesktop
*/
Object arLookup(String host, int port, String name) {
org.apache.commons.altrmi.client.AltrmiFactory af = new
org.apache.commons.altrmi.client.impl.ServerClassAltrmiFactory();
af.setHostContext(new
org.apache.commons.altrmi.client.impl.socket.SocketObjectStreamHostContext(host,
port));
return af.lookup(name, true);
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>