JMX/Jacl/Jython from Java - Websphere
This is a discussion on JMX/Jacl/Jython from Java - Websphere ; Here are some tasks I wish to execute from a Java program for working with websphere ND.
1. Create a cluster and add cluster
2. Stop a Cluster and start a Cluster
.... and other such administrative things
Which is ...
-
JMX/Jacl/Jython from Java
Here are some tasks I wish to execute from a Java program for working with websphere ND.
1. Create a cluster and add cluster
2. Stop a Cluster and start a Cluster
.... and other such administrative things
Which is the most appropriate api- JMX/Jacl/Jython for doing this from a Java program?
-
Re: JMX/Jacl/Jython from Java
crscca@yahoo.co.in wrote:
> Here are some tasks I wish to execute from a Java program for working with websphere ND.
>
> 1. Create a cluster and add cluster
>
> 2. Stop a Cluster and start a Cluster
>
> ... and other such administrative things
>
>
>
> Which is the most appropriate api- JMX/Jacl/Jython for doing this from a Java program?
>
JMX. Jacl and Jython are different programming languages.
Ken
-
Re: JMX/Jacl/Jython from Java
I know that.
Ok Let me rephrase that.
I know how to use JMX from Java after all its Java.
Whats the best way to execute Jython code from Java. I want to write some administrative Java code for WAS
-
Re: JMX/Jacl/Jython from Java
crscca@yahoo.co.in wrote:
> I know that.
>
> Ok Let me rephrase that.
>
> I know how to use JMX from Java after all its Java.
>
>
>
> Whats the best way to execute Jython code from Java. I want to write some administrative Java code for WAS
If you want to do admin functions from Java you would use JMX, not
Jython. Your question makes no sense.
-
Re: JMX/Jacl/Jython from Java
Thanks. I was just wondering if someone has used Jython with Java effectively because I had read somewhere that you have to code more when using JMX when compared to Jython and Jacl.
-
Re: JMX/Jacl/Jython from Java
crscca@yahoo.co.in wrote:
> I know that.
>
> Ok Let me rephrase that.
>
> I know how to use JMX from Java after all its Java.
>
>
>
> Whats the best way to execute Jython code from Java. I want to write some administrative Java code for WAS
>
I suppose you could do Runtime.exec().
Ken
-
Re: JMX/Jacl/Jython from Java
crscca@yahoo.co.in wrote:
> Thanks. I was just wondering if someone has used Jython with Java effectively because I had read somewhere that you have to code more when using JMX when compared to Jython and Jacl.
You can use Jython *instead* of Java, or as Ken says, you can fork off
an external process. I don't know why you would bother, though. Either
write Jython scripts which are external to the Java world, or if you
really want to do admin from within Java, then you will use JMX.
-
Re: JMX/Jacl/Jython from Java
>> Thanks. I was just wondering if someone has used Jython with Java
>> effectively because I had read somewhere that you have to code more when
>> using JMX when compared to Jython and Jacl.
JMX is Java programming (like in "compile, package and deploy"), while
Jython is scripting (like in "runs straight from a source file"). So, JMX is
indeed more verbose and rigid than scripting but you have all power of Java
directly at hand.
If it's "only" to install an application and configure its environment like
the few actions described in your initial post, I'd go for scripting.
> You can use Jython *instead* of Java, or as Ken says, you can fork off an
> external process. I don't know why you would bother, though. Either write
> Jython scripts which are external to the Java world, or if you really want
> to do admin from within Java, then you will use JMX.
Well, the main idea behind Jython is that it's really *not* external to
Java. Or am I missing your point ?
Mixing the two makes sense. E.g. use Java / JMX for the fundations of an
administration framework and fill the gaps with ad-hoc Jython scriptlets.
It's very easy to invoke Jython scriplets from a Java application, but not
those using $Admin* objects. At least, I see in my tests that you don't
easily get access to these objects. And wsadmin being closed API doesn't
facilitate.