Hello everyone. I'm trying to create two builds of my project, one for production and one for development. What I want to do is deploy both .ear files in the same server. The two builds will have different xml descriptors that give the ejb's different jndi-names for the two deployments. But what happens is that when I deploy both apps, they both use the ejb's of whichever app was deployed first.
Here's part of my xml files
ejb-jar (1)
<ejb-name>Stats</ejb-name>
com.sark.sarkffl.ejb.stats.StatsHome
com.sark.sarkffl.ejb.stats.Stats
<ejb-class>com.sark.sarkffl.ejb.stats.StatsBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<ejb-ref-name>ejb/Schedule</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
com.sark.sarkffl.ejb.schedule.ScheduleHome
com.sark.sarkffl.ejb.schedule.Schedule
<ejb-link>Schedule</ejb-link>
</ejb-ref>
jboss (1)
<ejb-name>Stats</ejb-name>
<jndi-name>sarkfflEJB/Stats</jndi-name>
ejb-jar (2)
<ejb-name>StatsDev</ejb-name>
com.sark.sarkffl.ejb.stats.StatsHome
com.sark.sarkffl.ejb.stats.Stats
<ejb-class>com.sark.sarkffl.ejb.stats.StatsBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<ejb-ref-name>ejb/Schedule</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
com.sark.sarkffl.ejb.schedule.ScheduleHome
com.sark.sarkffl.ejb.schedule.Schedule
<ejb-link>ScheduleDev</ejb-link>
</ejb-ref>
jboss (2)
<ejb-name>StatsDev</ejb-name>
<jndi-name>sarkfflEJBDev/StatsDev</jndi-name>
Servlet (1)
calls lookup("sarkfflEJB/Stats");
Servlet (2)
calls lookup("sarkfflEJBDev/StatsDev");
Why do I get the same ejb when called by either app?