xmlBlaster 2.2.0 API

org.xmlBlaster.j2ee.jmx
Class XmlBlasterService

java.lang.Object
  extended by org.xmlBlaster.j2ee.jmx.XmlBlasterService
All Implemented Interfaces:
XmlBlasterServiceMBean

public class XmlBlasterService
extends java.lang.Object
implements XmlBlasterServiceMBean

XmlBlaster for embedded use in a JMX server.

You may use this MBean to start one or more XmlBlaster instances in a JMX container. It has, however, only been tested with the JBoss 3.0 server. To start it in JBoss copy the xmlBlaster.sar archive into deploy. If you need to change the settings either edit the enbedded xmlBlaster.properties file or change the name of the property file in META-INF/jboss-service.xml and make it availabl1e in the XmlBlaster search path or embed it in the sar.

To get better control ower the XmlBlaster setup process, the xmlBlaster.jar that's embedded in the sar has had its xmlBlaster.properties and xmlBlasterPlugins.xml files removed. It's recomended to do this also in any xmlBlaster.jar that is placed in the global classpath of JBoss, otherwise it might screw up client.

Requirements

.You need to copy the file concurrent.jar from xmlBlaster/lib to the system lib directory of JBoss, overwriting the older version distributed with JBoss.

When using the RMIDriver JBoss must be run with a security policy file specified, eg, sh run.sh -Djava.security.policy=../server/default/conf/server.policy.

Local clients

It is possible to use local client (in vm) clients by specifying a jndiName where a @link { org.xmlBlaster.j2ee.util.GlobalLookup} will be bound. If a client in the same VM looks this object upp through jndi, it will have access to the server engine.Global, and it is therefore possible to use the in vm client protocol.

Version:
$Revision: 1.9 $ $Date: 2006-03-07 19:26:23 +0000 (Tue, 07 Mar 2006) $
Author:
Peter Antman

Field Summary
private  java.util.Properties args
           
private  EmbeddedXmlBlaster blaster
           
private  Global glob
           
private  GlobalUtil globalUtil
           
private  java.lang.String jndiName
           
private static java.util.logging.Logger log
           
private static java.lang.String ME
           
private  java.lang.String propFile
           
 
Constructor Summary
XmlBlasterService()
           
 
Method Summary
 void bind(javax.naming.Context ctx, java.lang.String name, java.lang.Object val)
           
private  void bind(ServerScope engineGlobal)
          Bind a GlobalLookup into jndi.
 java.lang.String dumpProperties()
           
 java.lang.String getJNDIName()
           
 java.lang.String getPort()
           
 java.lang.String getPropertyFileName()
           
private  void loadJacorbProperties()
          Jacorb is not capable of finding its jacorb.properties in the context classpath (actually it uses the system classloader.
 void setJNDIName(java.lang.String jndiName)
          Set a JNDI name where a GlobalUtil will be bound.
 void setPort(java.lang.String port)
          Set the bootstrap port the instance should run at.
 void setPropertyFileName(java.lang.String fileName)
          Set the name of a propertyfile to read settings from.
 void start()
          Start the embedded XmlBlaster.
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private static final java.lang.String ME
See Also:
Constant Field Values

blaster

private EmbeddedXmlBlaster blaster

glob

private Global glob

propFile

private java.lang.String propFile

log

private static java.util.logging.Logger log

jndiName

private java.lang.String jndiName

args

private java.util.Properties args

globalUtil

private GlobalUtil globalUtil
Constructor Detail

XmlBlasterService

public XmlBlasterService()
Method Detail

setPropertyFileName

public void setPropertyFileName(java.lang.String fileName)
Set the name of a propertyfile to read settings from.

if this option is set, all properties specifyed in it will overwrite any properties sett on this MBean, since the file will be loaded last.

The context classloader will be searched first, then normal XmlBlaster search algoritm will be used.

Specified by:
setPropertyFileName in interface XmlBlasterServiceMBean

getPropertyFileName

public java.lang.String getPropertyFileName()
Specified by:
getPropertyFileName in interface XmlBlasterServiceMBean

setPort

public void setPort(java.lang.String port)
Set the bootstrap port the instance should run at.

Specified by:
setPort in interface XmlBlasterServiceMBean
Parameters:
port - Default bootstrapPort is 3412

getPort

public java.lang.String getPort()
Specified by:
getPort in interface XmlBlasterServiceMBean

setJNDIName

public void setJNDIName(java.lang.String jndiName)
Set a JNDI name where a GlobalUtil will be bound.

Specified by:
setJNDIName in interface XmlBlasterServiceMBean

getJNDIName

public java.lang.String getJNDIName()
Specified by:
getJNDIName in interface XmlBlasterServiceMBean

start

public void start()
           throws java.lang.Exception
Start the embedded XmlBlaster.

Specified by:
start in interface XmlBlasterServiceMBean
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface XmlBlasterServiceMBean
Throws:
java.lang.Exception

dumpProperties

public java.lang.String dumpProperties()
Specified by:
dumpProperties in interface XmlBlasterServiceMBean

bind

private void bind(ServerScope engineGlobal)
           throws java.lang.Exception
Bind a GlobalLookup into jndi.

Throws:
java.lang.Exception

loadJacorbProperties

private void loadJacorbProperties()
                           throws java.lang.Exception
Jacorb is not capable of finding its jacorb.properties in the context classpath (actually it uses the system classloader. Remember that jacorb.properties is in xmlBlaster.jar.

Throws:
java.lang.Exception

bind

public void bind(javax.naming.Context ctx,
                 java.lang.String name,
                 java.lang.Object val)
          throws javax.naming.NamingException
Throws:
javax.naming.NamingException

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.