I've prepared an Eclipse project, with JBoss IDE Packaging configuration for an EAR file that deploys a portlet instance of the "Guess a Number" sample application from the jboss seam source.
It works with the following configuration: JBoss AS 4.0.4RC1 from source in JDK 1.5 JBoss Portal 2.4 from source ( it might work with 2.2.x also ) JBoss SEAM latest from source JBoss EJB3 implementation (part of AS 4.0.4RC1) JBoss jBPM as packaged in SEAM (jBPM 3.1.1) Facelets and MyFaces as deployed in Portal 2.4 for administration. The key differences between this and the standard Guess a Number sample application are in the following areas: 1) View pages I've re-tagged the view pages as Facelet based view definitions instead of JSP based view definitions. 2) Bean implementation I've changed the numberGuess class to be EJB3 Bean based. It is packaged in a sample-portlet-bean.jar for demonstration purposes. 3) Packaging configuration All of the standard JBoss and JSR 168 portlet descriptors are included in the packaging. It is packaged as an EAR file - with a single bean JAR, and and a single web app WAR file. The jboss-seam.jar file is packaged in the EAR file, along with the jBPM-3.1.1.jar file and both are classpath'ed in the MANIFEST.MF that is packaged in the WAR and JAR files. The full packaging-build.xml for JBoss IDE is included in the Eclipse project. You will need to adjust the paths for your local install of Seam and also the library references will need to be adjusted for your local JBoss install. 4) Changes to faces-config.xml The following faces-config.xml changes are necessary: | <!-- Facelet Portlet View Handler --> | <!-- Critical for Facelet Portal Support --> | <application> | <view-handler> | com.sun.facelets.FaceletPortletViewHandler | </view-handler> | </application> | | <!-- JSF Phase Listener for SEAM based Portlets --> | <!-- Install's Seam Contextual compoent support for Portlet --> | <!-- Critical difference from standard Seam Application --> | <!-- deployment. --> | <lifecycle> | <phase-listener> | org.jboss.seam.jsf.SeamPortletPhaseListener | </phase-listener> | </lifecycle> | And the following changes were made in web.xml to allow for both the switch to an EJB3 based logic layer : | <!-- JNDI name pattern for EJB3 (change for other servers) --> | <context-param> | <param-name> | org.jboss.seam.core.init.jndiPattern | </param-name> | <param-value> | sample-portlet/#{ejbName}/local | </param-value> | </context-param> | And the following change - commenting out the the StartupServletContextListener - is the only other difference from a standard Seam web.xml configuration. | <!-- MyFaces Context Listener - | Commented out because Portal | Loads this Context Listener | <listener> | <listener-class> | org.apache.myfaces.webapp.StartupServletContextListener | </listener-class> | </listener>--> | I have posted the project to box.net for now (I am out of town, and can't get at my machine to post it on my own server). http://www.box.net/public/5stdsud5f3 If there is a JBoss.org location for something like this, I can also post it there. Outside of that - if you can't access it from box.net - let me know and I'll find another way to get it to you. Thanks View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3943363#3943363 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3943363 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user