anonymous wrote : Re: "EJB3 will throw an exception if you have to EJBs with 
the same EJB name in the same EAR."

Not currently.  Instead, the application starts up perfectly -- without 
exception, error, or warning.  Two beans with the *same* JNDI are printed in 
the log:


  | 18:36:27,841 INFO  [Component] Component: ManagerLogin, scope: 
CONVERSATION, type: STATEFUL_SESSION_BEAN, class: 
com.removed.web.manager.LoginImpl, JNDI: hh-test/LoginImpl/local
  | 18:36:27,903 INFO  [Component] Component: CommerceLogin, scope: 
CONVERSATION, type: STATEFUL_SESSION_BEAN, class: 
com.removed.web.commerce.LoginImpl, JNDI: hh-test/LoginImpl/local
  | 

The application starts up fine.  The above logged conflict is ONLY revealed at 
runtime when Seam throws:  "value found for In attribute has the wrong type: 
LoginImpl".

anonymous wrote : Re: "You would not really have noticed"

Well, it would have been coded differently to be sure.

I can come up with a naming convention to work around this but it has to be 
better than constantly duplicating the name:

@Stateful(name="ManagerLogin")
@Name("ManagerLogin")

I was already using a prefixing convention on @Name to avoid duplication, and 
that's fine.  It's very similar conceptually to avoiding duplication in @Entity.

However, with this new resolution method I have to avoid duplication by 
convention *twice*.

If Seam could allow an empty @Name() and resolve the name from 
@Stateful/Stateless, that would at least allow convention to continue in a 
similar fashion.

Not withstanding any of the above suggestions, an exception or prominent 
warning does need to get raised if a Component with the same JNDI path as 
another Component is registered.  This would at least allow me to catch the 
conflicts at startup rather than runtime, and I wouldn't feel like I was 
potentially creating a bunch of runtime-only exceptions.

Thanks for hearing this out.

Ryan

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922480


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to