-
1. Re: Q: Difference between the booking and the jee5-booking sample apps?
asookazian Jul 24, 2009 9:10 PM (in response to titou09)straight from the jee5 readme.txt:
Seam JEE5 Examples
=================
The examples in this directory showcases how to build Java EE 5 compliant Seam
applications. The application should run on all Java EE 5 compliant
application servers with minimal changes in code and configuration files. The
default build script builds a deployable EAR for GlassFish. See Seam reference
guide for instructions for other containers. -
2. Re: Q: Difference between the booking and the jee5-booking sample apps?
titou09 Jul 24, 2009 9:31 PM (in response to titou09)...and the difference with the
booking
application is ...?(ie does this mean the
booking
sample app is not jee5 compliant? or can only run in a je55 compliant AS only after a major changes? or the only difference is the build procedure?) -
3. Re: Q: Difference between the booking and the jee5-booking sample apps?
asookazian Jul 25, 2009 12:05 AM (in response to titou09)Without actually looking at the code and/or doing a diff in Eclipse, I'd say that the booking app is written for JBoss AS whereas the JEE5 version is for other app servers. Very simple. If I'm wrong, somebody explain.
what's interesting is this, for example, from the JEE5 HotelBookingAction class:
@Stateful @Name("hotelBooking") @Restrict("#{identity.loggedIn}") public class HotelBookingAction implements HotelBooking, Serializable { @PersistenceContext(type=EXTENDED) private EntityManager em; ... }
1) The SFSB implemenation class implements java.io.Serializable which is unusual and probably unnecessary.
Clarified that stateful session beans are not required to implement Serializable.source: JSR220-simplified
2) They're using @PersistenceContext(type=EXTENDED) rather than @In. Why? This means the PC is component-scoped and not conversation-scoped.
-
4. Re: Q: Difference between the booking and the jee5-booking sample apps?
titou09 Jul 25, 2009 12:30 AM (in response to titou09)So you don't know the answer Arbi...
Thanks for trying but I'm wondering why you posts 2 messages without answering the question nor giving any valuable information.
The question is still open.
Anyone else?
-
5. Re: Q: Difference between the booking and the jee5-booking sample apps?
asookazian Jul 25, 2009 1:39 AM (in response to titou09)
41.2. The jee5/booking example
The jee5/booking example is based on the Hotel Booking example (which runs on JBoss AS). Out of the box it is also designed to run on GlassFish. It is located in $SEAM_DIST/examples/jee5/booking.http://docs.jboss.org/seam/latest/reference/en-US/html/glassfish.html
There is a booking and remoting directory inside the jee5 directory.
Contents of helloworld.xhtml:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:s="http://jboss.com/products/seam/taglib"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Seam Remoting - Hello World Example</title> </head> <body> <h1>Seam Remoting - Hello World Example</h1> <p> </p> <s:remote include="helloAction"/> <script type="text/javascript"> //<![CDATA[ function sayHello() { var name = prompt("What is your name?"); Seam.Component.getInstance("helloAction").sayHello(name, sayHelloCallback); } function sayHelloCallback(result) { alert(result); } // ]]> </script> <button onclick="javascript:sayHello()">Say Hello</button> </body> </html>
So in jee5, you have two apps (booking and remoting) instead of only one in the booking example.
HTH.