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
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Weblogic.xml 2008-05-12 19:01:55 UTC (rev 8167)
+++ trunk/doc/Seam_Reference_Guide/en-US/Weblogic.xml 2008-05-12 19:20:19 UTC (rev 8168)
@@ -4,84 +4,94 @@
<para> 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 release.
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 changes that
- are needed. </para>
+ this chapter will show you how. There are some known issues with the
+ Weblogic servers that will need to be worked around, and configuration
+ changes that are needed. </para>
<para> First step is to get Weblogic downloaded, installed and running (no
small feat). Then we'll talk about Seam's JEE5 example and the hurdles to
- getting it running, and what blockers exist. After that the JPA example 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
<literal>seam-gen</literal> application and get it up and running to
- provide a jump start to your application. </para>
+ provide a jump start to your own application. </para>
<section>
<title>Installation and operation of Weblogic</title>
- <para> 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 release,
- while 10.3.TP is a technical preview version that fixes some things and
- breaks others. </para>
+ <para> 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
+ release, while 10.3.TP is a technical preview version that fixes some
+ things and breaks others. </para>
<itemizedlist>
<listitem>
<para><literal>Weblogic 10.0.MP1</literal>
— <ulink
-
url="http://commerce.bea.com/showproduct.jsp?family=WLS&majo...
+url="http://commerce.bea.com/showproduct.jsp?family=WLS&major=10&minor=1">
Download page </ulink></para>
<para> 10.0.MP1 has a known issue with EJBs that use
<literal>varargs</literal> in their methods (it confuses them
as <literal>transient</literal> ). This causes exceptions
- when Weblogic attempts to compile the Seam EJBs as
- <literal>varargs</literal> are used. There seems to be no
work
- around to this issue in 10.0.MP1. Because of this only the
- <literal>jpa</literal> and WAR based
- <literal>seam-gen</literal> examples work with this version.
- See the <literal>jee5/booking</literal> example for more
- details. </para>
+ when Weblogic attempts to compile the Seam EJBs. There is a BEA
+ support patch available to fix this issue, but BEA is currently
+ working on a second issue related to the EJBs. See the
+ <literal>jee5/booking</literal> example for more details.
</para>
</listitem>
<listitem>
<para><literal>Weblogic 10.3.TP</literal>
— <ulink
-
url="http://commerce.bea.com/showproduct.jsp?family=WLS&majo...
+url="http://commerce.bea.com/showproduct.jsp?family=WLS&major=10.3Tech&minor=-1&DL=www_WLS_10-3TechPreview_icon&WT.ac=DL_www_WLS_10.3_TechPreviewicon">
Download page </ulink></para>
<para> This version still has not fixed the
<literal>varargs</literal> bug, and there is a new issue with
EJBs that do not use <literal>kodo</literal> (BEA's
- implementation of JPA). See the
- <literal>jee5/booking</literal> example for more details.
- However if the <literal>varargs</literal> issue is going to
get
- fixed it will most likely be an update to this version. </para>
+ implementation of JPA). BEA has said that the <literal>varargs
+ </literal> issue will be resolved in the final version of 10.3,
+ but the <literal>kodo</literal> issue is a blocker for
getting
+ the <literal>jee5/booking</literal> working.
+ </para>
</listitem>
</itemizedlist>
- <para> 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 used for the
- examples below. </para>
+ <note>
+ <title>Special <literal>jboss-seam.jar</literal> for Weblogic
EJB
+ Support</title>
+ <para> Starting with Seam 2.0.2.CR2 a special Weblogic specific jar has
+ been created that does not contain the <literal>TimerServiceDispatcher
+ </literal>. This is the EJB that uses
<literal>varargs</literal> and
+ exposes the second EJB issue. We will be using this jar for the
+ <literal>jee5/booking</literal> example, as it avoids both known BEA
+ issues.
+ </para>
+ </note>
<section>
- <title>Installing 10.3.TP</title>
+ <title>Installing 10.0.MP1</title>
- <para> Here are the quick steps to installing Weblogic 10.3.TP. For more
- details or if you are having any issues please check with the BEA docs
- at the <ulink
-
url="http://edocs.bea.com/wls/essex/TechPreview/"> Tech
- Preview Doc Center </ulink> . Here we install the RHEL 5 version using
- the graphical installer: </para>
-
+ <para>
+ 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
+ <ulink
url="http://e-docs.bea.com/wls/docs100/index.html">
+ Weblogic 10.0 Doc Center
+ </ulink>
+ . Here we install the RHEL 5 version using the graphical
+ installer:
+ </para>
+
<orderedlist>
<listitem>
- <para> Follow the link given above for 10.3.TP and download the
+ <para> Follow the link given above for 10.0.MP1 and download the
correct version for your environment. You will need to sign up
for an account with BEA in order to do this. </para>
</listitem>
<listitem>
<para> You may need to change the the
- <literal>server103tp_XX.bin</literal> file to be
+ <literal>server1001_XX.bin</literal> file to be
executable: </para>
- <programlisting>chmod a+x server103tp_XX.bin</programlisting>
+ <programlisting>chmod a+x server1001_XX.bin</programlisting>
</listitem>
<listitem>
<para> Execute the install: </para>
- <programlisting>./server103tp_XX.bin</programlisting>
+ <programlisting>./server1001_XX.bin</programlisting>
</listitem>
<listitem>
<para> When the graphical install loads, you need to set the BEA
@@ -89,7 +99,7 @@
installed. This location will be known as
<literal>$BEA_HOME</literal> in this document e.g.:
</para>
- <programlisting>/home/jbalunas/bea</programlisting>
+ <programlisting>/jboss/apps/bea</programlisting>
</listitem>
<listitem>
<para> Select <literal>Complete</literal> as the
@@ -100,7 +110,7 @@
<listitem>
<para> Then you need to tell it where to install the server
components: </para>
- <programlisting>$BEA_HOME/wlserver_10.3tp</programlisting>
+ <programlisting>$BEA_HOME/wlserver_10.0</programlisting>
</listitem>
</orderedlist>
</section>
@@ -110,16 +120,16 @@
is a self contained server instance. The Weblogic server you just
installed has some example domains, but we are going to create one
just for the seam examples. You can use the existing domains if you
- wish (modify the instructions as needed). </para>
-
+ wish (modify the instructions as needed). </para>
<orderedlist>
<listitem>
<para> Start up the Weblogic configuration wizard:</para>
-
<programlisting>$BEA_HOME/wlserver_10.3tp/common/bin/config.sh</programlisting>
+ <programlisting>$BEA_HOME/wlserver_10.0/common/bin/config.sh
+ </programlisting>
</listitem>
<listitem>
<para> Choose to create a new domain, configured to support
- <literal>Weblogic Server TP</literal>. Note that this is
+ <literal>Weblogic Server</literal>. Note that this is
the default domain option. </para>
</listitem>
<listitem>
@@ -142,9 +152,11 @@
</section>
<section id="bea_start_stop_access">
<title>How to Start/Stop/Access your domain</title>
- <para> 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. </para>
+ <para>
+ 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.
+ </para>
<itemizedlist>
<listitem>
<para> Starting the domain:</para>
@@ -172,7 +184,7 @@
<orderedlist>
<listitem>
<para> Select
- <literal>seam-examples</literal> on the
+ <literal>seam_examples</literal> on the
left hand side of the console. </para>
</listitem>
<listitem>
@@ -225,95 +237,99 @@
</section>
<section>
- <title> The <literal>jee5/booking</literal> example
</title>
+ <title> The <literal>jee5/booking</literal> Example
</title>
- <para>Do you want to run Seam using EJB's on Weblogic? If so there are
some
- blockers that keep it from working. This section describes what changes
- are needed to the <literal>jee5/booking</literal> example to get it
as
- close to deploying as possible. First we'll talk about the blockers and
- what they effect.</para>
-
- <section id="weblogic-ejb-blockers">
- <title>EJB Blockers with Weblogic</title>
- <para>For several releases of Weblogic there has been an issue with
- compiling EJB's that use variable arguments in their methods. This
- is confirmed in the Weblogic 9.X and 10.X versions. We had hoped that
- the issue would be resolved in the tech preview release, but it is not.
- Seam uses variable arguments in its internal EJB's and so until this
- is fixed Seam with EJB's will not work.</para>
-
- <para>The gist of the issue is that the Weblogic EJB compiler believes
- that methods that use <literal>varargs</literal> are
- <literal>transient</literal> and the deployment will fail with
- exceptions like below:
-
-
+ <para>
+ 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
+ <literal>jee5/booking</literal>
+ example to get it deployed and functioning.
+ </para>
+
+ <section id="weblogic-ejb-issues">
+ <title>EJB3 Issues with Weblogic</title>
+ <para>
+ 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 (
+ <literal>TimerServiceDispatcher</literal>
+ ). So Seam will not function correctly without
+ modifications.
+ </para>
+
+ <para>
+ The basic explanation of the issue is that the Weblogic EJB
+ compiler believes that methods that use
+ <literal>varargs</literal>
+ are
+ <literal>transient</literal>
+ and the deployment will fail with exceptions like below:
+
<programlisting><![CDATA[java.io.IOException: Compiler failed
executable.exec:
-/home/jbalunas/bea/wlserver_10.3tp/user_projects/domains/seam_examples/servers/AdminServer
+/jboss/apps/bea/wlserver_10.0/user_projects/domains/seam_examples/servers/AdminServer
/cache/EJBCompilerCache/5yo5dk9ti3yo/org/jboss/seam/async/
TimerServiceDispatcher_qzt5w2_LocalTimerServiceDispatcherImpl.java:194: modifier
transient
not allowed here
public transient javax.ejb.Timer scheduleAsynchronousEvent(java.lang.String arg0,
java.lang.Object[] arg1)
^
-/home/jbalunas/bea/wlserver_10.3tp/user_projects/domains/seam_examples/servers/AdminServer
+/jboss/apps/bea/wlserver_10.0/user_projects/domains/seam_examples/servers/AdminServer
/cache/EJBCompilerCache/5yo5dk9ti3yo/org/jboss/seam/async/
TimerServiceDispatcher_qzt5w2_LocalTimerServiceDispatcherImpl.java:275: modifier
transient
not allowed here
public transient javax.ejb.Timer scheduleTimedEvent(java.lang.String arg0,
org.jboss.seam.async.TimerSchedule arg1, java.lang.Object[]
arg2)]]></programlisting>
- BEA says that this is a bug with Java specification. Sun admits the
- issue, and provides a work around, and will not fix the core issue.
-
- <itemizedlist>
- <listitem>
- <para><ulink
-
url="http://forums.bea.com/thread.jspa?threadID=300002074">
- BEA forum</ulink> — Discusses the issue and
- suggests waiting for a new release of 10.X</para>
- </listitem>
- <listitem>
- <para><ulink
-
url="http://forums.bea.com/thread.jspa?messageID=300006290">
- BEA forum</ulink> — Discusses response from BEA
- support and that BEA is saying it is an issue with the spec
- with links to the bug.</para>
- </listitem>
- <listitem>
- <para><ulink
-
url="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6516895"...
- Sun bug report </ulink> — Describes details of the
- issue, but says that it will not be fixed.</para>
- </listitem>
- </itemizedlist> So what does that mean to us? At least for now
EJB's
- with variable arguments will not run on Weblogic. </para>
-
- <section>
- <title>Secondary issue with the Tech Preview</title>
- <para>A less severe issue is also present in the tech preview version
- of Weblogic. You can not use any JPA provider with EJB's except for
- the default <literal>kodo</literal> or
- <literal>openJPA</literal> implementation. As you set up this
- example you will run into this issue before the
- <literal>varargs</literal> problem. Unfortunately using
- <literal>kodo</literal> or
<literal>openJPA</literal> does
- not help with the blocker described above but is important to
- know.</para>
-
- <para>Other users have seen this issue with the tech preview and I
- would hope/expect that it will be fixed in future releases (
- <ulink
-
url="http://forums.bea.com/thread.jspa?threadID=300004403">
- BEA Forum</ulink>). The forum entry has the exact stack trace,
- and the response from BEA.</para>
- </section>
+ <para>
+ BEA has created a patch (
+ <literal>CR327275</literal>
+ ) 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.
+ </para>
+ <para>
+ Unfortunately a second issue has been reported and
+ verified by BEA (
+ <literal>CR363182</literal>
+ ). 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.
+ </para>
+
+ <para>
+ 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
+ <literal>$SEAM/lib/interop</literal>
+ directory and is called
+ <literal>jboss-seam-wls-compatible.jar</literal>
+ . The only difference between this jar and the
+ <literal>jboss-seam.jar</literal>
+ is that it does not contain the
+ <literal>TimerServiceDispatcher</literal>
+ EJB. To use this jar simply rename the
+ <literal>jboss-seam-wls-compatible.jar</literal>
+ to
+ <literal>jboss-seam.jar</literal>
+ and replace the original in your applications
+ <literal>EAR</literal>
+ file. The
+ <literal>jee5/booking</literal>
+ example demonstrates this.
+ </para>
+ </para>
</section>
-
+
<section>
- <title>The <literal>jee5/booking</literal>
example</title>
- <para>In this section will will quickly go over the steps needed to get
- the <literal>jee5/booking</literal> example to the point that
- blocker shows itself.</para>
+ <title>Getting the <literal>jee5/booking</literal>
Working</title>
+ <para>In this section we will go over the steps needed to get
+ the <literal>jee5/booking</literal> example to up and
running.</para>
<section id="weblogic-hsql-jee5-ds">
<title>Setting up the hsql datasource</title>
@@ -323,10 +339,11 @@
<orderedlist>
<listitem>
- <para> Copy <literal>hsqldb.jar</literal> to
weblogic
+ <para>Copy <literal>hsqldb.jar</literal> to the
Weblogic
domain's shared library directory: <literal> cp
- ../../seam-gen/lib/hsqldb.jar
-
/home/jbalunas/bea/user_projects/domains/seam_examples/lib</literal>
+ ../../../lib/hsqldb.jar
+ /jboss/apps/bea/user_projects/domains/seam_examples/lib
+ </literal>
</para>
</listitem>
<listitem>
@@ -344,7 +361,7 @@
button in the upper left box.</para>
</listitem>
<listitem>
- <para>Then select button <literal>New</literal>
+ <para>Then select the <literal>New</literal>
button at the top of the data source table</para>
</listitem>
<listitem>
@@ -421,7 +438,7 @@
</listitem>
<listitem>
<para>Leave the rest of the fields
- empty.</para>
+ as is.</para>
</listitem>
<listitem>
<para>Select <literal>Next</literal>
@@ -441,108 +458,459 @@
</listitem>
</orderedlist> </para>
</section>
+ <section id="weblogic-jsf-deploy">
+ <title>Setting up Weblogics JSF Support</title>
+ <para>These are the instructions to deploy and configure Weblogic's
+ JSF 1.2 libraries. Out of the box Weblogic does not come with its
+ own JSF libraries active, and unfortunately when deploying an
+ <literal>EAR</literal> 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 deployment of
+ the <literal>EAR</literal> application. Why this does not
effect
+ <literal>WAR</literal> based applications is not
known.</para>
+
+ <orderedlist>
+ <listitem>
+ <para>In the administration console navigate to the
+ <literal>Deployments</literal> page using the left hand
+ menu.</para>
+ </listitem>
+ <listitem>
+ <para>You must lock the domain configuration using the
+ button in the upper left box.</para>
+ </listitem>
+ <listitem>
+ <para>Then select the <literal>Install</literal>
+ button at the top of the deployments table</para>
+ </listitem>
+ <listitem>
+ <para>Using the directory browser navigate to the
+ <literal>/jboss/apps/bea/wlserver_10.0/common/deployable-libraries
+ </literal>
+ directory. Then select the
<literal>jsj-1.2.war</literal>
+ archive, and click the <literal>Next</literal>
button.</para>
+ </listitem>
+ <listitem>
+ <para>Make sure that the <literal>Install this
deployment
+ as a library</literal> is selected. Click the
<literal>Next
+ </literal> button on the <literal>Install Application
+ Assistant</literal> page.</para>
+ </listitem>
+ <listitem>
+ <para>Click the <literal>Next</literal> button on
the
+ <literal> Optional Settings</literal> page.</para>
+ </listitem>
+ <listitem>
+ <para>Make sure that the <literal>Yes, take me to the
+ deployment's configuration screen.</literal> is selected.
+ Click the <literal>Finish</literal> button on the
<literal>
+ Review your choices and click Finish</literal>
page.</para>
+ </listitem>
+ <listitem>
+ <para>On the <literal>Settings for
jsf(1.2,1.2.3.1)</literal>
+ page set the <literal>Deployment Order</literal> to
+ <literal>99</literal> so that it is deployed prior to
+ autodeployed applications. Then click the <literal>
+ Save</literal> button.</para>
+ </listitem>
+ <listitem>
+ <para>Then activate the changes by clicking the green
+ button in the upper left.</para>
+ </listitem>
+ </orderedlist>
+
+ <para>There is another step that is needed for this to work. For
+ some reason, even with the steps above classes in the <literal>
+ jsf-api.jar</literal> are not found during application deployment.
+ The only way I found for this to work is to put the <literal>
+ jsf-api.jar</literal> from <literal>$SEAM/lib</literal>
directory
+ in the domains shared library
+
<literal>/jboss/apps/bea/user_projects/domains/seam_domain/lib</literal>
+ </para>
+
+ <orderedlist>
+ <listitem>
+ <para>Shutdown the server following <xref
+ linkend="bea_start_stop_access"/></para>
+ </listitem>
+ <listitem>
+ <para>Then execute
+ <literal>
+cp ../../../lib/jsf-api.jar /jboss/apps/bea/user_projects/domains/seam_examples/lib
+ </literal>. Verify the jar was copied
correctly.</para>
+ </listitem>
+ <listitem>
+ <para>Start up the server and navigate to the
+ administration console following <xref
+ linkend="bea_start_stop_access"/></para>
+ </listitem>
+ <listitem>
+ <para>Then verify a clean start up of the server.</para>
+ </listitem>
+ </orderedlist>
+ </section>
<section>
<title>Configuration and Build changes</title>
+ <para>
+ OK - now we are ready to finally begin adjusting the seam
+ application for deployment to the Weblogic server.
+ </para>
<variablelist>
<varlistentry>
<term>
- <literal>resources/META-INF/persistence.xml</literal>
+ <literal>
+ resources/META-INF/persistence.xml
+ </literal>
</term>
<listitem>
- <itemizedlist>
- <listitem>
- <para>Because the tech preview version will
- only work with <literal>kodo</literal> or
- <literal>openJPA</literal> as the JPA
- provider you must change the provider to :
- </para>
- <programlisting
role="XML"><![CDATA[<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>]]></programlisting>
- </listitem>
- <listitem>
- <para> Next you need to change the
- <literal>jta-data-source</literal> to
- what you entered above :
- </para>
- <programlisting
role="XML"><![CDATA[<jta-data-source>seam-jee5-ds</jta-data-source>]]></programlisting>
- </listitem>
- <listitem>
- <para>The other properties in the file are
- hibernate specific and are not used by
- <literal>openJPA</literal> but can be
- left in.</para>
- </listitem>
- </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Change the
+ <literal>jta-data-source</literal>
+ to what you entered above :
+ </para>
+ <programlisting role="XML"><![CDATA[
+
<jta-data-source>seam-jee5-ds</jta-data-source>]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ Then comment out the glassfish properties.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Then add these two properties for weblogic
+ support.
+ </para>
+ <programlisting role="XML"><![CDATA[
+<property name="hibernate.dialect"
+ value="org.hibernate.dialect.HSQLDialect"/>
+<property name="hibernate.transaction.manager_lookup_class"
+
value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
+]]></programlisting>
+ </listitem>
+ </itemizedlist>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ <literal>
+ resources/META-INF/weblogic-application.xml
+ </literal>
+ </term>
+ <listitem>
+ <itemizedlist>
+ <listitem>
+ <para>
+ This file needs to be created and should
+ contain the following:
+ </para>
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<weblogic-application>
+ <library-ref>
+ <library-name>jsf</library-name>
+ <specification-version>1.2</specification-version>
+ <implementation-version>1.2</implementation-version>
+ <exact-match>false</exact-match>
+ </library-ref>
+ <prefer-application-packages>
+ <package-name>antlr.*</package-name>
+ </prefer-application-packages>
+</weblogic-application>
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ These changes do two two different things.
+ The first element
+ <literal>library-ref</literal>
+ tells weblogic that this application will
+ be using the deployed JSF libraries. The
+ second element
+ <literal>
+ prefer-application-packages
+ </literal>
+ tells weblogic that the
+ <literal>antlr</literal>
+ jars take precedence. This avoids a
+ conflict with hibernate.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <literal>resources/META-INF/ejb-jar.xml</literal>
+ </term>
+ <listitem>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The changes described here work around an
+ issue where Weblogic is only using a
+ single instance of the
+ <literal>sessionBeanInterceptor</literal>
+ 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.
+ </para>
+ <para>
+ Modify the
+ <literal>assembly-descriptor</literal>
+ element to look like this:
+ </para>
+ <programlisting role="XML"><![CDATA[
+<assembly-descriptor>
+ <interceptor-binding>
+ <ejb-name>AuthenticatorAction</ejb-name>
+ <interceptor-class
>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>BookingListAction</ejb-name>
+ <interceptor-class
>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>RegisterAction</ejb-name>
+ <interceptor-class
>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>ChangePasswordAction</ejb-name>
+ <interceptor-class
>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>HotelBookingAction</ejb-name>
+ <interceptor-class
>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>HotelSearchingAction</ejb-name>
+ <interceptor-class
>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ <interceptor-binding>
+ <ejb-name>EjbSynchronizations</ejb-name>
+ <interceptor-class
>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+</assembly-descriptor>]]></programlisting>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <literal>resources/WEB-INF/weblogic.xml</literal>
+ </term>
+ <listitem>
+ <itemizedlist>
+ <listitem>
+ <para>
+ This file needs to be created and should
+ contain the following:
+ </para>
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+
+<weblogic-web-app>
+<library-ref>
+ <library-name>jsf</library-name>
+ <specification-version>1.2</specification-version>
+ <implementation-version>1.2</implementation-version>
+ <exact-match>false</exact-match>
+ </library-ref>
+</weblogic-web-app>
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ This file and the element
+ <literal>library-ref</literal>
+ tells Weblogic that this application will
+ using the deployed JSF libraries. This is
+ needed in both this file and the
+ <literal>
+ weblogic-application.xml
+ </literal>
+ file because both applications require
+ access.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <literal>resources/WEB-INF/web.xml</literal>
+ </term>
+ <listitem>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Because the
+ <literal>jsf-impl.jar</literal>
+ is not going to be in the
+ <literal>$WAR/WEB_INF/lib</literal>
+ directory we need to add a configuration
+ listener to this file.
+ </para>
+ <programlisting role="XML"><![CDATA[
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+]]></programlisting>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
</variablelist>
</section>
<section>
- <title>Deploying the Application</title>
- <para>There are some changes needed to the build script and then we
- can attempt to deploy the app.</para>
-
+ <title>Building and Deploying the Application</title>
+ <para>
+ There are some changes needed to the build script and the
+ <literal>jboss-seam.jar</literal>
+ then we can deploy the app.
+ </para>
<variablelist>
<varlistentry>
- <term> <literal>build.xml</literal>
+ <term>
+ <literal>build.xml</literal>
</term>
<listitem>
- <para> 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
- <literal>build.xml</literal> and this will add the
- needed jars. Note that
<literal>richfaces-api.jar</literal>
- is only needed if using the admin console to deploy. For
- some reason Weblogic needs it in the
<literal>WAR</literal>
- when it scans the application.
- </para>
- <programlisting role="XML"><![CDATA[<fileset
id="war.lib.extras" dir="${seam.dir}">
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
+ <itemizedlist>
+ <listitem>
+ <para>
+ Add the following to the
+ <literal>build.xml</literal>
+ . Note that
+ <literal>richfaces-api.jar</literal>
+ is only needed if using the admin console
+ to deploy. For some reason Weblogic needs
+ it in the
+ <literal>WAR</literal>
+ when it scans the application.
+ </para>
+ <programlisting role="XML"><![CDATA[
+<fileset id="war.lib.extras" dir="${seam.dir}">
<include name="lib/richfaces-api.jar" />
</fileset>]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ Next we need to add the follow so that the
+ <literal>
+ weblogic-application.xml
+ </literal>
+ will be packaged.
+ </para>
+ <programlisting role="XML"><![CDATA[
+ <!-- Resources to go in the ear -->
+ <fileset id="ear.resources" dir="${resources.dir}">
+ <include name="META-INF/application.xml" />
+ <include name="META-INF/weblogic-application.xml" />
+ <include name="META-INF/*-service.xml" />
+ <include name="META-INF/*-xmbean.xml" />
+ <include name="treecache.xml" />
+ <include name="*.jpdl.xml" />
+ <exclude name=".gpd.*" />
+ <include name="*.cfg.xml" />
+ <include name="*.xsd" />
+ </fileset>]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ Then finally we need to add two jars to
+ the
+ <literal>EAR</literal>
+ . Add these two lines to the
+ <literal>ear.lib.extras</literal>
+ fileset.
+ </para>
+ <programlisting role="XML"><![CDATA[
+ <include name="examples/wiki/lib/jboss-archive-browsing.jar" />
+ <include name="lib/concurrent.jar" />]]></programlisting>
+ </listitem>
+ </itemizedlist>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ <literal>
+ $SEAM/lib/interop/jboss-seam-wls-compatible.jar
+ </literal>
+ </term>
+ <listitem>
+ <itemizedlist>
+ <listitem>
+ <para>
+ This is the change discussed above in
+ <xref linkend="weblogic-ejb-issues" />
+ . There are really two options.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Rename this jar and replace the original
+ <literal>
+ $SEAM/lib/jboss-seam.jar
+ </literal>
+ file. This approach does not require any
+ changes to the packaged
+ <literal>EAR</literal>
+ archive, but overwrites the original
+ <literal>jboss-seam.jar</literal>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The other option is the modify the
+ packaged
+ <literal>EAR</literal>
+ archive and replace the
+ <literal>jboss-seam.jar</literal>
+ in the archive manually. This leaves the
+ original jar alone, but requires a manual
+ step when ever the archive is packaged.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
</variablelist>
-
- <para>Now we can build the application by running <literal>ant
- archive</literal> at the base of the example
directory.</para>
-
- <para>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.
-
- <programlisting>cp ./dist/jboss-seam-jee5.ear
-
/home/jbalunas/bea/user_projects/domains/seam_examples/autodeploy</programlisting></para>
-
- <para>Here is where we see the <literal>varargs</literal>
issue.
- In the console output you will some Kodo warnings, then
- exceptions and compile errors like the one below.
-
-
- <programlisting><![CDATA[
-<Error> <EJB> <BEA-012036> <Compiling generated EJB classes produced
- the following Java compiler error message:
-/home/jbalunas/bea/user_projects/domains/seam_examples/servers/AdminServer/cache/
-EJBCompilerCache/5yo5dk9ti3yo/org/jboss/seam/async/
-TimerServiceDispatcher_qzt5w2_LocalTimerServiceDispatcherImpl.java:32:
- modifier transient not allowed here
- public transient void scheduleTransactionSuccessEvent(java.lang.String arg0,
- java.lang.Object[] arg1)
- ^
-/home/jbalunas/bea/user_projects/domains/seam_examples/servers/AdminServer/cache/
-EJBCompilerCache/5yo5dk9ti3yo/org/jboss/seam/async/
-TimerServiceDispatcher_qzt5w2_LocalTimerServiceDispatcherImpl.java:113:
- modifier transient not allowed here
- public transient javax.ejb.Timer scheduleAsynchronousEvent(java.lang.String arg0,
- java.lang.Object[] arg1)
+ <para>
+ Assuming that you choose the first option for handling
+ the
+ <literal>jboss-seam-wls-compatible.jar</literal>
+ we can build the application by running
+ <literal>ant archive</literal>
+ at the base of the
+ <literal>jee5/booking</literal>
+ example directory.
+ </para>
-...
-]]></programlisting></para>
-
- <para>This is as far as we can go with Weblogic using EJB's with
seam
- until the <literal>varargs</literal> issue is
- resolved.</para>
+ <para>
+ 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.
+
+ <programlisting>
+ cp ./dist/jboss-seam-jee5.ear
+ /jboss/apps/bea/user_projects/domains/seam_examples/autodeploy
+ </programlisting>
+ </para>
+
+ <para>
+ Check out the application at
+ <literal>http://localhost:7001/seam-jee5/</literal>
+ </para>
</section>
</section>
@@ -558,63 +926,92 @@
<para> First we'll build the example for Weblogic 10.x and do the needed
steps to deploy. Then we'll talk about what is different between the
Weblogic versions, and with the JBoss AS version. </para>
+
+ <para>Note that this example assumes that Weblogic's JSF libraries have
+ been configured as described in <xref
linkend="weblogic-jsf-deploy"/>.</para>
<section>
- <title>Building and deploying <literal>jpa</literal> booking
- example</title>
-
- <para>Step one setup the datasource, step two build the app, step three
- deploy.</para>
-
+ <title>
+ Building and deploying
+ <literal>jpa</literal>
+ booking example
+ </title>
+
+ <para>
+ Step one setup the datasource, step two build the app, step
+ three deploy.
+ </para>
+
<section>
<title>Setting up the datasource</title>
-
- <para> The Weblogic 10.X version of the example uses 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
- <literal>persistence.xml</literal> to use the PointBase
- dialect. For reference the
- <literal>jpa/weblogic92</literal> example uses
- PointBase.</para>
- <para>Configuring the datasource is very similar to the jee5 <xref
- linkend="weblogic-hsql-jee5-ds"/>. Follow the steps in
- that section, but use the following entries where needed.
+
+ <para>
+ 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
+ <literal>persistence.xml</literal>
+ to use the PointBase dialect. For reference the
+ <literal>jpa/weblogic92</literal>
+ example uses PointBase.
+ </para>
+ <para>
+ Configuring the datasource is very similar to the jee5
+ <xref linkend="weblogic-hsql-jee5-ds" />
+ . Follow the steps in that section, but use the following
+ entries where needed.
<itemizedlist>
<listitem>
- <para>DataSource Name:
- <literal>seam-jpa-ds</literal></para>
+ <para>
+ DataSource Name:
+ <literal>seam-jpa-ds</literal>
+ </para>
</listitem>
<listitem>
- <para>JNDI Name: <literal>seam-jpa-ds</literal>
- </para>
+ <para>
+ JNDI Name:
+ <literal>seam-jpa-ds</literal>
+ </para>
</listitem>
- </itemizedlist> </para>
+ </itemizedlist>
+ </para>
</section>
<section>
<title>Building the example</title>
-
- <para> Building it only requires running the correct ant command:
-
-
- <programlisting>ant -f build-weblogic10.xml</programlisting>
- This will create container specific distribution and exploded
- archive directories.</para>
+
+ <para>
+ Building it only requires running the correct ant
+ command:
+
+ <programlisting>
+ ant -f build-weblogic10.xml
+ </programlisting>
+ This will create a container specific distribution and
+ exploded archive directories.
+ </para>
</section>
<section>
<title>Deploying the example</title>
-
- <para> When we installed Weblogic following <xref
- linkend="weblogic-domain"/> 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.</para>
-
- <programlisting>cp ./dist-weblogic10/jboss-seam-jpa.war
-
/home/jbalunas/bea/user_projects/domains/seam_examples/autodeploy</programlisting>
-
- <para>Check out the application at the following
+
+ <para>
+ When we installed Weblogic following
+ <xref linkend="weblogic-domain" />
+ 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.
+ </para>
+
+ <programlisting>
+ cp ./dist-weblogic10/jboss-seam-jpa.war
+ /jboss/apps/bea/user_projects/domains/seam_examples/autodeploy
+ </programlisting>
+
+ <para>
+ Check out the application at the following
<literal>http://localhost:7001/jboss-seam-jpa/</literal>
- .</para>
+ .
+ </para>
</section>
</section>
<section id="weblogic-jpa-diff">
@@ -642,31 +1039,39 @@
with an older version of the
<literal>ANTLR</literal> libraries that
Weblogic 10.x uses internally. OC4J have the same
- issue as well. </para>
+ issue as well. It also configures the application to
+ use the shared JSF libraries that were installed
+ above.</para>
-
- <programlisting role="XML"><![CDATA[<?xml
version="1.0" encoding="UTF-8"?>
+ <programlisting role="XML"><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
-
+ <library-ref>
+ <library-name>jsf</library-name>
+ <specification-version>1.2</specification-version>
+ <implementation-version>1.2</implementation-version>
+ <exact-match>false</exact-match>
+ </library-ref>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>]]></programlisting>
- <para>This file make Weblogic use classes and
+ <para>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 query
factory by setting the following property in the
<literal>META-INF/persistence.xml</literal>
- file. </para>
+ file. </para>
-
- <programlisting
role="XML"><![CDATA[<property
name="hibernate.query.factory_class"
-
value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory"/>]]></programlisting>
+ <programlisting role="XML"><![CDATA[
+<property name="hibernate.query.factory_class"
+
value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory"/>]]>
+ </programlisting>
</listitem>
<listitem>
<para>
@@ -675,9 +1080,20 @@
transactions is enabled by adding:</para>
- <programlisting
role="XML"><![CDATA[<transaction:entity-transaction
entity-manager="#{em}"/>]]></programlisting>
-
+ <programlisting role="XML"><![CDATA[
+ <transaction:entity-transaction
entity-manager="#{em}"/>]]></programlisting>
</listitem>
+ <listitem>
+ <para>
+ <literal>WEB-INF/web.xml</literal>
+ — Because the
<literal>jsf-impl.jar</literal>
+ is not in the <literal>WAR</literal> this
listener
+ need to be configured :</para>
+ <programlisting role="XML"><![CDATA[
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>]]></programlisting>
+ </listitem>
</itemizedlist>
</listitem>
<listitem>
@@ -688,24 +1104,20 @@
<listitem>
<para>
<literal>META-INF/persistence.xml</literal>
- — Except for datasource name the WebLogic
+ — Except for datasource name the Weblogic
version sets:
</para>
- <programlisting
role="XML"><![CDATA[<property
- name="hibernate.transaction.manager_lookup_class"
-
value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>]]></programlisting>
+ <programlisting role="XML"><![CDATA[
+<property name="hibernate.transaction.manager_lookup_class"
+
value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>]]>
+ </programlisting>
</listitem>
<listitem>
- <para><literal>WEB-INF/jboss-web.xml</literal>
- — The JBoss version uses this instead of
- <literal>weblogic.xml</literal></para>
- </listitem>
- <listitem>
<para><literal>WEB-INF/lib</literal>
— The
Weblogic version requires several library
packages because they are not included as they are
with JBoss AS. These are primarily for hibernate,
- JSF-RI support and their dependencies.
+ and its dependencies.
</para>
<itemizedlist>
<listitem>
@@ -754,27 +1166,8 @@
</simpara>
</listitem>
</itemizedlist>
- </listitem>
+ </listitem>
<listitem>
- <para>Seam requires JSF 1.2 and these are
- jars needed for that. Weblogic 10.3.TP
- does not ship JSF libraries installed by
- default.
- </para>
- <itemizedlist>
- <listitem>
- <simpara>
- <literal>jsf-api.jar</literal>
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- <literal>jsf-impl.jar</literal>
- </simpara>
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
<para>Various third party jars that
Weblogic needs:
</para>
@@ -837,16 +1230,10 @@
files, and adding dependent jars that Weblogic 10.x does not ship
with.</para>
- <para>We still need to live within the constraints imposed to us by
- Weblogic, and because of that this example will generate a
- <literal>WAR</literal> based application instead of an
- <literal>EAR</literal>. See <xref
- linkend="weblogic-ejb-blockers"/> for details.</para>
-
<para>This example will cover the basic <literal>seam-gen
WAR</literal>
deployment. This will demonstrate Seam POJO components, Hibernate
JPA, Facelets, Drools security, RichFaces, and a configurable
- DataSource.</para>
+ dataSource.</para>
<section>
<title>Running <literal>seam-gen</literal>
setup</title>
@@ -857,7 +1244,6 @@
directory of the Seam distribution. Note the paths here are my own,
feel free to change for you environment.
-
<programlisting><![CDATA[./seam setup
Buildfile: build.xml
@@ -870,7 +1256,7 @@
/home/jbalunas/workspace
[input] Enter your JBoss home directory [C:/Program Files/jboss-4.2.2.GA]
[C:/Program Files/jboss-4.2.2.GA]
-/home/jbalunas/jboss/jboss-4.2.2.GA
+/jboss/apps/jboss-4.2.2.GA
[input] Enter the project name [myproject] [myproject]
weblogic-example
[echo] Accepted project name as: weblogic_example
@@ -922,7 +1308,7 @@
[propertyfile] Creating new property file:
/rhdev/projects/jboss-seam/cvs-head/jboss-seam/seam-gen/build.properties
[echo] Installing JDBC driver jar to JBoss server
- [copy] Copying 1 file to /home/jbalunas/jboss/jboss-4.2.2.GA/server/default/lib
+ [copy] Copying 1 file to /jboss/apps/jboss-4.2.2.GA/server/default/lib
[echo] Type 'seam create-project' to create the new project
BUILD SUCCESSFUL]]></programlisting>
@@ -949,10 +1335,11 @@
<itemizedlist>
<listitem>
<para>Change the default target to
- <literal>archive</literal>.
-
+ <literal>archive</literal>.
</para>
- <programlisting
role="XML"><![CDATA[<project name="weblogic_example"
default="archive" basedir=".">]]></programlisting>
+ <programlisting role="XML">
+<![CDATA[<project name="weblogic_example" default="archive"
basedir=".">]]>
+ </programlisting>
</listitem>
</itemizedlist>
</listitem>
@@ -973,14 +1360,21 @@
admin console)</para>
</listitem>
<listitem>
- <para>Change the transaction type to
- <literal>RESOURCE_LOCAL</literal> so
- that we can use JPA transactions.</para>
- <programlisting
role="XML"><![CDATA[<persistence-unit name="weblogic_example"
transaction-type="RESOURCE_LOCAL">]]></programlisting>
+ <para>
+ Change the transaction type to
+ <literal>RESOURCE_LOCAL</literal>
+ so that we can use JPA transactions.
+ </para>
+ <programlisting role="XML">
+ <![CDATA[
+<persistence-unit name="weblogic_example"
transaction-type="RESOURCE_LOCAL">]]>
+ </programlisting>
</listitem>
<listitem>
- <para> Add/modify the properties below for
- Weblogic support:</para>
+ <para>
+ Add/modify the properties below for
+ Weblogic support:
+ </para>
<programlisting
role="XML"><![CDATA[<property
name="hibernate.cache.provider_class"
value="org.hibernate.cache.HashtableCacheProvider"/>
<property name="hibernate.transaction.manager_lookup_class"
@@ -988,14 +1382,6 @@
]]></programlisting>
</listitem>
<listitem>
- <para> Remove the JBoss AS specific method of
- exposing the EntityManagerFactory:
- </para>
- <programlisting
role="XML"><![CDATA[<property
- name="jboss.entity.manager.factory.jndi.name"
-
value="java:/weblogic_exampleEntityManagerFactory">]]></programlisting>
- </listitem>
- <listitem>
<para> You'll need to alter
<literal>persistence-prod.xml</literal>
as well if you want to deploy to Weblogic
@@ -1016,31 +1402,61 @@
</varlistentry>
<varlistentry>
<term>
- <literal>resource/WEB-INF/components.xml</literal>
+ <literal>
+ resource/WEB-INF/components.xml
+ </literal>
</term>
<listitem>
- <para> We want to use JPA transactions so we need to add
- the following to let Seam know. </para>
+ <para>
+ We want to use JPA transactions so we need to
+ add the following to let Seam know.
+ </para>
<programlisting
role="XML"><![CDATA[<transaction:entity-transaction
entity-manager="#{entityManager}"/>]]></programlisting>
- <para>You will also need to add the transaction
- namespace and schema location to the top of the
- document.</para>
+ <para>
+ You will also need to add the transaction
+ namespace and schema location to the top of
+ the document.
+ </para>
<programlisting
role="XML"><![CDATA[xmlns:transaction="http://jboss....
<programlisting
role="XML"><![CDATA[http://jboss.com/products/seam/transa...
http://jboss.com/products/seam/transaction-2.1.xsd]]></programlisti...
</listitem>
</varlistentry>
<varlistentry>
<term>
- <literal>resources/WEB-INF/jboss-app.xml</literal>
+ <literal>resource/WEB-INF/web.xml</literal>
</term>
<listitem>
- <para> You can delete this file as we aren't deploying
- to JBoss AS ( <literal>jboss-app.xml</literal>
- is used to enable classloading isolation in JBoss
- AS) </para>
+ <para>
+ <literal>WEB-INF/web.xml</literal>
+ — Because the
+ <literal>jsf-impl.jar</literal>
+ is not in the
+ <literal>WAR</literal>
+ this listener need to be configured :
+ </para>
+ <programlisting role="XML"><![CDATA[
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>]]></programlisting>
</listitem>
</varlistentry>
<varlistentry>
+ <term>
+ <literal>
+ resources/WEB-INF/jboss-app.xml
+ </literal>
+ </term>
+ <listitem>
+ <para>
+ You can delete this file as we aren't
+ deploying to JBoss AS (
+ <literal>jboss-app.xml</literal>
+ is used to enable classloading isolation in
+ JBoss AS)
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term> <literal>resources/*-ds.xml</literal>
</term>
<listitem>
@@ -1063,23 +1479,18 @@
<itemizedlist>
<listitem>
- <para>Missing jars — There are two libraries that
+ <para>Missing jar — There is one library that
<literal>seam-gen</literal> does not provide by
- default. These need to be copied into your projects
- <literal>lib</literal> directory manually.
+ default. This needs to be copied into your projects
+ <literal>/lib</literal> directory manually.
</para>
<itemizedlist>
<listitem>
<para>jboss-archive-browsing.jar — can
be found in the
- <literal>@SEAM_DIST/examples/jpa/lib</literal>
+
<literal>@SEAM_DIST/examples/wiki/lib</literal>
directory. </para>
</listitem>
- <listitem>
- <para>el-ri.jar — is also found in the
- <literal>@SEAM_DIST/examples/jpa/lib</literal>
- directory. </para>
- </listitem>
</itemizedlist>
</listitem>
<listitem>
@@ -1087,33 +1498,25 @@
<literal>build.xml</literal>. Find the target
<literal>war</literal> and add the following to the end
of the target.</para>
-
-
- <programlisting role="XML"><![CDATA[<copy
todir="${war.dir}/WEB-INF/lib">
- <fileset dir="${lib.dir}">
- <!--JSF implementation -->
- <include name="jsf-api.jar" />
- <include name="jsf-impl.jar" />
-
- <!-- Misc 3rd party -->
- <include name="commons-logging.jar" />
- <include name="dom4j.jar" />
- <include name="javassist.jar" />
- <include name="cglib.jar" />
- <include name="antlr.jar" />
-
- <!-- Hibernate -->
- <include name="hibernate.jar" />
- <include name="hibernate-commons-annotations.jar"
/>
- <include name="hibernate-annotations.jar" />
- <include name="hibernate-entitymanager.jar" />
- <include name="hibernate-validator.jar" />
- <include name="jboss-archive-browsing.jar" />
-
- <!-- Needed for Drools -->
- <include name="core.jar"/>
- </fileset>
- </copy>]]></programlisting>
+ <programlisting role="XML"><![CDATA[
+ <copy todir="${war.dir}/WEB-INF/lib">
+ <fileset dir="${lib.dir}">
+ <!-- Misc 3rd party -->
+ <include name="commons-logging.jar" />
+ <include name="dom4j.jar" />
+ <include name="javassist.jar" />
+ <include name="cglib.jar" />
+ <include name="antlr.jar" />
+
+ <!-- Hibernate -->
+ <include name="hibernate.jar" />
+ <include name="hibernate-commons-annotations.jar" />
+ <include name="hibernate-annotations.jar" />
+ <include name="hibernate-entitymanager.jar" />
+ <include name="hibernate-validator.jar" />
+ <include name="jboss-archive-browsing.jar" />
+ </fileset>
+ </copy>]]></programlisting>
</listitem>
</itemizedlist>
@@ -1179,12 +1582,12 @@
development mode. This means to deploy the application all we
need to do is copy it into the autodeploy directory.
</para>
+
+<programlisting role="XML">cp ./dist/weblogic_example.war
/jboss/apps/bea/user_projects/domains/seam_examples/autodeploy</programlisting>
-
- <programlisting role="XML">cp ./dist/weblogic_example.war
/home/jbalunas/bea/user_projects/domains/seam_examples/autodeploy</programlisting>
<para>Check out the application at the following
- <literal>http://localhost:7001/weblogic_example/</literal>
- .</para>
+ <literal>http://localhost:7001/weblogic_example/</literal>.
+ .</para>
</section>
</section>
</section>
Modified: trunk/examples/jpa/build-weblogic10.xml
===================================================================
--- trunk/examples/jpa/build-weblogic10.xml 2008-05-12 19:01:55 UTC (rev 8167)
+++ trunk/examples/jpa/build-weblogic10.xml 2008-05-12 19:20:19 UTC (rev 8168)
@@ -32,9 +32,6 @@
<include name="lib/commons-digester.jar" />
<include name="lib/commons-collections.jar" />
<include name="lib/commons-logging.jar" />
- <!-- JSF (and related) implementation -->
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
<!-- Hibernate and deps -->
<include name="lib/hibernate.jar" />
Modified: trunk/examples/jpa/resources-weblogic10/WEB-INF/web.xml
===================================================================
--- trunk/examples/jpa/resources-weblogic10/WEB-INF/web.xml 2008-05-12 19:01:55 UTC (rev
8167)
+++ trunk/examples/jpa/resources-weblogic10/WEB-INF/web.xml 2008-05-12 19:20:19 UTC (rev
8168)
@@ -9,6 +9,10 @@
<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
+
+ <listener>
+
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
<filter>
<filter-name>Seam Filter</filter-name>
Modified: trunk/examples/jpa/resources-weblogic10/WEB-INF/weblogic.xml
===================================================================
--- 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 @@
<?xml version="1.0" encoding="UTF-8"?>
-<weblogic-web-app
-xmlns="http://www.bea.com/ns/weblogic/90"
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
-
-<container-descriptor>
- <prefer-web-inf-classes>true</prefer-web-inf-classes>
-</container-descriptor>
+<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
+ <library-ref>
+ <library-name>jsf</library-name>
+ <specification-version>1.2</specification-version>
+ <implementation-version>1.2</implementation-version>
+ <exact-match>false</exact-match>
+ </library-ref>
+ <container-descriptor>
+ <prefer-web-inf-classes>true</prefer-web-inf-classes>
+ </container-descriptor>
</weblogic-web-app>