Hi all,

I am currently working in a team developing an enterprise application. We
are evaluating the IONA iPortal AppServer.
I have a test environment with 1 stateless sessionbean referencing 1
entitybean. Apparently, a client has to set environment properties before
you can get the Initial context and thus the sessionbean. I have tested
this, and this is correct.
The docs state that a (session)bean referencing another bean can just create
an initial context without any properties. This is exactly what I am doing
in my bean code, but it just doesn't work. I get a nullpointer exception in
some internal IONA classes (at a PortableRemoteObject.narrow method).

Has anyone encountered the same or a similar problem?
Is anyone of you using the IONA iPortal Appserver? If so, what do you think
of it?

Here is some of my code:

(in a util class)
public static Object lookup(String jndiName)
{
        Object obj = null;
        try
        {
                InitialContext initial = new InitialContext();
                obj = initial.lookup(jndiName);
        }
        catch (NamingException ne)
        {
                System.err.println(ne);
        }
        return obj;
}

(in my sessionbean)
public EmployeeModel createEmployee(EmployeeModel eModel) throws
CreateException
{
        try
        {
                Object obj = EJBUtil.lookup(JNDINames.EMPLOYEE_EJB_HOME);
                EmployeeHome eHome =
(EmployeeHome)javax.rmi.PortableRemoteObject.narrow(obj,
EmployeeHome.class);
                EmployeeRemote eRemote = eHome.create(eModel);

                return eRemote.getDetails();
        }
        catch (RemoteException re)
        {
                throw new EJBException(re);
        }
}



Kind regards & thanks for any help,

Jonathan van Alteren

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to