Seam SVN: r10412 - tags/JBoss_Seam_2_1_2_CR1.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-04-14 15:03:01 -0400 (Tue, 14 Apr 2009)
New Revision: 10412
Modified:
tags/JBoss_Seam_2_1_2_CR1/changelog.txt
Log:
update changelog
Modified: tags/JBoss_Seam_2_1_2_CR1/changelog.txt
===================================================================
--- tags/JBoss_Seam_2_1_2_CR1/changelog.txt 2009-04-14 18:59:42 UTC (rev 10411)
+++ tags/JBoss_Seam_2_1_2_CR1/changelog.txt 2009-04-14 19:03:01 UTC (rev 10412)
@@ -109,6 +109,8 @@
* [JBSEAM-4062] - Conversation deadlock for seam wicket pages with multiple request targets
* [JBSEAM-4066] - captureCurrentView on redirect should capture all request parameters
* [JBSEAM-4069] - Could not aquire lock to update nested set tree in org.jboss.seam.wiki.core.nestedset.listener.NestedSetMonitor
+ * [JBSEAM-4111] - wicket example - Can't instantiate page using constructor
+ * [JBSEAM-4112] - wicket example - runtime instrumentation broken
** Feature Request
* [JBSEAM-1350] - Provide download component (e.g.<s:download value=#{FileManager.getFileById('10')" contentType="#{FileManager.contentType}" />)
15 years, 7 months
Seam SVN: r10411 - in tags/JBoss_Seam_2_1_2_CR1: src/wicket/org/jboss/seam/wicket and 1 other directories.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-04-14 14:59:42 -0400 (Tue, 14 Apr 2009)
New Revision: 10411
Modified:
tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java
tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java
tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java
tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java
tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java
tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java
tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/ioc/WicketHandler.java
Log:
JBSEAM-4111 JBSEAM-4112
Modified: tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java
===================================================================
--- tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java 2009-04-14 18:01:50 UTC (rev 10410)
+++ tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java 2009-04-14 18:59:42 UTC (rev 10411)
@@ -122,7 +122,7 @@
hotelBooking.setBookingDetails();
if (hotelBooking.isBookingValid())
{
- setResponsePage(Confirm.class);
+ setResponsePage(new Confirm(new PageParameters()));
}
}
Modified: tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java
===================================================================
--- tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java 2009-04-14 18:01:50 UTC (rev 10410)
+++ tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java 2009-04-14 18:59:42 UTC (rev 10411)
@@ -41,7 +41,7 @@
@Override
public void onClick()
{
- setResponsePage(Book.class);
+ setResponsePage(new Book(new PageParameters()));
}
});
body.add(new Link("confirm")
Modified: tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java
===================================================================
--- tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java 2009-04-14 18:01:50 UTC (rev 10410)
+++ tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java 2009-04-14 18:59:42 UTC (rev 10411)
@@ -31,7 +31,7 @@
public void onClick()
{
hotelBooking.bookHotel();
- setResponsePage(Book.class);
+ setResponsePage(new Book(new PageParameters()));
}
});
body.add(new Link("cancel")
Modified: tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java
===================================================================
--- tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java 2009-04-14 18:01:50 UTC (rev 10410)
+++ tags/JBoss_Seam_2_1_2_CR1/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java 2009-04-14 18:59:42 UTC (rev 10411)
@@ -37,9 +37,12 @@
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.model.PropertyModel;
-import org.jboss.seam.annotations.Begin;
+import org.apache.wicket.PageParameters;
+import org.jboss.seam.wicket.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.security.Restrict;
+import org.jboss.seam.core.Conversation;
+import org.jboss.seam.core.Manager;
import org.jboss.seam.example.wicket.action.Booking;
import org.jboss.seam.example.wicket.action.BookingList;
import org.jboss.seam.example.wicket.action.Hotel;
@@ -127,12 +130,12 @@
item.add(new Link("viewHotel")
{
+ @Begin
@Override
- @Begin
public void onClick()
{
hotelBooking.selectHotel(hotel);
- setResponsePage(org.jboss.seam.example.wicket.Hotel.class);
+ setResponsePage(new org.jboss.seam.example.wicket.Hotel(new PageParameters()));
}
});
Modified: tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java
===================================================================
--- tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java 2009-04-14 18:01:50 UTC (rev 10410)
+++ tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java 2009-04-14 18:59:42 UTC (rev 10411)
@@ -194,6 +194,14 @@
manager.restoreConversation();
}
}
+ else
+ {
+ Manager manager = Manager.instance();
+ if (manager.isLongRunningConversation())
+ {
+ page.setMetaData(CID, Manager.instance().getCurrentConversationId());
+ }
+ }
}
}
Modified: tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java
===================================================================
--- tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java 2009-04-14 18:01:50 UTC (rev 10410)
+++ tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java 2009-04-14 18:59:42 UTC (rev 10411)
@@ -130,15 +130,6 @@
{
this.classPool = classPool;
this.scanAnnotations = scanAnnotations;
-
- try
- {
- instrumentedComponent = classPool.get(InstrumentedComponent.class.getName());
- }
- catch (NotFoundException e)
- {
- throw new RuntimeException(e);
- }
}
public JavassistInstrumentor(ClassPool classPool, Set<String> packagesToInstrument, boolean scanAnnotations)
@@ -197,7 +188,7 @@
CtClass exception = classPool.get(Exception.class.getName());
- implementation.addInterface(instrumentedComponent);
+ implementation.addInterface(getInstrumentedComponentInterface());
CtMethod getHandlerMethod = CtNewMethod.getter("getHandler", handlerField);
CtMethod getEnclosingInstance = CtNewMethod.make("public " + InstrumentedComponent.class.getName() + " getEnclosingInstance() { return handler == null ? null : handler.getEnclosingInstance(this); }", implementation);
implementation.addMethod(getEnclosingInstance);
@@ -427,7 +418,7 @@
// can't use 'isSubtype' because the superclass may be instrumented
// while we are not
for (String inf : clazz.getClassFile2().getInterfaces())
- if (inf.equals(instrumentedComponent.getName()))
+ if (inf.equals(getInstrumentedComponentInterface().getName()))
return false;
}
catch (Exception e)
@@ -439,6 +430,26 @@
}
/**
+ * We have to look this up lazily because when our constructor is called we may not have the appropriate paths added to our ClassPool,
+ * particularly if we are doing runtime instrumentation using WEB-INF/wicket
+ */
+ private CtClass getInstrumentedComponentInterface()
+ {
+ if (instrumentedComponent == null)
+ {
+ try
+ {
+ instrumentedComponent = classPool.get(InstrumentedComponent.class.getName());
+ }
+ catch (NotFoundException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ return instrumentedComponent;
+ }
+
+ /**
* This is the implementation of the ClassFileTransformer interface.
* @see java.lang.instrument.ClassFileTransformer
*/
@@ -448,22 +459,35 @@
if (index < 1)
return null;
String packageName = className.substring(0, index);
- if (!packagesToInstrument.contains(packageName) || className.contains("_javassist_"))
- {
- return null;
- }
- try
- {
- CtClass result = instrumentClass(classfileBuffer);
- if (result == null)
- return null;
- else
- return result.toBytecode();
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
+ do
+ {
+ if (packagesToInstrument.contains(packageName) && !className.contains("_javassist_"))
+ {
+ try
+ {
+ CtClass result = instrumentClass(classfileBuffer);
+ if (result == null)
+ return null;
+ else
+ return result.toBytecode();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ index = packageName.lastIndexOf('/');
+ if (index < 1)
+ {
+ packageName = "";
+ }
+ else
+ {
+ packageName = packageName.substring(0,index);
+ }
+ } while (packageName.length() > 0);
+
+ return null;
}
/**
Modified: tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/ioc/WicketHandler.java
===================================================================
--- tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/ioc/WicketHandler.java 2009-04-14 18:01:50 UTC (rev 10410)
+++ tags/JBoss_Seam_2_1_2_CR1/src/wicket/org/jboss/seam/wicket/ioc/WicketHandler.java 2009-04-14 18:59:42 UTC (rev 10411)
@@ -68,7 +68,7 @@
}
reentrant++;
InstrumentedComponent enclosing = getEnclosingInstance(invocationContext.getBean());
- if (enclosing != null)
+ if (enclosing != null && enclosing.getHandler() != null)
{
enclosing.getHandler().injectEnclosingInstance(enclosing);
}
@@ -124,7 +124,7 @@
}
}
InstrumentedComponent enclosing = getEnclosingInstance(invocationContext.getBean());
- if (enclosing != null)
+ if (enclosing != null && enclosing.getHandler() != null)
{
enclosing.getHandler().disinjectEnclosingInstance(enclosing);
}
15 years, 7 months
Seam SVN: r10410 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-14 14:01:50 -0400 (Tue, 14 Apr 2009)
New Revision: 10410
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
Log:
JBoss AS 4.2.3.GA instead of 4.2.2.GA
Modified: trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml 2009-04-14 18:01:30 UTC (rev 10409)
+++ trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml 2009-04-14 18:01:50 UTC (rev 10410)
@@ -50,10 +50,10 @@
</section>
<section>
- <title>Setting up a new Eclipse project</title>
+ <title>Setting up a new project</title>
<para>The first thing we need to do is configure seam-gen for your environment: JBoss AS installation directory,
- Eclipse workspace, and database connection. It's easy, just type:</para>
+ project workspace, and database connection. It's easy, just type:</para>
<programlisting>cd jboss-seam-2.0.x
seam setup</programlisting>
@@ -67,10 +67,10 @@
setup:
[echo] Welcome to seam-gen :-)
- [input] Enter your Java project workspace (the directory that contains your Seam projects) [C:/Projects] [C:/Projects]
+ [input] Enter your project workspace (the directory that contains your Seam projects) [C:/Projects] [C:/Projects]
/Users/pmuir/workspace
- [input] Enter your JBoss home directory [C:/Program Files/jboss-4.2.2.GA] [C:/Program Files/jboss-4.2.2.GA]
-/Applications/jboss-4.2.2.GA
+ [input] Enter your JBoss home directory [C:/Program Files/jboss-4.2.3.GA] [C:/Program Files/jboss-4.2.3.GA]
+/Applications/jboss-4.2.3.GA
[input] Enter the project name [myproject] [myproject]
helloworld
[echo] Accepted project name as: helloworld
@@ -164,7 +164,7 @@
<para>Go to <literal>http://localhost:8080/helloworld</literal> to see a welcome page. This is a facelets page,
<literal>view/home.xhtml</literal>, using the template <literal>view/layout/template.xhtml</literal>.
- You can edit this page, or the template, in eclipse, and see the results <emphasis>immediately</emphasis>,
+ You can edit this page, or the template, in Eclipse, and see the results <emphasis>immediately</emphasis>,
by clicking refresh in your browser.</para>
<para>Don't get scared by the XML configuration documents that were generated into the project directory. They
15 years, 7 months
Seam SVN: r10409 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-14 14:01:30 -0400 (Tue, 14 Apr 2009)
New Revision: 10409
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml
Log:
cite page for installing JBoss Tools
Modified: trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml 2009-04-14 17:44:58 UTC (rev 10408)
+++ trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml 2009-04-14 18:01:30 UTC (rev 10409)
@@ -33,7 +33,15 @@
installed before starting.
</para>
- <para>TODO - detail where the update sites are.</para>
+ <para>
+ Please see the official <ulink
+ url="http://www.jboss.org/tools/download/installation">JBoss Tools
+ installation</para> page for the quickest way to get JBoss Tools setup
+ in Eclipse. You can also check out the <ulink
+ url="http://www.jboss.org/community/wiki/InstallingJBossTools">Installing
+ JBoss Tools</ulink> page on the JBoss community wiki for the gory
+ details and a set of alternative installation approaches.
+ </para>
</section>
15 years, 7 months
Seam SVN: r10408 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-04-14 13:44:58 -0400 (Tue, 14 Apr 2009)
New Revision: 10408
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Cache.xml
trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml
trunk/doc/Seam_Reference_Guide/en-US/Framework.xml
trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml
trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
trunk/doc/Seam_Reference_Guide/en-US/Hsearch.xml
trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
Log:
JBSEAM-4116
Modified: trunk/doc/Seam_Reference_Guide/en-US/Cache.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Cache.xml 2009-04-14 17:39:18 UTC (rev 10407)
+++ trunk/doc/Seam_Reference_Guide/en-US/Cache.xml 2009-04-14 17:44:58 UTC (rev 10408)
@@ -119,7 +119,7 @@
<variablelist>
<varlistentry>
<term>
- JBoss Cache 1.x (suitable for use in JBoss 4.2.x and other
+ JBoss Cache 1.x (suitable for use in JBoss 4.2.x or later and other
containers)
</term>
<listitem>
@@ -141,7 +141,7 @@
</varlistentry>
<varlistentry>
<term>
- JBoss POJO Cache 1.x (suitable for use in JBoss 4.2.x and other
+ JBoss POJO Cache 1.x (suitable for use in JBoss 4.2.x or later and other
containers)
</term>
<listitem>
@@ -390,4 +390,4 @@
</section>
-</chapter>
\ No newline at end of file
+</chapter>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-04-14 17:39:18 UTC (rev 10407)
+++ trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-04-14 17:44:58 UTC (rev 10408)
@@ -1166,7 +1166,7 @@
<para> The default HTTP session timeout can be modified in
<literal>server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml</literal> for JBoss 4.0.x, or in
- <literal>server/default/deploy/jboss-web.deployer/conf/web.xml</literal> for JBoss 4.2.x. The following
+ <literal>server/default/deploy/jboss-web.deployer/conf/web.xml</literal> for JBoss 4.2.x or later. The following
entry in this file controls the default session timeout for all web applications: </para>
<programlisting role="XML"><![CDATA[<session-config>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml 2009-04-14 17:39:18 UTC (rev 10407)
+++ trunk/doc/Seam_Reference_Guide/en-US/Dependencies.xml 2009-04-14 17:44:58 UTC (rev 10408)
@@ -48,7 +48,7 @@
type is listed as <literal>war</literal>, the library should be placed in
the <literal>/WEB-INF/lib</literal> directory of your application's war
file. The scope of the dependency is either all, runtime or provided (by
- JBoss AS 4.2).
+ JBoss AS 4.2 or 5.0).
</para>
<para>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Framework.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Framework.xml 2009-04-14 17:39:18 UTC (rev 10407)
+++ trunk/doc/Seam_Reference_Guide/en-US/Framework.xml 2009-04-14 17:44:58 UTC (rev 10408)
@@ -598,4 +598,4 @@
</section>
-</chapter>
\ No newline at end of file
+</chapter>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml 2009-04-14 17:39:18 UTC (rev 10407)
+++ trunk/doc/Seam_Reference_Guide/en-US/Getting_Started_With_JBoss_Tools.xml 2009-04-14 17:44:58 UTC (rev 10408)
@@ -27,10 +27,10 @@
<title>Before you start</title>
<para>
- Make sure you have JDK 5, JBoss AS 4.2, Eclipse 3.3, the JBoss Tools
- plugins (at least Seam Tools, the Visual Page Editor, jBPM Tools and
- JBoss AS Tools) and the TestNG plugin for Eclipse correctly installed
- before starting.
+ Make sure you have JDK 5, JBoss AS 4.2 or 5.0, Eclipse 3.3, the JBoss
+ Tools plugins (at least Seam Tools, the Visual Page Editor, jBPM Tools
+ and JBoss AS Tools) and the TestNG plugin for Eclipse correctly
+ installed before starting.
</para>
<para>TODO - detail where the update sites are.</para>
@@ -69,9 +69,10 @@
<para>
- Now, we need to tell JBoss Tools about JBoss AS. This is a two stage
- process, first we need to define a runtime, make sure you select JBoss
- AS 4.2:
+ Now, we need to tell JBoss Tools about JBoss AS. In this example we
+ are using JBoss AS 4.2, though you can certainly use JBoss AS 5.0 as
+ well. Selecting JBoss AS is a two step process. First we need to
+ define a runtime. Again, we'll choose JBoss AS 4.2 in this case:
</para>
<mediaobject>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml 2009-04-14 17:39:18 UTC (rev 10407)
+++ trunk/doc/Seam_Reference_Guide/en-US/Gettingstarted.xml 2009-04-14 17:44:58 UTC (rev 10408)
@@ -18,17 +18,17 @@
use it in conjunction with Eclipse for debugging and integration testing. If you don't want to install Eclipse,
you can still follow along with this tutorial—all steps can be performed from the command line.</para>
- <para>Seam-gen is basically just a big ugly Ant script wrapped around Hibernate Tools, together with some templates.
+ <para>seam-gen is basically just an intricate Ant script wrapped around Hibernate Tools, together with some templates.
That makes it easy to customize if you need to.</para>
<section>
<title>Before you start</title>
<para>Make sure you have JDK 5 or JDK 6 (see <xref
- linkend="jdk_dependencies"/> for details), JBoss AS 4.2 and Ant 1.6, along with recent versions of Eclipse, the
- JBoss IDE plugin for Eclipse and the TestNG plugin for Eclipse correctly installed before starting. Add your
- JBoss installation to the JBoss Server View in Eclipse. Start JBoss in debug mode. Finally, start a command
- prompt in the directory where you unzipped the Seam distribution.</para>
+ linkend="jdk_dependencies"/> for details), JBoss AS 4.2 or 5.0 and Ant 1.7.0, along with recent versions of
+ Eclipse, the JBoss IDE plugin for Eclipse and the TestNG plugin for Eclipse correctly installed before
+ starting. Add your JBoss installation to the JBoss Server View in Eclipse. Start JBoss in debug mode.
+ Finally, start a command prompt in the directory where you unzipped the Seam distribution.</para>
<para>JBoss has sophisticated support for hot re-deployment of WARs and EARs. Unfortunately, due to bugs in the
JVM, repeated redeployment of an EAR—which is common during development—eventually causes the JVM to run out
@@ -410,11 +410,11 @@
<section>
<title>Using Seam with JBoss 4.0</title>
- <para> Seam 2.0 was developed for JavaServer Faces 1.2. When using JBoss AS, we recommend using JBoss 4.2, which
- bundles the JSF 1.2 reference implementation. However, it is still possible to use Seam 2.0 on the JBoss 4.0
- platform. There are two basic steps required to do this: install an EJB3-enabled version of JBoss 4.0 and
- replace MyFaces with the JSF 1.2 reference implementation. Once you complete these steps, Seam 2.0
- applications can be deployed to JBoss 4.0.</para>
+ <para> Seam 2.0 was developed for JavaServer Faces 1.2. When using JBoss AS, we recommend using JBoss 4.2 or
+ JBoss 5.0, both of which bundle the JSF 1.2 reference implementation. However, it is still possible to use
+ Seam 2.0 on the JBoss 4.0 platform. There are two basic steps required to do this: install an EJB3-enabled
+ version of JBoss 4.0 and replace MyFaces with the JSF 1.2 reference implementation. Once you complete these
+ steps, Seam 2.0 applications can be deployed to JBoss 4.0.</para>
<section>
<title>Install JBoss 4.0</title>
Modified: trunk/doc/Seam_Reference_Guide/en-US/Hsearch.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Hsearch.xml 2009-04-14 17:39:18 UTC (rev 10407)
+++ trunk/doc/Seam_Reference_Guide/en-US/Hsearch.xml 2009-04-14 17:44:58 UTC (rev 10408)
@@ -54,7 +54,7 @@
</persistence-unit>]]></programlisting>
<para>If you plan to target Hibernate Annotations or EntityManager 3.2.x
- (embedded into JBoss AS 4.2.GA), you also need to configure the
+ (embedded into JBoss AS 4.2.x and later), you also need to configure the
appropriate event listeners.</para>
<programlisting role="XML"><![CDATA[<persistence-unit name="sample">
Modified: trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2009-04-14 17:39:18 UTC (rev 10407)
+++ trunk/doc/Seam_Reference_Guide/en-US/Tutorial.xml 2009-04-14 17:44:58 UTC (rev 10408)
@@ -44,7 +44,7 @@
<section>
<title>Running the examples on JBoss AS</title>
- <para>The examples are configured for use on JBoss 4.2. You'll need to set <literal>jboss.home</literal>,
+ <para>The examples are configured for use on JBoss AS 4.2 or 5.0. You'll need to set <literal>jboss.home</literal>,
in the shared <literal>build.properties</literal> file in the root folder of your Seam
installation, to the location of your JBoss AS installation.</para>
15 years, 7 months
Seam SVN: r10407 - trunk/src/wicket/org/jboss/seam/wicket.
by seam-commits@lists.jboss.org
Author: cpopetz
Date: 2009-04-14 13:39:18 -0400 (Tue, 14 Apr 2009)
New Revision: 10407
Modified:
trunk/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java
Log:
Propagate conversations to new page targets created while a conversation is active. (Exposed
by JBSEAM-4111)
Modified: trunk/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java 2009-04-14 17:38:24 UTC (rev 10406)
+++ trunk/src/wicket/org/jboss/seam/wicket/SeamWebApplication.java 2009-04-14 17:39:18 UTC (rev 10407)
@@ -194,6 +194,14 @@
manager.restoreConversation();
}
}
+ else
+ {
+ Manager manager = Manager.instance();
+ if (manager.isLongRunningConversation())
+ {
+ page.setMetaData(CID, Manager.instance().getCurrentConversationId());
+ }
+ }
}
}
15 years, 7 months
Seam SVN: r10406 - trunk/src/wicket/org/jboss/seam/wicket/ioc.
by seam-commits@lists.jboss.org
Author: cpopetz
Date: 2009-04-14 13:38:24 -0400 (Tue, 14 Apr 2009)
New Revision: 10406
Modified:
trunk/src/wicket/org/jboss/seam/wicket/ioc/WicketHandler.java
Log:
Fix problem with instrumenting nested anonymous subclasses created from a parent constructor.
Modified: trunk/src/wicket/org/jboss/seam/wicket/ioc/WicketHandler.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/ioc/WicketHandler.java 2009-04-14 17:37:23 UTC (rev 10405)
+++ trunk/src/wicket/org/jboss/seam/wicket/ioc/WicketHandler.java 2009-04-14 17:38:24 UTC (rev 10406)
@@ -68,7 +68,7 @@
}
reentrant++;
InstrumentedComponent enclosing = getEnclosingInstance(invocationContext.getBean());
- if (enclosing != null)
+ if (enclosing != null && enclosing.getHandler() != null)
{
enclosing.getHandler().injectEnclosingInstance(enclosing);
}
@@ -124,7 +124,7 @@
}
}
InstrumentedComponent enclosing = getEnclosingInstance(invocationContext.getBean());
- if (enclosing != null)
+ if (enclosing != null && enclosing.getHandler() != null)
{
enclosing.getHandler().disinjectEnclosingInstance(enclosing);
}
15 years, 7 months
Seam SVN: r10405 - trunk/examples/wicket/src/web/org/jboss/seam/example/wicket.
by seam-commits@lists.jboss.org
Author: cpopetz
Date: 2009-04-14 13:37:23 -0400 (Tue, 14 Apr 2009)
New Revision: 10405
Modified:
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java
trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java
Log:
JBSEAM-4111
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java 2009-04-14 16:07:15 UTC (rev 10404)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Book.java 2009-04-14 17:37:23 UTC (rev 10405)
@@ -122,7 +122,7 @@
hotelBooking.setBookingDetails();
if (hotelBooking.isBookingValid())
{
- setResponsePage(Confirm.class);
+ setResponsePage(new Confirm(new PageParameters()));
}
}
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java 2009-04-14 16:07:15 UTC (rev 10404)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Confirm.java 2009-04-14 17:37:23 UTC (rev 10405)
@@ -41,7 +41,7 @@
@Override
public void onClick()
{
- setResponsePage(Book.class);
+ setResponsePage(new Book(new PageParameters()));
}
});
body.add(new Link("confirm")
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java 2009-04-14 16:07:15 UTC (rev 10404)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Hotel.java 2009-04-14 17:37:23 UTC (rev 10405)
@@ -31,7 +31,7 @@
public void onClick()
{
hotelBooking.bookHotel();
- setResponsePage(Book.class);
+ setResponsePage(new Book(new PageParameters()));
}
});
body.add(new Link("cancel")
Modified: trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java
===================================================================
--- trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java 2009-04-14 16:07:15 UTC (rev 10404)
+++ trunk/examples/wicket/src/web/org/jboss/seam/example/wicket/Main.java 2009-04-14 17:37:23 UTC (rev 10405)
@@ -37,9 +37,12 @@
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.model.PropertyModel;
-import org.jboss.seam.annotations.Begin;
+import org.apache.wicket.PageParameters;
+import org.jboss.seam.wicket.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.security.Restrict;
+import org.jboss.seam.core.Conversation;
+import org.jboss.seam.core.Manager;
import org.jboss.seam.example.wicket.action.Booking;
import org.jboss.seam.example.wicket.action.BookingList;
import org.jboss.seam.example.wicket.action.Hotel;
@@ -127,12 +130,12 @@
item.add(new Link("viewHotel")
{
+ @Begin
@Override
- @Begin
public void onClick()
{
hotelBooking.selectHotel(hotel);
- setResponsePage(org.jboss.seam.example.wicket.Hotel.class);
+ setResponsePage(new org.jboss.seam.example.wicket.Hotel(new PageParameters()));
}
});
15 years, 7 months
Seam SVN: r10404 - trunk/src/wicket/org/jboss/seam/wicket/ioc.
by seam-commits@lists.jboss.org
Author: cpopetz
Date: 2009-04-14 12:07:15 -0400 (Tue, 14 Apr 2009)
New Revision: 10404
Modified:
trunk/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java
Log:
JBSEAM-4112
Modified: trunk/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java
===================================================================
--- trunk/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java 2009-04-14 15:52:09 UTC (rev 10403)
+++ trunk/src/wicket/org/jboss/seam/wicket/ioc/JavassistInstrumentor.java 2009-04-14 16:07:15 UTC (rev 10404)
@@ -130,15 +130,6 @@
{
this.classPool = classPool;
this.scanAnnotations = scanAnnotations;
-
- try
- {
- instrumentedComponent = classPool.get(InstrumentedComponent.class.getName());
- }
- catch (NotFoundException e)
- {
- throw new RuntimeException(e);
- }
}
public JavassistInstrumentor(ClassPool classPool, Set<String> packagesToInstrument, boolean scanAnnotations)
@@ -197,7 +188,7 @@
CtClass exception = classPool.get(Exception.class.getName());
- implementation.addInterface(instrumentedComponent);
+ implementation.addInterface(getInstrumentedComponentInterface());
CtMethod getHandlerMethod = CtNewMethod.getter("getHandler", handlerField);
CtMethod getEnclosingInstance = CtNewMethod.make("public " + InstrumentedComponent.class.getName() + " getEnclosingInstance() { return handler == null ? null : handler.getEnclosingInstance(this); }", implementation);
implementation.addMethod(getEnclosingInstance);
@@ -427,7 +418,7 @@
// can't use 'isSubtype' because the superclass may be instrumented
// while we are not
for (String inf : clazz.getClassFile2().getInterfaces())
- if (inf.equals(instrumentedComponent.getName()))
+ if (inf.equals(getInstrumentedComponentInterface().getName()))
return false;
}
catch (Exception e)
@@ -439,6 +430,26 @@
}
/**
+ * We have to look this up lazily because when our constructor is called we may not have the appropriate paths added to our ClassPool,
+ * particularly if we are doing runtime instrumentation using WEB-INF/wicket
+ */
+ private CtClass getInstrumentedComponentInterface()
+ {
+ if (instrumentedComponent == null)
+ {
+ try
+ {
+ instrumentedComponent = classPool.get(InstrumentedComponent.class.getName());
+ }
+ catch (NotFoundException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ return instrumentedComponent;
+ }
+
+ /**
* This is the implementation of the ClassFileTransformer interface.
* @see java.lang.instrument.ClassFileTransformer
*/
@@ -448,22 +459,35 @@
if (index < 1)
return null;
String packageName = className.substring(0, index);
- if (!packagesToInstrument.contains(packageName) || className.contains("_javassist_"))
- {
- return null;
- }
- try
- {
- CtClass result = instrumentClass(classfileBuffer);
- if (result == null)
- return null;
- else
- return result.toBytecode();
- }
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
+ do
+ {
+ if (packagesToInstrument.contains(packageName) && !className.contains("_javassist_"))
+ {
+ try
+ {
+ CtClass result = instrumentClass(classfileBuffer);
+ if (result == null)
+ return null;
+ else
+ return result.toBytecode();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+ index = packageName.lastIndexOf('/');
+ if (index < 1)
+ {
+ packageName = "";
+ }
+ else
+ {
+ packageName = packageName.substring(0,index);
+ }
+ } while (packageName.length() > 0);
+
+ return null;
}
/**
15 years, 7 months
Seam SVN: r10403 - trunk/examples/wiki.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2009-04-14 11:52:09 -0400 (Tue, 14 Apr 2009)
New Revision: 10403
Modified:
trunk/examples/wiki/build.xml
Log:
Don't check dependencies on every redeploy build
Modified: trunk/examples/wiki/build.xml
===================================================================
--- trunk/examples/wiki/build.xml 2009-04-14 15:51:10 UTC (rev 10402)
+++ trunk/examples/wiki/build.xml 2009-04-14 15:52:09 UTC (rev 10403)
@@ -111,7 +111,10 @@
<!-- ################## SETUP ####################### -->
- <target name="init" depends="copyseam,copyseamdependencies" description="Initialize the project build">
+ <target name="initseam" depends="copyseam,copyseamdependencies"
+ description="Copy seam dependencies/libs"/>
+
+ <target name="init" description="Initialize the project build">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${testclasses.dir}"/>
<mkdir dir="${exploded.war.dir}"/>
@@ -155,7 +158,7 @@
<!-- ################## COMPILE ####################### -->
- <target name="compileclasses" depends="init"
+ <target name="compileclasses"
description="Compile the main Java source code">
<javac classpathref="build.classpath"
@@ -192,34 +195,17 @@
<!-- ################## EXPLODE ####################### -->
- <target name="explodewar" depends="explodehotdeploy, exploderesources, copydatasets"
+ <target name="explodewar" depends="explodeclasses, exploderesources, copydatasets"
description="Creates a hot-redeployable exploded WAR directory">
</target>
- <target name="explodehotdeploy" depends="compileclasses">
+ <target name="explodeclasses" depends="compileclasses">
<mkdir dir="${exploded.war.dir}/WEB-INF/classes"/>
<mkdir dir="${exploded.war.dir}/WEB-INF/dev"/>
<!-- ########## Classes ########### -->
<copy todir="${exploded.war.dir}/WEB-INF/classes">
- <fileset dir="${classes.dir}" excludes="${hotdeploy.classes}"/>
- </copy>
- <copy todir="${exploded.war.dir}/WEB-INF/dev">
- <fileset dir="${classes.dir}" includes="${hotdeploy.classes}"/>
- </copy>
-
- <!-- ########## XHTML ########### -->
- <copy todir="${exploded.war.dir}">
- <fileset dir="${view.dir}"/>
- </copy>
-
- </target>
-
- <target name="exploderegular" depends="compileclasses">
-
- <!-- ########## Classes ########### -->
- <copy todir="${exploded.war.dir}/WEB-INF/classes">
<fileset dir="${classes.dir}"/>
</copy>
@@ -324,26 +310,10 @@
<!-- ################## DEPLOYMENT ####################### -->
- <target name="hotdeploy" depends="explodehotdeploy"
- description="Deploys only hotdeployable resources (call in IDE after compile)">
+ <target name="deploynoseaminit" depends="init, explodewar"
+ description="Deploy without copying Seam dependencies">
<fail unless="jboss.home">jboss.home not set</fail>
- <!-- ######## Classes ######## -->
- <copy todir="${deploy.war.dir}/WEB-INF/dev">
- <fileset dir="${exploded.war.dir}/WEB-INF/dev"/>
- </copy>
-
- <!-- ######## XHTML ######## -->
- <copy todir="${deploy.war.dir}">
- <fileset dir="${exploded.war.dir}" excludes="WEB-INF/**"/>
- </copy>
-
- </target>
-
- <target name="deploy" depends="explodewar"
- description="Deploy datasource and exploded WAR to JBoss AS">
- <fail unless="jboss.home">jboss.home not set</fail>
-
<!-- ######## Datasoure ######## -->
<copy todir="${deploy.dir}">
<fileset dir="${src.etc.dir}">
@@ -358,6 +328,9 @@
</target>
+ <target name="deploy" depends="initseam, deploynoseaminit"
+ description="Deploy datasource and exploded WAR to JBoss AS"/>
+
<target name="undeploy"
description="Undeploy datasource and exploded WAR">
<fail unless="jboss.home">jboss.home not set</fail>
@@ -367,7 +340,7 @@
</target>
- <target name="redeploy" depends="deploy" description="Deploy and restart the WAR">
+ <target name="redeploy" depends="deploynoseaminit" description="Deploy and restart the WAR">
<touch file="${deploy.war.dir}/WEB-INF/web.xml"/>
</target>
@@ -376,8 +349,8 @@
<!-- ######################## DISTRIBUTION ################## -->
- <target name="dist" depends="clean, exploderegular, exploderesources"
- description="Package a (non-hotdeploy) WAR archive">
+ <target name="dist" depends="clean, init, explodeclasses, exploderesources"
+ description="Package a WAR archive">
<delete dir="${wiki.dist.dir}"/>
<mkdir dir="${wiki.dist.dir}"/>
@@ -416,7 +389,7 @@
<!-- ######################## TESTS ################## -->
- <target name="compiletests" depends="clean, compileclasses, copyjbossembedded,getemma"
+ <target name="compiletests" depends="clean, initseam, init, compileclasses, copyjbossembedded,getemma"
description="Compile the test Java source code">
<javac classpathref="test.classpath"
15 years, 7 months