From seam-commits at lists.jboss.org Mon May 12 15:20:19 2008
Content-Type: multipart/mixed; boundary="===============2877264228694286298=="
MIME-Version: 1.0
From: seam-commits at lists.jboss.org
To: seam-commits at lists.jboss.org
Subject: [seam-commits] Seam SVN: r8168 - in trunk: examples/jpa and 1 other
directories.
Date: Mon, 12 May 2008 15:20:19 -0400
Message-ID:
--===============2877264228694286298==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jbalunas(a)redhat.com
Date: 2008-05-12 15:20:19 -0400 (Mon, 12 May 2008)
New Revision: 8168
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Weblogic.xml
trunk/examples/jpa/build-weblogic10.xml
trunk/examples/jpa/resources-weblogic10/WEB-INF/web.xml
trunk/examples/jpa/resources-weblogic10/WEB-INF/weblogic.xml
Log:
JBSEAM-2482, JBSEAM-2592 - Major update to Weblogic reference guide chapter=
based on updates and changes related to Welogic EJB support. JPA example =
was also updated for the same reason.
Modified: trunk/doc/Seam_Reference_Guide/en-US/Weblogic.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/doc/Seam_Reference_Guide/en-US/Weblogic.xml 2008-05-12 19:01:55 U=
TC (rev 8167)
+++ trunk/doc/Seam_Reference_Guide/en-US/Weblogic.xml 2008-05-12 19:20:19 U=
TC (rev 8168)
@@ -4,84 +4,94 @@
Weblogic 10.X is BEA's JEE5 server offering, currently 10.0.MP1 =
is
their stable release, and 10.3.TP is their latest tech preview relea=
se.
Seam applications can be deployed and developed on Weblogic servers,=
and
- this chapter will show you how. There are some known issues with the=
Weblogic
- servers that will need to be worked around, and configuration change=
s that
- are needed.
+ this chapter will show you how. There are some known issues with the =
+ Weblogic servers that will need to be worked around, and configurati=
on =
+ changes that are needed.
=
First step is to get Weblogic downloaded, installed and running =
(no
small feat). Then we'll talk about Seam's JEE5 example and the hurdl=
es to
- getting it running, and what blockers exist. After that the JPA exam=
ple will
- be modified and deployed to the server. Then finally we will create
+ getting it running. After that, the JPA example will
+ be modified and deployed to the server. Then finally we will create a
seam-gen application and get it up and running to
- provide a jump start to your application.
+ provide a jump start to your own application.
=
Installation and operation of Weblogic
- First things first we need to get the server installed - and =
there is a
- choice to be made. Weblogic 10.0.MP1 is the most recent stable re=
lease,
- while 10.3.TP is a technical preview version that fixes some thin=
gs and
- breaks others.
+ First things first we need to get the server installed - and =
there =
+ is a choice to be made. Weblogic 10.0.MP1 is the most recent stab=
le =
+ release, while 10.3.TP is a technical preview version that fixes =
some =
+ things and breaks others.
Weblogic 10.0.MP1
—
+url=3D"http://commerce.bea.com/showproduct.jsp?family=3DWLS&major=3D10=
&minor=3D1">
Download page
10.0.MP1 has a known issue with EJBs that use
varargs in their methods (it confuses th=
em
as transient ). This causes exceptions
- when Weblogic attempts to compile the Seam EJBs as
- varargs are used. There seems to be no w=
ork
- around to this issue in 10.0.MP1. Because of this only the
- jpa and WAR based
- seam-gen examples work with this version.
- See the jee5/booking example for more
- details.
+ when Weblogic attempts to compile the Seam EJBs. There is =
a BEA =
+ support patch available to fix this issue, but BEA is curre=
ntly =
+ working on a second issue related to the EJBs. See the =
+ jee5/booking example for more details. <=
/para>
Weblogic 10.3.TP
—
+url=3D"http://commerce.bea.com/showproduct.jsp?family=3DWLS&major=3D10=
.3Tech&minor=3D-1&DL=3Dwww_WLS_10-3TechPreview_icon&WT.ac=3DDL_=
www_WLS_10.3_TechPreviewicon">
Download page
This version still has not fixed the
varargs bug, and there is a new issue wi=
th
EJBs that do not use kodo (BEA's
- implementation of JPA). See the
- jee5/booking example for more details.
- However if the varargs issue is going to=
get
- fixed it will most likely be an update to this version.
+ implementation of JPA). BEA has said that the vara=
rgs
+ issue will be resolved in the final version of 1=
0.3, =
+ but the kodo issue is a blocker for gett=
ing
+ the jee5/booking working.
+
=
- For the reasons listed above, and the fact that 10.3.TP gets =
us closer
- to the goal of Seam EJB3 support on Weblogic, 10.3.TP will be use=
d for the
- examples below.
+
+ Special jboss-seam.jar for Weblogic EJB =
+ Support
+ Starting with Seam 2.0.2.CR2 a special Weblogic specific j=
ar has
+ been created that does not contain the TimerServiceDispa=
tcher
+ . This is the EJB that uses varargs=
and =
+ exposes the second EJB issue. We will be using this jar for the =
+ jee5/booking example, as it avoids both known =
BEA =
+ issues.
+
+
=
- Installing 10.3.TP
+ Installing 10.0.MP1
=
- Here are the quick steps to installing Weblogic 10.3.TP. F=
or more
- details or if you are having any issues please check with the =
BEA docs
- at the Tech
- Preview Doc Center . Here we install the RHEL 5 versi=
on using
- the graphical installer:
- =
+
+ Here are the quick steps to installing Weblogic 10.1.MP1.
+ For more details or if you are having any issues please
+ check with the BEA docs at the
+
+ Weblogic 10.0 Doc Center
+
+ . Here we install the RHEL 5 version using the graphical
+ installer:
+
+
- Follow the link given above for 10.3.TP and download=
the
+ Follow the link given above for 10.0.MP1 and downloa=
d the
correct version for your environment. You will need to s=
ign up
for an account with BEA in order to do this.
You may need to change the the
- server103tp_XX.bin file to be
+ server1001_XX.bin file to be
executable:
- chmod a+x server103tp_XX.bin
+ chmod a+x server1001_XX.bin
Execute the install:
- ./server103tp_XX.bin
+ ./server1001_XX.bin
When the graphical install loads, you need to set th=
e BEA
@@ -89,7 +99,7 @@
installed. This location will be known as
$BEA_HOME in this document e.g.:
- /home/jbalunas/bea
+ /jboss/apps/bea
Select Complete as the
@@ -100,7 +110,7 @@
Then you need to tell it where to install the server
components:
- $BEA_HOME/wlserver_10.3tp
+ $BEA_HOME/wlserver_10.0
@@ -110,16 +120,16 @@
is a self contained server instance. The Weblogic server you j=
ust
installed has some example domains, but we are going to create=
one
just for the seam examples. You can use the existing domains i=
f you
- wish (modify the instructions as needed).
- =
+ wish (modify the instructions as needed). =
Start up the Weblogic configuration wizard:
- $BEA_HOME/wlserver_10.3tp/common/bin/config=
.sh
+ $BEA_HOME/wlserver_10.0/common/bin/config.sh
+
Choose to create a new domain, configured to support
- Weblogic Server TP. Note that this is
+ Weblogic Server. Note that this is
the default domain option.
@@ -142,9 +152,11 @@
How to Start/Stop/Access your domain
- Now that the server is installed and the domain is created=
you need
- to know how to start and stop it, plus how to access its confi=
guration
- console.
+
+ Now that the server is installed and the domain is created
+ you need to know how to start and stop it, plus how to
+ access its configuration console.
+
Starting the domain:
@@ -172,7 +184,7 @@
Select
- seam-examples on the
+ seam_examples on the
left hand side of the console.
@@ -225,95 +237,99 @@
=
- The jee5/booking example
+ The jee5/booking Example
=
- Do you want to run Seam using EJB's on Weblogic? If so there a=
re some
- blockers that keep it from working. This section describes what c=
hanges
- are needed to the jee5/booking example to get =
it as
- close to deploying as possible. First we'll talk about the blocke=
rs and
- what they effect.
- =
-
- EJB Blockers with Weblogic
- For several releases of Weblogic there has been an issue wi=
th
- compiling EJB's that use variable arguments in their methods. =
This
- is confirmed in the Weblogic 9.X and 10.X versions. We had hop=
ed that
- the issue would be resolved in the tech preview release, but i=
t is not.
- Seam uses variable arguments in its internal EJB's and so unti=
l this
- is fixed Seam with EJB's will not work.
- =
- The gist of the issue is that the Weblogic EJB compiler bel=
ieves
- that methods that use varargs are
- transient and the deployment will fail with
- exceptions like below:
- =
- =
+
+ Do you want to run Seam using EJB's on Weblogic? If so there
+ are some obstacles that you will have to avoid. This section
+ describes those obstacles and what changes are needed to the
+ jee5/booking
+ example to get it deployed and functioning.
+
+
+
+ EJB3 Issues with Weblogic
+
+ For several releases of Weblogic there has been an issue
+ with how Weblogic compiles EJB's that use variable arguments
+ in their methods. This is confirmed in the Weblogic 9.X and
+ 10.X versions. Seam uses variable arguments in one of its
+ internal EJB's (
+ TimerServiceDispatcher
+ ). So Seam will not function correctly without
+ modifications.
+
+
+
+ The basic explanation of the issue is that the Weblogic EJB
+ compiler believes that methods that use
+ varargs
+ are
+ transient
+ and the deployment will fail with exceptions like below:
+
- BEA says that this is a bug with Java specification. Sun admit=
s the
- issue, and provides a work around, and will not fix the core i=
ssue.
- =
-
-
-
- BEA forum — Discusses the issue and
- suggests waiting for a new release of 10.X
-
-
-
- BEA forum — Discusses response from BEA
- support and that BEA is saying it is an issue with th=
e spec
- with links to the bug.
-
-
-
- Sun bug report — Describes details of =
the
- issue, but says that it will not be fixed.
-
- So what does that mean to us? At least for now=
EJB's
- with variable arguments will not run on Weblogic.
- =
-
- Secondary issue with the Tech Preview
- A less severe issue is also present in the tech preview =
version
- of Weblogic. You can not use any JPA provider with EJB's ex=
cept for
- the default kodo or
- openJPA implementation. As you set up th=
is
- example you will run into this issue before the
- varargs problem. Unfortunately using
- kodo or openJPA does
- not help with the blocker described above but is important =
to
- know.
- =
- Other users have seen this issue with the tech preview a=
nd I
- would hope/expect that it will be fixed in future releases (
-
- BEA Forum). The forum entry has the exact stack tra=
ce,
- and the response from BEA.
-
+
+ BEA has created a patch (
+ CR327275
+ ) for this issue that can be requested from their
+ support. It is rumored that it will be included in the
+ final release of Weblogic 10.3, although not confirmed.
+
+
+ Unfortunately a second issue has been reported and
+ verified by BEA (
+ CR363182
+ ). This issue has to do with certain EJB methods
+ incorrectly left out of Weblogic's generated internal
+ stub classes. At the time of this writing the status of
+ this issue is not known. When this issue has been
+ patched, and tested with Seam this reference guide
+ chapter will be updated.
+
+
+
+ So that Seam's users can deploy an EJB application to
+ Weblogic a special Weblogic specific jar has been
+ created, starting with Seam 2.0.2.CR2. It is located in
+ the
+ $SEAM/lib/interop
+ directory and is called
+ jboss-seam-wls-compatible.jar
+ . The only difference between this jar and the
+ jboss-seam.jar
+ is that it does not contain the
+ TimerServiceDispatcher
+ EJB. To use this jar simply rename the
+ jboss-seam-wls-compatible.jar
+ to
+ jboss-seam.jar
+ and replace the original in your applications
+ EAR
+ file. The
+ jee5/booking
+ example demonstrates this.
+
+
- =
+
- The jee5/booking example
- In this section will will quickly go over the steps needed =
to get
- the jee5/booking example to the point that
- blocker shows itself.
+ Getting the jee5/booking Working
+ In this section we will go over the steps needed to get
+ the jee5/booking example to up and running.=
=
Setting up the hsql datasource
@@ -323,10 +339,11 @@
=
- Copy hsqldb.jar to weblogic
+ Copy hsqldb.jar to the Weblo=
gic
domain's shared library directory: cp
- ../../seam-gen/lib/hsqldb.jar
- /home/jbalunas/bea/user_projects/domains/seam_exam=
ples/lib
+ ../../../lib/hsqldb.jar
+ /jboss/apps/bea/user_projects/domains/seam_example=
s/lib
+
@@ -344,7 +361,7 @@
button in the upper left box.
- Then select button New
+ Then select the New
button at the top of the data source table
@@ -421,7 +438,7 @@
Leave the rest of the fields
- empty.
+ as is.
Select Next
@@ -441,108 +458,459 @@
+
+ Setting up Weblogics JSF Support
+ These are the instructions to deploy and configure Weblo=
gic's =
+ JSF 1.2 libraries. Out of the box Weblogic does not come with=
its =
+ own JSF libraries active, and unfortunately when deploying an =
+ EAR based application Weblogic requires its
+ own JSF libraries to function. This appears to be caused by =
+ classloader issues. The assumption being that JSF libraries
+ in the application are not visible to Weblogic during deployme=
nt of
+ the EAR application. Why this does not eff=
ect
+ WAR based applications is not known.
+ =
+
+
+ In the administration console navigate to the =
+ Deployments page using the left ha=
nd
+ menu.
+
+
+ You must lock the domain configuration using the
+ button in the upper left box.
+
+
+ Then select the Install
+ button at the top of the deployments table
+
+
+ Using the directory browser navigate to the =
+ /jboss/apps/bea/wlserver_10.0/common/deployable-libr=
aries
+
+ directory. Then select the jsj-1.2.war
+ archive, and click the Next button=
.
+
+
+ Make sure that the Install this deploy=
ment =
+ as a library is selected. Click the Next
+ button on the Install Application =
+ Assistant page.
+ =
+
+ Click the Next button on the =
+ Optional Settings page.
+
+
+ Make sure that the Yes, take me to the =
+ deployment's configuration screen. is selec=
ted. =
+ Click the Finish button on the
+ Review your choices and click Finish page.<=
/para>
+
+
+ On the Settings for jsf(1.2,1.2.3.1)=
literal>
+ page set the Deployment Order to =
+ 99 so that it is deployed prior to =
+ autodeployed applications. Then click the
+ Save button.
+ =
+
+ Then activate the changes by clicking the green
+ button in the upper left.
+
+
+ =
+ There is another step that is needed for this to work.=
For =
+ some reason, even with the steps above classes in the
+ jsf-api.jar are not found during application deplo=
yment.
+ The only way I found for this to work is to put the
+ jsf-api.jar from $SEAM/lib dire=
ctory
+ in the domains shared library =
+ /jboss/apps/bea/user_projects/domains/seam_domain/lib
+
+ =
+
+
+ Shutdown the server following
+
+
+ Then execute =
+ =
+cp ../../../lib/jsf-api.jar /jboss/apps/bea/user_projects/domains/seam_exa=
mples/lib
+ . Verify the jar was copied correctly.
+ =
+
+ Start up the server and navigate to the
+ administration console following
+
+
+ Then verify a clean start up of the server.
+
+ =
+
Configuration and Build changes
+
+ OK - now we are ready to finally begin adjusting the seam
+ application for deployment to the Weblogic server.
+
- resources/META-INF/persistence.xml
+
+ resources/META-INF/persistence.xml
+
-
-
- Because the tech preview version will
- only work with kodo or
- openJPA as the JPA
- provider you must change the provider to :
-
- org.apache.openjpa.persistence.PersistenceProviderImpl]]>
-
-
- Next you need to change the
- jta-data-source to
- what you entered above :
-
- seam-jee5-ds]]>
-
-
- The other properties in the file are
- hibernate specific and are not used by
- openJPA but can be
- left in.
-
-
+
+
+
+ Change the
+ jta-data-source
+ to what you entered above :
+
+ seam-jee5-ds]]>
+
+
+
+ Then comment out the glassfish properties.
+
+
+
+
+ Then add these two properties for weblogic
+ support.
+
+
+
+]]>
+
+
+
+
+
+ resources/META-INF/weblogic-application.xml
+
+
+
+
+
+
+ This file needs to be created and should
+ contain the following:
+
+
+
+
+ jsf
+ 1.2
+ 1.2
+ false
+
+
+ antlr.*
+
+
+]]>
+
+
+
+ These changes do two two different things.
+ The first element
+ library-ref
+ tells weblogic that this application will
+ be using the deployed JSF libraries. The
+ second element
+
+ prefer-application-packages
+
+ tells weblogic that the
+ antlr
+ jars take precedence. This avoids a
+ conflict with hibernate.
+
+
+
+
+
+
+
+ resources/META-INF/ejb-jar.xml
+
+
+
+
+
+ The changes described here work around an
+ issue where Weblogic is only using a
+ single instance of the
+ sessionBeanInterceptor
+ for all session beans. Seam's interceptor
+ caches and stores some component specific
+ attributes, so when a call comes in - the
+ interceptor is primed for a different
+ component and an error is seen. To solve
+ this problem you must define a separate
+ interceptor binding for each EJB you wish
+ to use. When you do this Weblogic will use
+ a separate instance for each EJB.
+
+
+ Modify the
+ assembly-descriptor
+ element to look like this:
+
+
+ =
+ AuthenticatorAction
+ org.jboss.seam.ejb.SeamInterceptor
+
+ =
+ BookingListAction
+ org.jboss.seam.ejb.SeamInterceptor
+
+ =
+ RegisterAction
+ org.jboss.seam.ejb.SeamInterceptor
+
+ =
+ ChangePasswordAction
+ org.jboss.seam.ejb.SeamInterceptor
+
+ =
+ HotelBookingAction
+ org.jboss.seam.ejb.SeamInterceptor
+
+ =
+ HotelSearchingAction
+ org.jboss.seam.ejb.SeamInterceptor
+
+ =
+ EjbSynchronizations
+ org.jboss.seam.ejb.SeamInterceptor
+
+]]>
+
+
+
+
+
+
+ resources/WEB-INF/weblogic.xml
+
+
+
+
+
+ This file needs to be created and should
+ contain the following:
+
+
+
+ =
+
+ jsf
+ 1.2
+ 1.2
+ false
+
+
+]]>
+
+
+
+ This file and the element
+ library-ref
+ tells Weblogic that this application will
+ using the deployed JSF libraries. This is
+ needed in both this file and the
+
+ weblogic-application.xml
+
+ file because both applications require
+ access.
+
+
+
+
+
+
+
+ resources/WEB-INF/web.xml
+
+
+
+
+
+ Because the
+ jsf-impl.jar
+ is not going to be in the
+ $WAR/WEB_INF/lib
+ directory we need to add a configuration
+ listener to this file.
+
+
+ com.sun.faces.config.ConfigureListener
+
+]]>
+
+
+
+
- Deploying the Application
- There are some changes needed to the build script and th=
en we
- can attempt to deploy the app.
- =
+ Building and Deploying the Application
+
+ There are some changes needed to the build script and the
+ jboss-seam.jar
+ then we can deploy the app.
+
- build.xml
+
+ build.xml
- Weblogic does not ship with a default JSF
- implementation so we need to add the JSF libraries=
to
- the WAR. Add the following to the
- build.xml and this will add the
- needed jars. Note that richfaces-api.jar=
- is only needed if using the admin console to deplo=
y. For =
- some reason Weblogic needs it in the WAR<=
/literal>
- when it scans the application.
-
-
-
-
+
+
+
+ Add the following to the
+ build.xml
+ . Note that
+ richfaces-api.jar
+ is only needed if using the admin console
+ to deploy. For some reason Weblogic needs
+ it in the
+ WAR
+ when it scans the application.
+
+ =
]]>
+
+
+
+ Next we need to add the follow so that the
+
+ weblogic-application.xml
+
+ will be packaged.
+
+
+
+
+ =
+
+
+
+
+
+
+ =
+ ]]>
+
+
+
+ Then finally we need to add two jars to
+ the
+ EAR
+ . Add these two lines to the
+ ear.lib.extras
+ fileset.
+
+
+ ]]>
+
+
+
+
+
+ $SEAM/lib/interop/jboss-seam-wls-compatible.jar
+
+
+
+
+
+
+ This is the change discussed above in
+
+ . There are really two options.
+
+
+
+
+ Rename this jar and replace the original
+
+ $SEAM/lib/jboss-seam.jar
+
+ file. This approach does not require any
+ changes to the packaged
+ EAR
+ archive, but overwrites the original
+ jboss-seam.jar
+
+
+
+
+ The other option is the modify the
+ packaged
+ EAR
+ archive and replace the
+ jboss-seam.jar
+ in the archive manually. This leaves the
+ original jar alone, but requires a manual
+ step when ever the archive is packaged.
+
+
+
+
+
- =
- Now we can build the application by running ant
- archive at the base of the example directory.
- =
- Because we chose to create our Weblogic domain in develo=
pment
- mode we can deploy the application by putting the EAR file =
in the
- domains autodeploy directory.
- =
- cp ./dist/jboss-seam-jee5.ear =
- /home/jbalunas/bea/user_projects/domains/seam_examples/autodeploy
- =
- Here is where we see the varargs issu=
e.
- In the console output you will some Kodo warnings, then
- exceptions and compile errors like the one below.
- =
- =
-
+ Assuming that you choose the first option for handling
+ the
+ jboss-seam-wls-compatible.jar
+ we can build the application by running
+ ant archive
+ at the base of the
+ jee5/booking
+ example directory.
+
=
-...
-]]>
- =
- This is as far as we can go with Weblogic using EJB's wi=
th seam
- until the varargs issue is
- resolved.
+
+ Because we chose to create our Weblogic domain in
+ development mode we can deploy the application by putting
+ the EAR file in the domains autodeploy directory.
+
+
+ cp ./dist/jboss-seam-jee5.ear
+ /jboss/apps/bea/user_projects/domains/seam_examples/auto=
deploy
+
+
+
+
+ Check out the application at
+ http://localhost:7001/seam-jee5/
+
=
@@ -558,63 +926,92 @@
First we'll build the example for Weblogic 10.x and do the ne=
eded
steps to deploy. Then we'll talk about what is different between =
the
Weblogic versions, and with the JBoss AS version.
+ =
+ Note that this example assumes that Weblogic's JSF libraries h=
ave
+ been configured as described in .
=
- Building and deploying jpa booking
- example
- =
- Step one setup the datasource, step two build the app, step=
three
- deploy.
- =
+
+ Building and deploying
+ jpa
+ booking example
+
+
+
+ Step one setup the datasource, step two build the app, step
+ three deploy.
+
+
Setting up the datasource
- =
- The Weblogic 10.X version of the example uses the in me=
mory
- hsql database instead of the built in PointBase database. I=
f you
- wish to use the PointBase database you must setup a PointBa=
se
- datasource, and adjust the hibernate setting in
- persistence.xml to use the PointBase
- dialect. For reference the
- jpa/weblogic92 example uses
- PointBase.
- Configuring the datasource is very similar to the jee5 <=
xref
- linkend=3D"weblogic-hsql-jee5-ds"/>. Follow the steps in
- that section, but use the following entries where needed.
+
+
+ The Weblogic 10.X version of the example will use the in
+ memory hsql database instead of the built in PointBase
+ database. If you wish to use the PointBase database you
+ must setup a PointBase datasource, and adjust the
+ hibernate setting in
+ persistence.xml
+ to use the PointBase dialect. For reference the
+ jpa/weblogic92
+ example uses PointBase.
+
+
+ Configuring the datasource is very similar to the jee5
+
+ . Follow the steps in that section, but use the following
+ entries where needed.
- DataSource Name:
- seam-jpa-ds
+
+ DataSource Name:
+ seam-jpa-ds
+
- JNDI Name: seam-jpa-ds
-
+
+ JNDI Name:
+ seam-jpa-ds
+
-
+
+
Building the example
- =
- Building it only requires running the correct ant comma=
nd:
- =
- =
- ant -f build-weblogic10.xml
- This will create container specific distribution and explod=
ed
- archive directories.
+
+
+ Building it only requires running the correct ant
+ command:
+
+
+ ant -f build-weblogic10.xml
+
+ This will create a container specific distribution and
+ exploded archive directories.
+
Deploying the example
- =
- When we installed Weblogic following we chose to have the domai=
n in
- development mode. This means to deploy the application all =
we
- need to do is copy it into the autodeploy directory.
- =
- cp ./dist-weblogic10/jboss-seam-jpa.war =
- /home/jbalunas/bea/user_projects/domains/seam_examples/autodeploy
- =
- Check out the application at the following
+
+
+ When we installed Weblogic following
+
+ we chose to have the domain in development mode. This
+ means to deploy the application all we need to do is copy
+ it into the autodeploy directory.
+
+
+
+ cp ./dist-weblogic10/jboss-seam-jpa.war
+ /jboss/apps/bea/user_projects/domains/seam_examples/autodep=
loy
+
+
+
+ Check out the application at the following
http://localhost:7001/jboss-seam-jpa/
- .
+ .
+
@@ -642,31 +1039,39 @@
with an older version of the
ANTLR libraries that
Weblogic 10.x uses internally. OC4J have the sa=
me
- issue as well.
+ issue as well. It also configures the applicati=
on to
+ use the shared JSF libraries that were installed
+ above. =
=
- =
-
+
-
+
+ jsf
+ 1.2
+ 1.2
+ false
+
true
]]>
- This file make Weblogic use classes and
+ This make Weblogic use classes and
libraries in the web application before other
libraries in the classpath. Without this change
hibernate is required to use a older, slower qu=
ery
factory by setting the following property in the
META-INF/persistence.xml
- file.
+ file. =
=
- =
- ]=
]>
+ ]=
]>
+
@@ -675,9 +1080,20 @@
transactions is enabled by adding:
=
=
- ]]>
- =
+ ]]> =
+
+
+ WEB-INF/web.xml
+ — Because the jsf-impl.jar
+ is not in the WAR this liste=
ner
+ need to be configured :
+
+ com.sun.faces.config.ConfigureListener
+ ]]>
+
@@ -688,24 +1104,20 @@
META-INF/persistence.xml
- — Except for datasource name the WebLogic
+ — Except for datasource name the Weblogic
version sets:
- ]=
]>
+ ]=
]>
+
- WEB-INF/jboss-web.xml
- — The JBoss version uses this instead of
- weblogic.xml
-
-
WEB-INF/lib — The
Weblogic version requires several library
packages because they are not included as they =
are
with JBoss AS. These are primarily for hibernat=
e,
- JSF-RI support and their dependencies.
+ and its dependencies.
@@ -754,27 +1166,8 @@
-
+ =
- Seam requires JSF 1.2 and these are
- jars needed for that. Weblogic 10.3.TP
- does not ship JSF libraries installed =
by
- default.
-
-
-
-
- jsf-api.jar
-
-
-
-
- jsf-impl.jar
-
-
-
-
-
Various third party jars that
Weblogic needs:
@@ -837,16 +1230,10 @@
files, and adding dependent jars that Weblogic 10.x does not ship
with.
=
- We still need to live within the constraints imposed to us by
- Weblogic, and because of that this example will generate a
- WAR based application instead of an
- EAR. See for details.
- =
This example will cover the basic seam-gen WAR
deployment. This will demonstrate Seam POJO components, Hibernate
JPA, Facelets, Drools security, RichFaces, and a configurable
- DataSource.
+ dataSource.
=
Running seam-gen setup
@@ -857,7 +1244,6 @@
directory of the Seam distribution. Note the paths here are my=
own,
feel free to change for you environment.
=
- =
@@ -949,10 +1335,11 @@
Change the default target to
- archive.
- =
+ archive. =
=
- ]]>
+
+]]>
+
@@ -973,14 +1360,21 @@
admin console)
- Change the transaction type to
- RESOURCE_LOCAL so
- that we can use JPA transactions.
- ]=
]>
+
+ Change the transaction type to
+ RESOURCE_LOCAL
+ so that we can use JPA transactions.
+
+
+ ]]>
+
- Add/modify the properties below for
- Weblogic support:
+
+ Add/modify the properties below for
+ Weblogic support:
+
- Remove the JBoss AS specific method of
- exposing the EntityManagerFactory:
-
- ]]>
-
-
You'll need to alter
persistence-prod.xml
as well if you want to deploy to Weblogic
@@ -1016,31 +1402,61 @@
- resource/WEB-INF/components.xml
+
+ resource/WEB-INF/components.xml
+
- We want to use JPA transactions so we need =
to add
- the following to let Seam know.
+
+ We want to use JPA transactions so we need to
+ add the following to let Seam know.
+
]]>
- You will also need to add the transaction
- namespace and schema location to the top of the
- document.
+
+ You will also need to add the transaction
+ namespace and schema location to the top of
+ the document.
+
- resources/WEB-INF/jboss-app.xml
+ resource/WEB-INF/web.xml
- You can delete this file as we aren't deplo=
ying
- to JBoss AS ( jboss-app.xml
- is used to enable classloading isolation in JBo=
ss
- AS)
+
+ WEB-INF/web.xml
+ — Because the
+ jsf-impl.jar
+ is not in the
+ WAR
+ this listener need to be configured :
+
+
+ com.sun.faces.config.ConfigureListener
+ ]]>
+
+
+ resources/WEB-INF/jboss-app.xml
+
+
+
+
+ You can delete this file as we aren't
+ deploying to JBoss AS (
+ jboss-app.xml
+ is used to enable classloading isolation in
+ JBoss AS)
+
+
+
+
resources/*-ds.xml
@@ -1063,23 +1479,18 @@
=
- Missing jars — There are two libraries that
+ Missing jar — There is one library that
seam-gen does not provide by
- default. These need to be copied into your projects
- lib directory manually.
+ default. This needs to be copied into your projects
+ /lib directory manually.
jboss-archive-browsing.jar — can
be found in the
- @SEAM_DIST/examples/jpa/lib
+ @SEAM_DIST/examples/wiki/lib
directory.
-
- el-ri.jar — is also found in the
- @SEAM_DIST/examples/jpa/lib
- directory.
-
@@ -1087,33 +1498,25 @@
build.xml. Find the target
war and add the following to the e=
nd
of the target.
- =
- =
-
-
-
-
-
- =
-
-
-
-
-
-
- =
- =
-
-
-
-
-
-
- =
-
-
-
- ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
=
@@ -1179,12 +1582,12 @@
development mode. This means to deploy the application all =
we
need to do is copy it into the autodeploy directory.
+ =
+cp ./dist/weblogic_example.war /jboss/apps/b=
ea/user_projects/domains/seam_examples/autodeploy
=
- =
- cp ./dist/weblogic_example.wa=
r /home/jbalunas/bea/user_projects/domains/seam_examples/autodeploy
Check out the application at the following
- http://localhost:7001/weblogic_example/
- .
+ http://localhost:7001/weblogic_example/. =
+ .
Modified: trunk/examples/jpa/build-weblogic10.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/examples/jpa/build-weblogic10.xml 2008-05-12 19:01:55 UTC (rev 81=
67)
+++ trunk/examples/jpa/build-weblogic10.xml 2008-05-12 19:20:19 UTC (rev 81=
68)
@@ -32,9 +32,6 @@
-
-
-
=
Modified: trunk/examples/jpa/resources-weblogic10/WEB-INF/web.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/examples/jpa/resources-weblogic10/WEB-INF/web.xml 2008-05-12 19:0=
1:55 UTC (rev 8167)
+++ trunk/examples/jpa/resources-weblogic10/WEB-INF/web.xml 2008-05-12 19:2=
0:19 UTC (rev 8168)
@@ -9,6 +9,10 @@
=
org.jboss.seam.servlet.SeamListener=
=
=
+ =
+
+ com.sun.faces.config.ConfigureListener
+
=
Seam Filter
Modified: trunk/examples/jpa/resources-weblogic10/WEB-INF/weblogic.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/examples/jpa/resources-weblogic10/WEB-INF/weblogic.xml 2008-05-12=
19:01:55 UTC (rev 8167)
+++ trunk/examples/jpa/resources-weblogic10/WEB-INF/weblogic.xml 2008-05-12=
19:20:19 UTC (rev 8168)
@@ -1,10 +1,14 @@
-
-
-
- true
-
+
+
+ jsf
+ 1.2
+ 1.2
+ false
+
+
+ true
+
--===============2877264228694286298==--