Hi, i have a simple service like this (mymbean-service.xml):
MY_JNDI_NAME
jboss:service=Naming
my start method (for the mbean) looks something like this:
Context rootCtx = new InitialContext();
try {
Name fullName = rootCtx.getNameParser("").parse(jndiName);
NonSerializableFactory.rebind(fullName, getObjectToBind(), true);
} finally {
rootCtx.close();
}the service file looks like this (without lt, gt signs...):
mbean name="mybean" code="my.package.MyClass"
attribute name="jndiName" MY_JNDI_NAME
depends jboss:service=Naming