JBoss Version: 4-0.3SP1
OS: Mandrake Linux 2006
JDK: 1.5
On the server I have deployed an MBean which binds an object into the JNDI name space
as follows:
StdSchedulerFactory schedulerFactory = new StdSchedulerFactory(); Scheduler scheduler = schedulerFactory.getScheduler(); InitialContext ctx = new InitialContext(); ctx.rebind(SchedulerConstants.DEFAULT_SCHEDULER_NAME,scheduler);
Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties.put(Context.PROVIDER_URL, "localhost:1099"); properties.put(Context.URL_PKG_PREFIXES,"org.jboss.naming"); InitialContext iniCtx = new InitialContext(properties); Scheduler schedObj = (Scheduler) iniCtx.lookup(SchedulerConstants.DEFAULT_SCHEDULER_NAME);
public Reference getReference(){ Reference retVal = new Reference( "StdScheduler", "StdSchedulerFactory", null); log.info("Returning reference"); return retVal; }