tags:

views:

67

answers:

0

I have a single set of EJB code that I want to deploy multiple times with different resources.

Currently, the code looks something like (oversimplified):

@Stateless
public class Bean implements BeanLocal {
    @Resource(mappedName="stateBean")
    private StateBean state;
}

Now, I want to be able to deploy the code once, and create different MBean instances that reference stateBean/Project1 and stateBean/Project2.

How would I do this via something like a ejb-jar.xml or another XML file that I can deploy at run-time for each instance I want to bring up?