|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.oddjob.jmx.JMXServerJob
public class JMXServerJob
JMXClientJob.
Security can be added using the environment property. Simple JMX security comes
prepackaged as SimpleServerSecurity. Note that the access file is
an Oddjob specific access file. Oddjob requires full read/write access because
it uses JMX operations and all JMX operation require full read/write access.
Oddjob uses a JMX access format file but provides it's own primitive access
control on top the JMX layer. Oddjob's access control removes an entire java
interface from the client side proxy if any of it's methods are write.
One affect of this is that a read only account can't access properties of
the remote job with the ${server/remote-job} syntax because this functionality
is provided by the same interface (BeanUtils DynaBean) that allows
a remote job's properties to be written.
For more information on JMX Security see The JMX Tutorial.
<oddjob id="this">
<job>
<sequential>
<jobs>
<rmireg/>
<jmx:server id="server1" root="${server-jobs}" url="service:jmx:rmi://ignored/jndi/rmi://localhost/freds-oddjob-server" xmlns:jmx="http://rgordon.co.uk/oddjob/jmx"/>
<oddjob file="${this.dir}/ServerJobs.xml" id="server-jobs"/>
</jobs>
</sequential>
</job>
</oddjob>
The nested Oddjob can be any normal Oddjob configuration. Here is the
nested Oddjob used in some client examples. The greeting is in
a folder because it will only be run from the client.
<oddjob>
<job>
<folder>
<jobs>
<echo id="greeting">Hello World</echo>
</jobs>
</folder>
</job>
</oddjob>
<jmx:server root="${some-job}" url="service:jmx:rmi://ignored/jndi/rmi://localhost/my-oddjob" xmlns:jmx="http://rgordon.co.uk/oddjob/jmx">
<environment>
<jmx:server-security>
<passwordFile>
<file file="C:\rob\java\jmx_examples\Security\simple\config\password.properties"/>
</passwordFile>
</jmx:server-security>
</environment>
</jmx:server>
| Field Summary | |
|---|---|
static String |
ACCESS_FILE_PROPERTY
|
| Constructor Summary | |
|---|---|
JMXServerJob()
|
|
| Method Summary | |
|---|---|
String |
getAddress()
|
Map<String,?> |
getEnvironment()
|
HandlerFactoryProvider |
getHandlerFactories()
|
String |
getLogFormat()
|
String |
getName()
Get the name. |
Object |
getRoot()
Get the root node of the monitor tree. |
String |
getUrl()
Get the name the root node is bound as in the naming service. |
void |
setArooaSession(ArooaSession session)
|
void |
setEnvironment(Map<String,?> environment)
|
void |
setHandlerFactories(HandlerFactoryProvider handlerFactories)
|
void |
setLogFormat(String logFormat)
|
void |
setName(String name)
Set the name |
void |
setRoot(Object rootNode)
Set the root node directly. |
void |
setUrl(String bindAs)
Set the name to bind the root node as in the naming service. |
void |
start()
|
void |
stop()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ACCESS_FILE_PROPERTY
| Constructor Detail |
|---|
public JMXServerJob()
| Method Detail |
|---|
public void setArooaSession(ArooaSession session)
setArooaSession in interface ArooaSessionAwarepublic String getName()
public void setName(String name)
name - The name.public void setRoot(Object rootNode)
rootNode - The root node for the monitor tree.public Object getRoot()
public String getAddress()
public void setUrl(String bindAs)
url - The name for the naming service.public String getUrl()
public void start()
throws JMException,
MalformedURLException,
IOException,
ServerLoopBackException
JMException
MalformedURLException
IOException
ServerLoopBackException
public void stop()
throws Exception
Exceptionpublic String toString()
toString in class Objectpublic String getLogFormat()
public void setLogFormat(String logFormat)
public HandlerFactoryProvider getHandlerFactories()
public void setHandlerFactories(HandlerFactoryProvider handlerFactories)
public Map<String,?> getEnvironment()
public void setEnvironment(Map<String,?> environment)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||