Hi Marko,

> I need to write a mailet that communicates with EJBs residing on
> Jboss. Does anyone know how to do this?

You should be able to connect to any J2EE server just as your code would run
in a standard standalone application. So doing something like this:

import javax.naming.Context;
import javax.naming.InitialContext;

Hashtable environment = new Hashtable(2);
environment.put(Context.PROVIDER_URL,
                "iiop://localhost:900/");
environment.put(Context.INITIAL_CONTEXT_FACTORY,
                "com.ibm.websphere.naming.WsnInitialContextFactory");
Context context = new InitialContext(environment);

Where you have to provide the provider url and initial context factory that
suit your server setup. The properties used above are for IBM WebSphere Test
Environment.

Then you have a context and can call context.lookup(<JNDI name of your
EJB>); to access your EJB.

I don't think there'd be something special about accessing EJBs from inside
JAMES than from anywhere else.

HTH,
Thomas


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to