Sorry if my previous post was not clear enough.
I suggested to change the code as follows:
| public void connect()
| {
| try
| {
|
| System.out.println("Now looking up session bean " + jndiName + "
...");
| java.util.Hashtable properties = new java.util.Hashtable();
| properties.put(Context.PROVIDER_URL,"localhost:1099");
|
properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
| properties.put("java.naming.rmi.security.manager", "yes");
| javax.naming.Context context = new javax.naming.InitialContext(properties);
|
| Object beanHomeRef
| = context.lookup(jndiName);
|
| System.out.println("got it");
| LoanCalculatorHome home =
| (LoanCalculatorHome)PortableRemoteObject.narrow
| (beanHomeRef, LoanCalculatorHome.class);
| loanCalculator = home.create();
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151587#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...