After some further investigation, I saw sth. very interesting:

  | EjbOfPartnerHome home1 = 
EjbOfPartnerUtil.getHome(getInitCtxProps(partner1));
  | EjbOfPartner ejbOfPartner1 = home1.create();
  | EjbOfPartnerHome home2 = 
EjbOfPartnerUtil.getHome(getInitCtxProps(partner2));
  | EjbOfPartner ejbOfPartner2 = home2.create();
  | EjbOfPartnerHome home3 = 
EjbOfPartnerUtil.getHome(getInitCtxProps(partner3));
  | EjbOfPartner ejbOfPartner3 = home3.create();
Even though, home1, home2 and home3 are all different objects, the above 
create() methods return every time the same instance of EjbOfPartner - i.e. 
ejbOfPartner1 == ejbOfPartner2 == ejbOfPartner3. And this happens, even though 
my initial-context-properties are different! To be more precise, these 
properties look like this:
Properties props = new Properties();
  | props.put(InitialContext.INITIAL_CONTEXT_FACTORY, initialContextFactory);
  | props.put(InitialContext.PROVIDER_URL, initialContextURL);
  | props.put(InitialContext.SECURITY_PRINCIPAL, username);
  | props.put(InitialContext.SECURITY_CREDENTIALS, password);
  | props.put(InitialContext.SECURITY_PROTOCOL, "jfire");
The two properties InitialContext.SECURITY_PRINCIPAL and 
InitialContext.SECURITY_CREDENTIALS differ while the others are the same.

Is there any possibility to force JBoss to create different EJBs for different 
initial-context-properties? That might already solve my problem.

Best regards, Marco :-)

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069670#4069670

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069670
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to