I have made the following code change (see statement in bold), because the expression
involving = new InitialContext() should in my opinion follow the proerties settings,
however that didn't solve the problem.
kahzoo-san; do you mean the statement should be:
Object beanHomeRef = context.lookup();
or should I use ?
InitialContext=jndiContext = new InitialContext(properties);=======
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);
| InitialContext jndiContext = new InitialContext();
| Object beanHomeRef
| = jndiContext.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=4151304#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...