-
1. Re: Get a Seam in an EJB module From a WAR module
hasan_muhstaq Feb 22, 2008 12:34 AM (in response to sebdoncker)can u please provide more details
- stacktrace
- seam version
- jboss as version
- using jboss tools??are u sure ur application is correctly deployed on the server?
-
2. Re: Get a Seam in an EJB module From a WAR module
sebdoncker Feb 23, 2008 12:57 AM (in response to sebdoncker)I use JBoss 4.2.2.GA and Seam 2.0.1.GA (and JBoss Tools 2.0.0.GA).
My apps seam well deployed because I can access my Stateless Session Bean with a
<jsp:useBean>
tag (without use Seam).My problem is to access my stateless session using Seam with a
#{test.action}
EL code.Here is my code :
In an EJB module (deployed as a jar archive in JBoss), I have the following very simple session bean :
@Stateless @Name("test") public class TestBean implements Test { public void action() { System.out.println("action called !"); } }
And in a web module (deployed as a war archive in JBoss), I have an xhtml page (generated by JBoss Tools New Action Seam dialog) with this tag :
<h:commandButton id="test" value="test!" action="#{test.action}"/>
When I deploy and execute this xhtml page and when I click on the button, Seam generate an Exception with the following explanation :
Target Unreachable, identifier 'test' resolved to null
If I compound the ejb module and the web module in an EAR archive, the code works well but I loved to get independant modules (EJB or Web) communicates themselves via Seam...
Do you think it's possible ?
My both modules use the same persistence context but I haven't Entity bean in this example so I think this is not involved in the problem.
-
3. Re: Get a Seam in an EJB module From a WAR module
bje990 Mar 20, 2008 9:58 PM (in response to sebdoncker)I'm wondering if anybody had figured this out yet?
-
4. Re: Get a Seam in an EJB module From a WAR module
pmuir Mar 26, 2008 10:14 AM (in response to sebdoncker)Please clarify the packaging structure used. Seam uses JNDI to lookup the EJB3, and additionally needs the class on the classpath. If you provide the correct jndiPattern or @JndiName it should then work. N.B. Seam has no support for remote EJBs
-
5. Re: Get a Seam in an EJB module From a WAR module
deanhiller2000 Oct 23, 2008 10:14 PM (in response to sebdoncker)Are there instructions for this anywhere? I have a war file that I deploy to tomcat today, and that war file currently has my EJB3 jar file(which has it's seam.properties in it so seam finds the components in that jar file as well as the WEB-INF/classes).
I now want to do exactly the same thing. I want to rip that jar file out of my WEB-INF, move to JBoss, deploy my jar file as a service to two war files.
Are there instructions for this anywhere on how this all works? I am going to read the EJB3 TrailBlazer here
TRAIL BLAZERbut what about deployment of war files. What do I change in those guys to make them lookup the EJB3 now? Are there any examples that have this working?
thanks,
Dean