EasyBeans is an open source implementation by ObjectWeb of the EJB3 container specification. 
X Wiki

6.2. Running the Client

The smart factory is configured through two properties.

6.2.1. Initial Context Factory

The first property is the InitialContextFactory name. The smart factory is named org.ow2.easybeans.component.smartclient.spi.SmartContextFactory.

This property can be set as a System property in one of the following ways:

  • by using -Djava.naming.factory.initial=org.ow2.easybeans.component.smartclient.spi.SmartContextFactory

  • by using System.setProperty(Context.INITIAL_CONTEXT_FACTORY, org.ow2.easybeans.component.smartclient.spi.SmartContextFactory)

It can also be used as a parameter when creating an InitialContext:

        Hashtable<String, Object> env = new Hashtable<String, Object>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, org.ow2.easybeans.component.smartclient.spi.SmartContextFactory);
        return new InitialContext(env);

6.2.2. Provider URL

This property is used to provide the remote address and the remote port.

By default, this property is set (if not defined) to smart://localhost:2503

The port number must match the port defined in the EasyBeans configuration file.

This property can be set using:

        Hashtable<String, Object> env = new Hashtable<String, Object>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, org.ow2.easybeans.component.smartclient.spi.SmartContextFactory);
        env.put(Context.PROVIDER_URL, "smart://localhost:2503");
        return new InitialContext(env);
Copyright © 2006 EasyBeans / ObjectWeb consortium

http://www.easybeans.org