Author: dan.j.allen
Date: 2009-05-11 16:28:18 -0400 (Mon, 11 May 2009)
New Revision: 10862
Modified:
examples/trunk/booking/readme.txt
Log:
take out -o flags (since it will cause build to break for those without a seeded M2
repository)
move dev notes to WORKLOG file
Modified: examples/trunk/booking/readme.txt
===================================================================
--- examples/trunk/booking/readme.txt 2009-05-11 20:16:02 UTC (rev 10861)
+++ examples/trunk/booking/readme.txt 2009-05-11 20:28:18 UTC (rev 10862)
@@ -1,5 +1,5 @@
-Seam Booking Example (Java EE 5)
-================================
+Seam Booking Example (Java EE Environment)
+==========================================
This example demonstrates the use of Seam 3 in a Java EE 6 environment (or a
Java EE 5 environment enhanced with JSR-299 [Web Beans], JSF 2.0 and Bean
@@ -23,11 +23,14 @@
= First steps
-This example uses a Maven 2 build. To build the EJB and WAR and package them
-inside an EAR, execute the following command:
+This example uses a Maven 2 build. The recommended version is 2.0.10. You can
+use Maven 2.1.0, but know that the maven-cli-plugin recommended in this
+tutorial is not compatible with it out of the box.
- mvn
+Execute this command to build the EJB and WAR and package them inside an EAR:
+ mvn install
+
Now you're ready to deploy.
= Pointing Maven at your JBoss AS installation
@@ -86,20 +89,20 @@
Putting JBOSS_HOME aside for the moment, you can deploy the application to
JBoss AS via JMX by executing this command:
- mvn -o -f seam-booking-ear/pom.xml jboss:deploy
+ mvn -f seam-booking-ear/pom.xml jboss:deploy
You can undeploy the application via JMX using this command:
- mvn -o -f seam-booking-ear/pom.xml jboss:undeploy
+ mvn -f seam-booking-ear/pom.xml jboss:undeploy
Here's the chained restart command via JMX:
- mvn -o -f seam-booking-ear/pom.xml jboss:undeploy && mvn -o package &&
mvn -o -f seam-booking-ear/pom.xml jboss:deploy
+ mvn -f seam-booking-ear/pom.xml jboss:undeploy && mvn package && mvn -f
seam-booking-ear/pom.xml jboss:deploy
If you would rather deploy more traditional way by copying the archive directly
to the deploy directory of the JBoss AS domain, use this command instead:
- mvn -o -f seam-booking-ear/pom.xml jboss:harddeploy
+ mvn -f seam-booking-ear/pom.xml jboss:harddeploy
But likely during development, you're only interested in exploded archives.
@@ -109,7 +112,7 @@
smarter about what it copies to the server. The antrun plugin is bound to the
end of the package goal when the explode profile is active:
- mvn -o package -Pexplode
+ mvn package -Pexplode
This profile executes an series of Ant tasks that copy the exploded WAR,
EJB-JAR, and EAR to the JBoss AS deploy directory.
@@ -117,21 +120,22 @@
You can force a restart of the application by activating the restart profile,
which executes an Ant task bound to the validate phase:
- mvn -o validate -Prestart
+ mvn validate -Prestart
You can remove the archive by activating the undeploy profile, which also
executes an Ant task bound to the validate phase:
- mvn -o validate -Pundeploy
+ mvn validate -Pundeploy
Finally, you can undeploy and explode all in one command using both the
undeploy and explode profiles with a standard package build:
- mvn -o package -Pundeploy,explode
+ mvn package -Pundeploy,explode
-Note that the -o puts Maven in offline mode so that it doesn't perform time
-consuming update checks. The -o flag is included in the aliases configured for
-the Maven CLI plugin documented above.
+Note that you can append -o to any command after you have run the command at
+least once. This flag puts Maven in offline mode so that it doesn't perform
+time consuming update checks. You can also include -o flag in the aliases
+configured for the Maven CLI plugin documented above.
= Example highlights
@@ -141,65 +145,9 @@
- JBoss datasource is deployed with the EAR to simplify packaging
(-ds.xml doesn't have to be deployed to JBoss AS separately)
- supports both a packaged and exploded deployment to JBoss AS
+- Authentication with Seam Security by implementing the Authenticator interface
= Known issues
-(1) Clicking on logout throws an exception
- javax.context.ContextNotActiveException: No active contexts for scope type
javax.context.RequestScoped
- at org.jboss.webbeans.ManagerImpl.getContext(ManagerImpl.java:739)
- at
org.jboss.webbeans.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:116)
- at
org.jboss.webbeans.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:96)
- at
org.jboss.webbeans.conversation.ConversationImpl_$$_javassist_213.isLongRunning(ConversationImpl_$$_javassist_213.java)
+See WORKLOG
-(2) Ajax is not working on blur in p:edit form fields (had to disable)
- error malformedXML
-
-(3) No list of workspaces
-
-(4) Cannot use <f:view> in template or else it will remove the conversation id
token from the view root
-
-(5) @AfterTransactionSuccess observer does not work
-
-(6) Can't read properties from Hotel object in history list. Get this exception:
- javax.inject.IllegalProductException: Cannot return null from a non-dependent
producer method
- at
org.jboss.webbeans.bean.AbstractProducerBean.checkReturnValue(AbstractProducerBean.java:209)
- at
org.jboss.webbeans.bean.AbstractProducerBean.create(AbstractProducerBean.java:349)
- at org.jboss.webbeans.context.AbstractMapContext.get(AbstractMapContext.java:98)
- at
org.jboss.webbeans.bean.proxy.ClientProxyMethodHandler.getProxiedInstance(ClientProxyMethodHandler.java:117)
- at
org.jboss.webbeans.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:96)
- at
org.jboss.seam.examples.booking.model.Hotel_$$_javassist_227.getAddress(Hotel_$$_javassist_227.java)
-
-= Open questions
-
-- How do I clear a contextual bean from a scope, in particular the session scope?
I've had to do workarounds.
-
-- How do I inject an Event object into a stateful component? I get an error that there is
a reference to a
- non-serializable object from a bean declaring a non-passivating scope. I have to use
the Manager to fire an event
- instead.
-
-- Should the parent project be adjacent to ear/ejb-jar/war?
-
-= TODO
-
-- secure pages (likely will use <f:event type="beforeRenderView"/>
-
-- get status messages from default or resource bundle (not just hardcoded defaults)
-
-- demonstrate use of exception handling in JSF 2
-
-- auto-detect which files have @NotNull or @NotEmpty to determine whether to put the * in
<p:edit>
-
-- use Cargo plugin to support deployment to other Java EE servers (GlassFish)
-
-- refactor the password/confirm password into a reusable component (needed on
- registration and change password)
-
-- consider using unpackTypes in the ear plugin (which works incrementally) to replace
portions of the antrun logic
-
-- use a resource to define persistence context
-<EntityManager>
- <PersistenceContext>
- <unitName>booking</unitName>
- </PersistenceContext>
- <booking:BookingDatabase/>
-</EntityManager>
Show replies by date