Couldn't get ManagementHome and getting exception "ejb not bound"...
My program is like the below.

 -----------------------------------
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
props.put(Context.SECURITY_PRINCIPAL, "");
props.put(Context.SECURITY_CREDENTIALS, "");
try{
InitialContext context= new InitialContext(props);
Object o = context.lookup( "ejb/mgmt/MEJB" );
ManagementHome home =  (ManagementHome) 
PortableRemoteObject.narrow(o,ManagementHome.class);
Management mejb = home.create();
ObjectName searchpattern = new ObjectName(args[1]);
Set managedObjects = mejb.queryNames(searchpattern,null);
System.out.println(  "Found " +  managedObjects.size() +  " matching Managed 
Objects.");
}catch(Exception ee){
System.out.println("Error: -> "+ee.getMessage());
}
---------------------------------

Pl. help me. 

Thanks


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852898#3852898

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852898


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to