[jboss-user] [JBoss Seam] - JNDI Problem ?
ChristopheA
do-not-reply at jboss.com
Mon Jun 18 12:58:44 EDT 2007
Hi.
I have the following problem...
I'm using 2 session beans, with same class name, but different packages :
| package evenium.ejb3.test.example1;
|
| ...
|
| @Stateful
| @Name("test.example1.search")
| @Scope(ScopeType.SESSION)
| public class SearchAction implements Search
| {
| ...
| }
|
| package evenium.ejb3.test.example2;
|
| ...
|
| @Stateful
| @Name("test.example2.search")
| @Scope(ScopeType.SESSION)
| public class SearchAction implements Search
| {
| ...
| }
|
When I call one of them from a view, I get something like :
| GRAVE: Error Rendering View[/example2/search.xhtml]
| org.jboss.seam.InstantiationException: Could not instantiate Seam component: test.example2.search
| ...
| Caused by: javax.naming.NameNotFoundException: local not bound
|
During JBoss AS startup, the two components seem to be loaded :
|
| INFO [Component] Component: test.example1.search, scope: SESSION, type: STATEFUL_SESSION_BEAN, class: evenium.ejb3.test.example1.SearchAction, JNDI: Global_EAR_Project/SearchAction/local
|
| ...
|
| INFO [Component] Component: test.example2.search, scope: SESSION, type: STATEFUL_SESSION_BEAN, class: evenium.ejb3.test.example2.SearchAction, JNDI: Global_EAR_Project/SearchAction/local
|
|
Except they have identical JNDI names...
If a rename one of the two beans (let's say : SearchActionX), everything runs fine... I imagine I could also use @JndiName for every bean - somehow tedious.
In my components.xml I have :
<core:init jndi-pattern="PhaseII_Global_EAR_Project/#{ejbName}/local" debug="true"/>
Shouldn't #{ejbName} be replaced by qualified class name ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055310#4055310
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055310
More information about the jboss-user
mailing list