[JBoss Seam] - Seam URLs and request processing
by dpocock
Hi, previously I have been using Struts and am now considering using Seam for my web applications.
In Struts, the requested URL is used to find an action in the struts-config.xml (controller configuration), and Struts then invokes my Action class and finally displays the JSP or other view component.
In Seam/JSF, how does this logic work? I've looked at the Jave 5 EE tutorial on JSF, and the model they have for request processing, but it makes no mention of Seam.
Can someone help us former Struts users by explaining some of these issues:
a) when I go to a Seam URL, e.g. seam-registration/register.seam, is the URL processed by JSF or by Seam?
b) for the register.seam URL, does JSF/Seam simply look for a JSP file with the same name, e.g. does it look for register.jsp, or if I put the URL help.seam, does it look for help.jsp? Or is there some more complicated decision making that helps it decide which page to use or which bean to invoke?
c) is there any direct relationship between the Seam component names (e.g. the session bean annotated with @Name("register")) and the URL /register.seam?
d) I notice that for the dvd.xhtml page in the DVD example, you explicitly point to an action by using the pages.xml - but for other pages, you have nothing in pages.xml. Why is it that you have to explicitly put this code in pages.xml for some pages and not for others?
e) Could someone possibly add a section to the Seam documentation to discuss the URLs, and what the average developer needs to know about the relationship between a URL ending in .seam and the underlying beans and JSP.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964064#3964064
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964064
19 years, 9 months
[EJB/JBoss] - RMI & EJB Problem
by bluetrade
Hi,
I have a problem with RMI and a stateless EJB.
I got a Client GUI, Client IF (annotated with @Remote), and Client Impl. On the server side I have a stateless (@Stateless) component that implements a ServerInterface (via @Remote). When the client contacts the server and passes itself (via this) to the server, the server should invoke a method to update the GUI, however it seems as if everything is done on the server, i.e. as if a copy of the client is transmitted, because all the client output is visible on the server - I had some strange behavior with NullPointers and noticed that actually since the GUI class was serializable it must have tried to invoke the stuff on the server side as well, now i removed the serializable and of course get some marshalling exceptions...
Can you point me at some code that shows how something like this is usually done such that the server really invokes something on the client? Do you know what I am doing wrong?
Thanks
Joey
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964063#3964063
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964063
19 years, 9 months
[EJB 3.0] - RMI and EJB Problem
by bluetrade
Hi,
I have a problem with RMI and a stateless EJB.
I got a Client GUI, Client IF (annotated with @Remote), and Client Impl. On the server side I have a stateless (@Stateless) component that implements a ServerInterface (via @Remote). When the client contacts the server and passes itself (via this) to the server, the server should invoke a method to update the GUI, however it seems as if everything is done on the server, i.e. as if a copy of the client is transmitted, because all the client output is visible on the server - I had some strange behavior with NullPointers and noticed that actually since the GUI class was serializable it must have tried to invoke the stuff on the server side as well, now i removed the serializable and of course get some marshalling exceptions...
Can you point me at some code that shows how something like this is usually done such that the server really invokes something on the client? Do you know what I am doing wrong?
Thanks
Joey
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964062#3964062
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964062
19 years, 9 months
[EJB 3.0] - Mixing annotation and deployment descriptors
by MarcReis
AFAIK, it is possible to mix(overwrite) annotations and deployment descriptors according to the spec.
I have a bunch of SLSB and SFSB which all are annotated. I now want to move them in a clustered environment, and so wrote a tiny tool that generates a jboss.xml file which mainly adds the
<clustered> True </clustered> element. Unfortunately its not behaving the way I expected. Is there a document somewhere that describes the dependencies (if there are any) for/between the deployment descriptors (ejb-jar.xml, jboss.xml) and the annotations? I guess I am simply missing something, but I did not see it in the doc?s (ejb3, ejb3 tut, AS 404 doc, wiki), except the fact that some annotations cannot be overwritten. I did read on some site that the <ejb-name> needs to be defined in the ejb-jar.xml, prior before being able to use it in the jboss.xml (is this so ? do I have to do it this way ?).
I tried a couple of combinations adding or leaving out specific elements, but the app did not become available through the cluster (other apps do work clustered, but there all annotated.).
Sincerely
here a shot from the generated file:
| <jboss>
| <enterprise-beans>
| <session>
| <ejb-name>AnzBBean</ejb-name>
| <ejb-class>de.somewhere.medien.ejbean.AnzBBean</ejb-class>
| <clustered>true</clustered>
| <cluster-config>
| <partion-name>DefaultPartition</partion-name>
| <bean-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</bean-load-balance-policy>
| </cluster-config>
| </session>
| <session>
| ....
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964059#3964059
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964059
19 years, 9 months