Seam SVN: r9990 - trunk/doc/Seam_Reference_Guide/it-IT.
by seam-commits@lists.jboss.org
Author: nico.ben
Date: 2009-01-31 15:07:06 -0500 (Sat, 31 Jan 2009)
New Revision: 9990
Modified:
trunk/doc/Seam_Reference_Guide/it-IT/Excel.po
Log:
JBSEAM-3767: Italian translation of Seam guide
Modified: trunk/doc/Seam_Reference_Guide/it-IT/Excel.po
===================================================================
--- trunk/doc/Seam_Reference_Guide/it-IT/Excel.po 2009-01-30 13:59:00 UTC (rev 9989)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Excel.po 2009-01-31 20:07:06 UTC (rev 9990)
@@ -6,7 +6,7 @@
"Project-Id-Version: Seam_Reference_Guide\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-18 15:00+0000\n"
-"PO-Revision-Date: 2009-01-29 01:13+0100\n"
+"PO-Revision-Date: 2009-01-31 21:06+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -1260,7 +1260,7 @@
#: Excel.xml:1295
#, no-c-format
msgid "Format masks are defined in the mask attribute in cell templates, cells or formulas. <emphasis>Note that when using templates, the format mask must be placed in the first template</emphasis> to be cascaded since the constructor hierarchy in <literal>JExcelAPI</literal> used for copying cell formats makes it hard to change the format mask at a later stage. There are two types of format masks, one for numbers and one for dates"
-msgstr ""
+msgstr "Le maschere di formato sono definite nell'attributo maschera nei template di cella, nelle celle o nelle formule. <emphasis>Si noti che usando i template, la maschera di formato deve essere collocata nel primo template</emphasis> per essere messa in cascata poiché la gerarchia del costruttore in <literal>JExcelAPI</literal>, usata per copiare i formati di cella, rende difficile cambiare la maschera del formato in una fase successiva. Ci sono due tipi di maschere di formato, una per i numeri e una per le date."
#. Tag: title
#: Excel.xml:1305
@@ -1272,13 +1272,13 @@
#: Excel.xml:1306
#, no-c-format
msgid "When encountering a format mask, first it is checked if it is in internal form, e.g \"format1\", \"accounting_float\" and so on (see <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/writ..."> jxl.write.NumberFormats </ulink> )."
-msgstr ""
+msgstr "Incontrando una maschera di formato, in primo luogo è contrassegnata se è in una form interna, es. \"format1\", \"accounting_float\" e così via (si veda <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/writ..."> jxl.write.NumberFormats</ulink> )."
#. Tag: para
#: Excel.xml:1315
#, no-c-format
msgid "if the mask is not in the list, it is treated as a custom mask (see <ulink url=\"http://java.sun.com/javase/6/docs/api/java/text/DecimalFormat.html\"> java.text.DecimalFormat </ulink> ). e.g \"0.00\" and automatically converted to the closest match."
-msgstr ""
+msgstr "se la maschera non è nella lista, viene trattata come una maschera personalizzata (si veda <ulink url=\"http://java.sun.com/javase/6/docs/api/java/text/DecimalFormat.html\"> java.text.DecimalFormat </ulink>). Es. \"0.00\" e automaticamente convertita nella corrispondenza più vicina."
#. Tag: title
#: Excel.xml:1326
@@ -1290,7 +1290,7 @@
#: Excel.xml:1327
#, no-c-format
msgid "When encountering a format mask, first it is checked if it is in internal form, e.g \"format1\", \"format2\" and so on (see <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/writ..."> jxl.write.DecimalFormats </ulink> )."
-msgstr ""
+msgstr "Incontrando una maschera di formato, in primo luogo è contrassegnata se è in una form interna, es. \"format1\", \"format2\" e così via (si veda <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/writ..."> jxl.write.DecimalFormats </ulink> )."
#. Tag: para
#: Excel.xml:1336
@@ -2276,7 +2276,7 @@
#: Excel.xml:2361
#, no-c-format
msgid "The name of the font. Make sure that it's one that is supported by your system."
-msgstr ""
+msgstr "Il nome del font. Assicurarsi che sia supportato del proprio sistema."
#. Tag: para
#: Excel.xml:2369
@@ -2348,7 +2348,7 @@
#: Excel.xml:2432
#, no-c-format
msgid "The underline style of the font (see <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.UnderlineStyle </ulink> )."
-msgstr ""
+msgstr "Lo stile sottolineato del font (si veda <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.UnderlineStyle </ulink> )."
#. Tag: para
#: Excel.xml:2444
@@ -2378,7 +2378,7 @@
#: Excel.xml:2464
#, no-c-format
msgid "Example style=\"xls-font: red bold italic 22 Verdana\""
-msgstr ""
+msgstr "Esempio style=\"xls-font: red bold italic 22 Verdana\""
#. Tag: title
#: Excel.xml:2474
@@ -2402,7 +2402,7 @@
#: Excel.xml:2488
#, no-c-format
msgid "The border color of the left edge of the cell (see <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.Colour </ulink> )."
-msgstr ""
+msgstr "Il colore del bordo dello spigolo sinistro della cella (si veda <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.Colour </ulink> )."
#. Tag: para
#: Excel.xml:2501
@@ -2414,7 +2414,7 @@
#: Excel.xml:2504
#, no-c-format
msgid "The border line style of the left edge of the cell (see <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.LineStyle </ulink> )."
-msgstr ""
+msgstr "Lo stile di linea del bordo dello spigolo sinistro della cella (si veda <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.LineStyle </ulink> )."
#. Tag: para
#: Excel.xml:2516
@@ -2636,7 +2636,7 @@
#: Excel.xml:2751
#, no-c-format
msgid "Example style=\"xls-column-widths: 5000, 5000, *, 10000\""
-msgstr ""
+msgstr "Esempio style=\"xls-column-widths: 5000, 5000, *, 10000\""
#. Tag: para
#: Excel.xml:2758
@@ -2684,7 +2684,7 @@
#: Excel.xml:2796
#, no-c-format
msgid "The alignment of the cell value (see <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.Alignment </ulink> )."
-msgstr ""
+msgstr "L'allineamento del valore della cella (si veda <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.Alignment </ulink> )."
#. Tag: para
#: Excel.xml:2808
@@ -2744,7 +2744,7 @@
#: Excel.xml:2854
#, no-c-format
msgid "The orientation of the cell value (see <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.Orientation </ulink> )."
-msgstr ""
+msgstr "L'orientamento del valore della cella (si veda <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.Orientation </ulink> )."
#. Tag: para
#: Excel.xml:2866
@@ -2756,7 +2756,7 @@
#: Excel.xml:2869
#, no-c-format
msgid "The vertical alignment of the cell value (see <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.VerticalAlignment </ulink> )."
-msgstr ""
+msgstr "L'allineamento verticale del valore della cella (si veda <ulink url=\"http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/form..."> jxl.format.VerticalAlignment </ulink> )."
#. Tag: para
#: Excel.xml:2881
@@ -2846,5 +2846,5 @@
#: Excel.xml:2950
#, no-c-format
msgid "If you use the forum or mailing list, please remember that they don't know anything about Seam and the usage of their library, any issues are best reported in the JBoss Seam JIRA under the \"excel\" module."
-msgstr ""
+msgstr "Se si usano il forum o la mailing list, si prega di ricordare che non questi non possono fornire informazioni su come Seam impiega la loro libreria, ogni problema dovrebbe essere riportato in JBoss Seam JIRA sotto il modulo \"excel\"."
15 years, 9 months
Seam SVN: r9989 - in trunk: src/resteasy/org/jboss/seam/resteasy and 1 other directory.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2009-01-30 08:59:00 -0500 (Fri, 30 Jan 2009)
New Revision: 9989
Added:
trunk/src/resteasy/org/jboss/seam/resteasy/Application.java
Removed:
trunk/src/resteasy/org/jboss/seam/resteasy/ApplicationConfig.java
Modified:
trunk/build/resteasy.pom.xml
trunk/build/root.pom.xml
trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java
trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyDispatcher.java
trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java
Log:
JBSEAM-3449
Modified: trunk/build/resteasy.pom.xml
===================================================================
--- trunk/build/resteasy.pom.xml 2009-01-30 11:52:09 UTC (rev 9988)
+++ trunk/build/resteasy.pom.xml 2009-01-30 13:59:00 UTC (rev 9989)
@@ -22,7 +22,7 @@
</dependency>
<dependency>
- <groupId>org.resteasy</groupId>
+ <groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
</dependency>
Modified: trunk/build/root.pom.xml
===================================================================
--- trunk/build/root.pom.xml 2009-01-30 11:52:09 UTC (rev 9988)
+++ trunk/build/root.pom.xml 2009-01-30 13:59:00 UTC (rev 9989)
@@ -298,9 +298,9 @@
</dependency>
<dependency>
- <groupId>org.resteasy</groupId>
+ <groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
- <version>1.0-beta-5</version>
+ <version>1.0.1.GA</version>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
Copied: trunk/src/resteasy/org/jboss/seam/resteasy/Application.java (from rev 9965, trunk/src/resteasy/org/jboss/seam/resteasy/ApplicationConfig.java)
===================================================================
--- trunk/src/resteasy/org/jboss/seam/resteasy/Application.java (rev 0)
+++ trunk/src/resteasy/org/jboss/seam/resteasy/Application.java 2009-01-30 13:59:00 UTC (rev 9989)
@@ -0,0 +1,183 @@
+package org.jboss.seam.resteasy;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.Component;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Install;
+
+import javax.ws.rs.core.MediaType;
+import java.util.*;
+
+/**
+ * Resteasy and JAX-RS configuration, override in components.xml to
+ * customize Resteasy settings.
+ *
+ * @author Christian Bauer
+ */
+@Name("org.jboss.seam.resteasy.application")
+(a)Scope(ScopeType.APPLICATION)
+@Install(precedence = Install.BUILT_IN)
+@AutoCreate
+public class Application extends javax.ws.rs.core.Application
+{
+
+ private Map<Class<?>, Component> providerClasses = new HashMap<Class<?>, Component>();
+ private Map<Class<?>, Component> resourceClasses = new HashMap<Class<?>, Component>();
+
+ private List<String> providerClassNames = new ArrayList<String>();
+ private List<String> resourceClassNames = new ArrayList<String>();
+
+ private Map<String, String> mediaTypeMappings = new HashMap<String, String>();
+ private Map<String, String> languageMappings = new HashMap<String, String>();
+
+ private boolean scanProviders = true;
+ private boolean scanResources = true;
+ private boolean useBuiltinProviders = true;
+
+ private String resourcePathPrefix = "/rest";
+ private boolean stripSeamResourcePath = true;
+
+ public Application()
+ {
+ super();
+ }
+
+ public Set<Class<?>> getProviderClasses()
+ {
+ return providerClasses.keySet();
+ }
+
+ @Override
+ public Set<Class<?>> getClasses()
+ {
+ return resourceClasses.keySet();
+ }
+
+ public void addProviderClass(Class<?> clazz, Component component)
+ {
+ providerClasses.put(clazz, component);
+ }
+
+ public void removeProviderClass(Class<?> clazz)
+ {
+ providerClasses.remove(clazz);
+ }
+
+ public void addResourceClass(Class<?> clazz, Component component)
+ {
+ resourceClasses.put(clazz, component);
+ }
+
+ public void removeResourceClass(Class<?> clazz)
+ {
+ resourceClasses.remove(clazz);
+ }
+
+ public Component getProviderClassComponent(Class clazz)
+ {
+ return providerClasses.get(clazz) != null ? providerClasses.get(clazz) : null;
+ }
+
+ public Component getResourceClassComponent(Class clazz)
+ {
+ return resourceClasses.get(clazz) != null ? resourceClasses.get(clazz) : null;
+ }
+
+ public Map<String, MediaType> getMediaTypeMappings()
+ {
+ Map<String, MediaType> extMap = new HashMap<String, MediaType>();
+ for (String ext : mediaTypeMappings.keySet())
+ {
+ String value = mediaTypeMappings.get(ext);
+ extMap.put(ext, MediaType.valueOf(value));
+ }
+ return extMap;
+ }
+
+ public void setMediaTypeMappings(Map<String, String> mediaTypeMappings)
+ {
+ this.mediaTypeMappings = mediaTypeMappings;
+ }
+
+ public Map<String, String> getLanguageMappings()
+ {
+ return languageMappings;
+ }
+
+ public void setLanguageMappings(Map<String, String> languageMappings)
+ {
+ this.languageMappings = languageMappings;
+ }
+
+ public List<String> getProviderClassNames()
+ {
+ return providerClassNames;
+ }
+
+ public void setProviderClassNames(List<String> providerClassNames)
+ {
+ this.providerClassNames = providerClassNames;
+ }
+
+ public List<String> getResourceClassNames()
+ {
+ return resourceClassNames;
+ }
+
+ public void setResourceClassNames(List<String> resourceClassNames)
+ {
+ this.resourceClassNames = resourceClassNames;
+ }
+
+ public boolean isScanProviders()
+ {
+ return scanProviders;
+ }
+
+ public void setScanProviders(boolean scanProviders)
+ {
+ this.scanProviders = scanProviders;
+ }
+
+ public boolean isScanResources()
+ {
+ return scanResources;
+ }
+
+ public void setScanResources(boolean scanResources)
+ {
+ this.scanResources = scanResources;
+ }
+
+ public boolean isUseBuiltinProviders()
+ {
+ return useBuiltinProviders;
+ }
+
+ public void setUseBuiltinProviders(boolean useBuiltinProviders)
+ {
+ this.useBuiltinProviders = useBuiltinProviders;
+ }
+
+ public String getResourcePathPrefix()
+ {
+ return resourcePathPrefix;
+ }
+
+ public void setResourcePathPrefix(String resourcePathPrefix)
+ {
+ this.resourcePathPrefix = resourcePathPrefix;
+ }
+
+ public boolean isStripSeamResourcePath()
+ {
+ return stripSeamResourcePath;
+ }
+
+ public void setStripSeamResourcePath(boolean stripSeamResourcePath)
+ {
+ this.stripSeamResourcePath = stripSeamResourcePath;
+ }
+}
Deleted: trunk/src/resteasy/org/jboss/seam/resteasy/ApplicationConfig.java
===================================================================
--- trunk/src/resteasy/org/jboss/seam/resteasy/ApplicationConfig.java 2009-01-30 11:52:09 UTC (rev 9988)
+++ trunk/src/resteasy/org/jboss/seam/resteasy/ApplicationConfig.java 2009-01-30 13:59:00 UTC (rev 9989)
@@ -1,182 +0,0 @@
-package org.jboss.seam.resteasy;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Install;
-
-import javax.ws.rs.core.MediaType;
-import java.util.*;
-
-/**
- * Resteasy and JAX-RS configuration, override in components.xml to
- * customize Resteasy settings.
- *
- * @author Christian Bauer
- */
-@Name("org.jboss.seam.resteasy.applicationConfig")
-(a)Scope(ScopeType.APPLICATION)
-@Install(precedence = Install.BUILT_IN)
-@AutoCreate
-public class ApplicationConfig extends javax.ws.rs.core.ApplicationConfig
-{
-
- private Map<Class<?>, Component> providerClasses = new HashMap<Class<?>, Component>();
- private Map<Class<?>, Component> resourceClasses = new HashMap<Class<?>, Component>();
-
- private List<String> providerClassNames = new ArrayList<String>();
- private List<String> resourceClassNames = new ArrayList<String>();
-
- private Map<String, String> mediaTypeMappings = new HashMap<String, String>();
- private Map<String, String> languageMappings = new HashMap<String, String>();
-
- private boolean scanProviders = true;
- private boolean scanResources = true;
- private boolean useBuiltinProviders = true;
-
- private String resourcePathPrefix = "/rest";
- private boolean stripSeamResourcePath = true;
-
- public ApplicationConfig()
- {
- super();
- }
-
- public Set<Class<?>> getProviderClasses()
- {
- return providerClasses.keySet();
- }
-
- public Set<Class<?>> getResourceClasses()
- {
- return resourceClasses.keySet();
- }
-
- public void addProviderClass(Class<?> clazz, Component component)
- {
- providerClasses.put(clazz, component);
- }
-
- public void removeProviderClass(Class<?> clazz)
- {
- providerClasses.remove(clazz);
- }
-
- public void addResourceClass(Class<?> clazz, Component component)
- {
- resourceClasses.put(clazz, component);
- }
-
- public void removeResourceClass(Class<?> clazz)
- {
- resourceClasses.remove(clazz);
- }
-
- public Component getProviderClassComponent(Class clazz)
- {
- return providerClasses.get(clazz) != null ? providerClasses.get(clazz) : null;
- }
-
- public Component getResourceClassComponent(Class clazz)
- {
- return resourceClasses.get(clazz) != null ? resourceClasses.get(clazz) : null;
- }
-
- public Map<String, MediaType> getMediaTypeMappings()
- {
- Map<String, MediaType> extMap = new HashMap<String, MediaType>();
- for (String ext : mediaTypeMappings.keySet())
- {
- String value = mediaTypeMappings.get(ext);
- extMap.put(ext, MediaType.valueOf(value));
- }
- return extMap;
- }
-
- public void setMediaTypeMappings(Map<String, String> mediaTypeMappings)
- {
- this.mediaTypeMappings = mediaTypeMappings;
- }
-
- public Map<String, String> getLanguageMappings()
- {
- return languageMappings;
- }
-
- public void setLanguageMappings(Map<String, String> languageMappings)
- {
- this.languageMappings = languageMappings;
- }
-
- public List<String> getProviderClassNames()
- {
- return providerClassNames;
- }
-
- public void setProviderClassNames(List<String> providerClassNames)
- {
- this.providerClassNames = providerClassNames;
- }
-
- public List<String> getResourceClassNames()
- {
- return resourceClassNames;
- }
-
- public void setResourceClassNames(List<String> resourceClassNames)
- {
- this.resourceClassNames = resourceClassNames;
- }
-
- public boolean isScanProviders()
- {
- return scanProviders;
- }
-
- public void setScanProviders(boolean scanProviders)
- {
- this.scanProviders = scanProviders;
- }
-
- public boolean isScanResources()
- {
- return scanResources;
- }
-
- public void setScanResources(boolean scanResources)
- {
- this.scanResources = scanResources;
- }
-
- public boolean isUseBuiltinProviders()
- {
- return useBuiltinProviders;
- }
-
- public void setUseBuiltinProviders(boolean useBuiltinProviders)
- {
- this.useBuiltinProviders = useBuiltinProviders;
- }
-
- public String getResourcePathPrefix()
- {
- return resourcePathPrefix;
- }
-
- public void setResourcePathPrefix(String resourcePathPrefix)
- {
- this.resourcePathPrefix = resourcePathPrefix;
- }
-
- public boolean isStripSeamResourcePath()
- {
- return stripSeamResourcePath;
- }
-
- public void setStripSeamResourcePath(boolean stripSeamResourcePath)
- {
- this.stripSeamResourcePath = stripSeamResourcePath;
- }
-}
Modified: trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java
===================================================================
--- trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java 2009-01-30 11:52:09 UTC (rev 9988)
+++ trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyBootstrap.java 2009-01-30 13:59:00 UTC (rev 9989)
@@ -23,7 +23,7 @@
@Scope(ScopeType.APPLICATION)
@Startup
@AutoCreate
-@Install(classDependencies = "org.resteasy.Dispatcher")
+@Install(classDependencies = "org.jboss.resteasy.core.Dispatcher")
public class ResteasyBootstrap
{
@@ -31,7 +31,7 @@
Log log;
@In
- protected ApplicationConfig applicationConfig;
+ protected Application application;
@Create
public void onStartup()
@@ -40,7 +40,7 @@
Collection<Class<?>> annotatedProviderClasses = null;
Collection<Class<?>> annotatedResourceClasses = null;
- if (applicationConfig.isScanProviders() || applicationConfig.isScanResources())
+ if (application.isScanProviders() || application.isScanResources())
{
log.debug("scanning all classes for JAX-RS annotations");
@@ -76,10 +76,10 @@
Collection<Class> providerClasses = new HashSet<Class>();
try
{
- if (applicationConfig.isScanProviders() && annotatedProviderClasses != null)
+ if (application.isScanProviders() && annotatedProviderClasses != null)
providerClasses.addAll(annotatedProviderClasses);
- for (String s : new HashSet<String>(applicationConfig.getProviderClassNames()))
+ for (String s : new HashSet<String>(application.getProviderClassNames()))
providerClasses.add(Reflections.classForName(s));
}
@@ -90,7 +90,7 @@
for (Class providerClass : providerClasses)
{
// Ignore built-in providers, we register them manually later
- if (providerClass.getName().startsWith("org.resteasy.plugins.providers")) continue;
+ if (providerClass.getName().startsWith("org.jboss.resteasy.plugins.providers")) continue;
Component seamComponent = null;
// Check if this is also a Seam component bean class
@@ -114,10 +114,10 @@
{
log.debug("registering provider class: " + providerClass.getName());
}
- applicationConfig.addProviderClass(providerClass, seamComponent);
+ application.addProviderClass(providerClass, seamComponent);
}
- if (applicationConfig.getProviderClasses().size() == 0 &&
- !applicationConfig.isUseBuiltinProviders())
+ if (application.getProviderClasses().size() == 0 &&
+ !application.isUseBuiltinProviders())
{
log.info("no RESTEasy provider classes registered");
}
@@ -129,10 +129,10 @@
Collection<Class> resourceClasses = new HashSet<Class>();
try
{
- if (applicationConfig.isScanResources() && annotatedResourceClasses != null)
+ if (application.isScanResources() && annotatedResourceClasses != null)
resourceClasses.addAll(annotatedResourceClasses);
- for (String s : new HashSet<String>(applicationConfig.getResourceClassNames()))
+ for (String s : new HashSet<String>(application.getResourceClassNames()))
resourceClasses.add(Reflections.classForName(s));
}
@@ -154,9 +154,9 @@
{
log.debug("registering resource class with JAX-RS default lifecycle: " + resourceClass.getName());
}
- applicationConfig.addResourceClass(resourceClass, seamComponent);
+ application.addResourceClass(resourceClass, seamComponent);
}
- if (applicationConfig.getResourceClasses().size() == 0)
+ if (application.getClasses().size() == 0)
log.info("no JAX-RS resource classes registered");
}
Modified: trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyDispatcher.java
===================================================================
--- trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyDispatcher.java 2009-01-30 11:52:09 UTC (rev 9988)
+++ trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyDispatcher.java 2009-01-30 13:59:00 UTC (rev 9989)
@@ -2,13 +2,26 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.*;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Startup;
import org.jboss.seam.log.Log;
-import org.resteasy.Dispatcher;
-import org.resteasy.plugins.providers.RegisterBuiltin;
-import org.resteasy.plugins.server.servlet.HttpServletDispatcher;
-import org.resteasy.plugins.server.resourcefactory.POJOResourceFactory;
-import org.resteasy.spi.*;
+import org.jboss.resteasy.core.AsynchronousDispatcher;
+import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
+import org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory;
+import org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher;
+import org.jboss.resteasy.spi.HttpRequest;
+import org.jboss.resteasy.spi.HttpResponse;
+import org.jboss.resteasy.spi.InjectorFactory;
+import org.jboss.resteasy.spi.PropertyInjector;
+import org.jboss.resteasy.spi.Registry;
+import org.jboss.resteasy.spi.ResourceFactory;
+import org.jboss.resteasy.spi.ResteasyProviderFactory;
/**
* An extended version of the RESTEasy dispatcher, configured on Seam application
@@ -19,14 +32,14 @@
*/
@Name("org.jboss.seam.resteasy.dispatcher")
@Scope(ScopeType.APPLICATION)
-@Startup(depends = "resteasyBootstrap")
+@Startup(depends = "org.jboss.seam.resteasy.bootstrap")
@AutoCreate
-@Install(classDependencies = "org.resteasy.Dispatcher")
+@Install(classDependencies = "org.jboss.resteasy.core.Dispatcher")
public class ResteasyDispatcher extends HttpServletDispatcher
{
@In
- ApplicationConfig applicationConfig;
+ Application application;
@Logger
Log log;
@@ -38,16 +51,16 @@
ResteasyProviderFactory providerFactory = new ResteasyProviderFactory();
ResteasyProviderFactory.setInstance(providerFactory); // This is really necessary
- setDispatcher(new Dispatcher(providerFactory));
+ setDispatcher(new AsynchronousDispatcher(providerFactory));
- getDispatcher().setLanguageMappings(applicationConfig.getLanguageMappings());
- getDispatcher().setMediaTypeMappings(applicationConfig.getMediaTypeMappings());
+ getDispatcher().setLanguageMappings(application.getLanguageMappings());
+ getDispatcher().setMediaTypeMappings(application.getMediaTypeMappings());
// Resource registration
Registry registry = getDispatcher().getRegistry();
- for (final Class resourceClass : applicationConfig.getResourceClasses())
+ for (final Class resourceClass : application.getClasses())
{
- final Component seamComponent = applicationConfig.getResourceClassComponent(resourceClass);
+ final Component seamComponent = application.getResourceClassComponent(resourceClass);
if (seamComponent != null)
{
// Seam component lookup when call is dispatched to resource
@@ -92,14 +105,14 @@
}
// Provider registration
- if (applicationConfig.isUseBuiltinProviders())
+ if (application.isUseBuiltinProviders())
{
log.info("registering built-in RESTEasy providers");
RegisterBuiltin.register(providerFactory);
}
- for (Class providerClass : applicationConfig.getProviderClasses())
+ for (Class providerClass : application.getProviderClasses())
{
- Component seamComponent = applicationConfig.getProviderClassComponent(providerClass);
+ Component seamComponent = application.getProviderClassComponent(providerClass);
if (seamComponent != null)
{
if (ScopeType.STATELESS.equals(seamComponent.getScope()))
Modified: trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java
===================================================================
--- trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java 2009-01-30 11:52:09 UTC (rev 9988)
+++ trunk/src/resteasy/org/jboss/seam/resteasy/ResteasyResourceAdapter.java 2009-01-30 13:59:00 UTC (rev 9989)
@@ -9,17 +9,18 @@
import org.jboss.seam.log.Log;
import org.jboss.seam.servlet.ContextualHttpServletRequest;
import org.jboss.seam.web.AbstractResource;
-import org.resteasy.plugins.server.servlet.HttpServletDispatcher;
-import org.resteasy.plugins.server.servlet.HttpServletInputMessage;
-import org.resteasy.plugins.server.servlet.HttpServletResponseWrapper;
-import org.resteasy.plugins.server.servlet.ServletSecurityContext;
-import org.resteasy.specimpl.PathSegmentImpl;
-import org.resteasy.specimpl.UriBuilderImpl;
-import org.resteasy.specimpl.UriInfoImpl;
-import org.resteasy.spi.HttpRequest;
-import org.resteasy.spi.HttpResponse;
-import org.resteasy.spi.ResteasyProviderFactory;
-import org.resteasy.util.PathHelper;
+import org.jboss.resteasy.core.SynchronousDispatcher;
+import org.jboss.resteasy.plugins.server.servlet.HttpServletInputMessage;
+import org.jboss.resteasy.plugins.server.servlet.HttpServletResponseWrapper;
+import org.jboss.resteasy.plugins.server.servlet.ServletSecurityContext;
+import org.jboss.resteasy.plugins.server.servlet.ServletUtil;
+import org.jboss.resteasy.specimpl.PathSegmentImpl;
+import org.jboss.resteasy.specimpl.UriBuilderImpl;
+import org.jboss.resteasy.specimpl.UriInfoImpl;
+import org.jboss.resteasy.spi.HttpRequest;
+import org.jboss.resteasy.spi.HttpResponse;
+import org.jboss.resteasy.spi.ResteasyProviderFactory;
+import org.jboss.resteasy.util.PathHelper;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
@@ -51,7 +52,7 @@
@Override
public String getResourcePath()
{
- ApplicationConfig appConfig = (ApplicationConfig)Component.getInstance(ApplicationConfig.class);
+ Application appConfig = (Application)Component.getInstance(Application.class);
return appConfig.getResourcePathPrefix();
}
@@ -74,7 +75,7 @@
public void process() throws ServletException, IOException
{
- HttpHeaders headers = HttpServletDispatcher.extractHttpHeaders(request);
+ HttpHeaders headers = ServletUtil.extractHttpHeaders(request);
String path = PathHelper.getEncodedPathInfo(request.getRequestURI(), request.getContextPath());
URI absolutePath;
try
@@ -86,7 +87,7 @@
builder.host(absolute.getHost());
builder.port(absolute.getPort());
builder.path(absolute.getPath());
- builder.replaceQueryParams(absolute.getQuery());
+ builder.replaceQuery(absolute.getQuery());
absolutePath = builder.build();
}
catch (MalformedURLException e)
@@ -94,7 +95,7 @@
throw new RuntimeException(e);
}
- ApplicationConfig appConfig = (ApplicationConfig)Component.getInstance(ApplicationConfig.class);
+ Application appConfig = (Application)Component.getInstance(Application.class);
if (appConfig.isStripSeamResourcePath()) {
log.debug("removing SeamResourceServlet url-pattern and dispatcher prefix from request path");
path = path.substring(path.indexOf(getResourcePath())+getResourcePath().length());
@@ -105,25 +106,13 @@
UriInfoImpl uriInfo = new UriInfoImpl(absolutePath, path, request.getQueryString(), pathSegments);
HttpRequest in;
- try
- {
- in =
- new HttpServletInputMessage(
- headers,
- request.getInputStream(),
- uriInfo,
- request.getMethod().toUpperCase()
- );
- }
- catch (IOException e)
- {
- throw new RuntimeException(e);
- }
-
ResteasyDispatcher dispatcher =
(ResteasyDispatcher) Component.getInstance(ResteasyDispatcher.class);
HttpResponse theResponse =
new HttpServletResponseWrapper(response, dispatcher.getDispatcher().getProviderFactory());
+ in = new HttpServletInputMessage(
+ request, theResponse, headers, uriInfo, request.getMethod().toUpperCase(), (SynchronousDispatcher)dispatcher.getDispatcher());
+
dispatcher.getDispatcher().invoke(in, theResponse);
}
}.run();
15 years, 9 months
Seam SVN: r9988 - trunk/examples/wicket.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2009-01-30 06:52:09 -0500 (Fri, 30 Jan 2009)
New Revision: 9988
Modified:
trunk/examples/wicket/build.xml
trunk/examples/wicket/readme.txt
Log:
JBSEAM-3922
Modified: trunk/examples/wicket/build.xml
===================================================================
--- trunk/examples/wicket/build.xml 2009-01-29 15:53:12 UTC (rev 9987)
+++ trunk/examples/wicket/build.xml 2009-01-30 11:52:09 UTC (rev 9988)
@@ -9,11 +9,6 @@
<property name="src.java.dir" value="src/action" />
<property name="src.web.dir" value="src/web" />
-
- <!--If this is set to true, wicket classes are instrumented at build time by seam's
- WicketInstrumentationTask. The resulting classes will be placed in WEB-INF/dev if debug=true,
- else they'll go in WEB-INF/classes -->
- <property name="instrumentAtBuildTime" value="true" />
<property name="build.web" value="build-web" />
<property name="build.instrumented" value="instrumented-web" />
@@ -38,7 +33,7 @@
</javac>
</target>
- <target name="instrument" depends="compile.web" if="instrumentAtBuildTime">
+ <target name="instrument" depends="compile.web" unless="instrumentAtRunTime">
<taskdef name="instrumentWicket" classname="org.jboss.seam.wicket.ioc.WicketInstrumentationTask">
<classpath>
<pathelement location="${lib.dir}/jboss-seam-wicket-ant.jar" />
@@ -68,7 +63,7 @@
</instrumentWicket>
</target>
- <target name="copyWicketClasses" depends="compile.web" unless="instrumentAtBuildTime">
+ <target name="copyWicketClasses" depends="compile.web" if="instrumentAtRunTime">
<mkdir dir="${war.dir}/WEB-INF/wicket" />
<copy todir="${war.dir}/WEB-INF/wicket">
<fileset dir="${src.web.dir}">
@@ -79,7 +74,7 @@
</copy>
</target>
- <target name="copyWicketInstrumentedClasses" depends="instrument" if="instrumentAtBuildTime">
+ <target name="copyWicketInstrumentedClasses" depends="instrument" unless="instrumentAtRunTime">
<condition property="wicketClassDestination" value="${war.dir}/WEB-INF/dev" else="${war.dir}/WEB-INF/classes">
<istrue value="${debug}" />
</condition>
Modified: trunk/examples/wicket/readme.txt
===================================================================
--- trunk/examples/wicket/readme.txt 2009-01-29 15:53:12 UTC (rev 9987)
+++ trunk/examples/wicket/readme.txt 2009-01-30 11:52:09 UTC (rev 9988)
@@ -4,4 +4,4 @@
This is a port of the Booking example to Wicket.
By default it uses build time instrumentation, but you can use runtime
-instrumentation by specifying -DinstrumentAtBuildTime=false
+instrumentation by specifying -DinstrumentAtRunTime=true
15 years, 9 months
Seam SVN: r9987 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-01-29 10:53:12 -0500 (Thu, 29 Jan 2009)
New Revision: 9987
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Websphere.xml
Log:
JBSEAM-3570
Modified: trunk/doc/Seam_Reference_Guide/en-US/Websphere.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Websphere.xml 2009-01-29 15:52:44 UTC (rev 9986)
+++ trunk/doc/Seam_Reference_Guide/en-US/Websphere.xml 2009-01-29 15:53:12 UTC (rev 9987)
@@ -1,24 +1,18 @@
<chapter id="websphere">
- <title>Seam on IBM's Websphere</title>
+ <title>Seam on IBM's Websphere AS</title>
- <para>Websphere 6.1.x is IBM's application server offering. The latest
- release is 6.1.0.19 which does not have <literal>EJB3</literal> or
- <literal>JEE5</literal> support. There is a recently released (Nov 07)
- <literal>EJB3</literal> feature pack which provides some support for
- <literal>EJB3</literal> and <literal>JPA</literal>. Currently there
- is no true <literal>JEE5</literal> offering from IBM. This causes some
- issues with Seam integration with applications that use EJB3.</para>
+ <para>Websphere AS V7 is IBM's application server offering. This release is
+ fully Java EE 5 certified.</para>
- <para>First we will go over some basic information about the Websphere
- environment that we used for these examples. After a good deal of research
- and work we were able to get EJB3 applications to function correctly. We will
- go over the details of those steps with the jee5 example. We will also deploy
+ <para>First we will go over some basic information about the Websphere AS
+ environment that we used for these examples. We will
+ go over the details of those steps with the JEE5 booking example. We will also deploy
the JPA example application. </para>
<section>
- <title>Websphere environment and deployment information</title>
+ <title>Websphere AS environment and deployment information</title>
- <para>Websphere is a commercial product and so we will not discuss the
+ <para>Websphere AS is a commercial product and so we will not discuss the
details of its installation other than to say follow the directions
provided by your particular installation type and license. This
section will detail the exact server versions used, installation tips,
@@ -26,93 +20,22 @@
examples.</para>
<section>
- <title>Installation versions and tips</title>
+ <title>Installation versions</title>
<para>All of the examples and information in this chapter are based on
- the version 6.1 of Websphere at the time of this writing.
+ the version V7 of Websphere AS at the time of this writing.
<itemizedlist>
<listitem>
<para><ulink
- url="http://www-01.ibm.com/software/webservers/appserv/was/">
- Websphere Application Server 6.1</ulink></para>
+ url="http://www.ibm.com/developerworks/downloads/ws/was">
+ Websphere Application Server V7</ulink></para>
</listitem>
- <listitem>
- <para><ulink
- url="http://www-01.ibm.com/support/docview.wss?rs=177&uid=swg21287579">
- Feature Pack for EJB 3.0 for Websphere Application Server
- V6.1 (6.1.0.13)</ulink></para>
- </listitem>
- <listitem>
- <para><ulink
- url="http://www-01.ibm.com/support/docview.wss?rs=0&uid=swg24020063">
- Fix Pack for Websphere Application Server
- V6.1 (6.1.0.19)</ulink> </para>
- </listitem>
</itemizedlist> </para>
- <para>The EJB3 feature pack that we installed came with the 6.1.0.13
- patch version of Websphere. Installing the feature pack does not
- ensure that your server will have the proper environment for EJB3
- applications. Be sure that as part of the installation of the feature
- pack you follow the instructions to create a new server
- profile with the EJB3 feature pack enabled, or augment one of your
- existing ones. This can also be done after the installation
- by running the profile management tool.</para>
- <para>It is highly recommended to patch Websphere by
- latest fix pack, at the time of this writing it is 6.1.0.19 </para>
- <note>
- <title>A note about restarting the server</title>
- <para>There are times that restarting the server will be required after
- deploying or changes the examples in this chapter. Its does not seem
- like every change requires a restart. If you get errors or exceptions
- after modifying a property or deploying an application try to restart
- the server. </para> </note>
+ <para>After installing Websphere AS, create server profile with Profile Management Tool, if you
+ didn't create profile in installation process.
+ </para>
</section>
-
- <section>
- <title>Required custom properties</title>
- <para>There are a couple of Websphere custom properties that are required
- for Seam integration. These properties are not needed specifically
- for Seam, but work around some issues with Websphere. These are
- set following the instructions here : <ulink
- url="http://www-1.ibm.com/support/docview.wss?rss=180&uid=swg21284395">
- Setting web container custom properties</ulink></para>
-
- <itemizedlist>
- <listitem>
- <para><literal>prependSlashToResource = "true"</literal>
- — This solves a fairly common issue with Websphere
- where applications are not using a leading "/" when
- attempting to access resources. If this is not set then a
- <literal>java.net.MalformedURLException</literal>
- will be thrown. With this property set you will still see
- warnings, but the resources will be retrieved as expected.
- <note>
- <title>Detailed can be found at:</title>
- <para><ulink
- url="http://www-1.ibm.com/support/docview.wss?uid=swg21190234">
- SRVE0238E: Resource paths must have a leading
- slash</ulink></para> </note> </para>
- </listitem>
- <listitem>
- <para>
- <literal>com.ibm.ws.webcontainer.invokefilterscompatibility
- = "true"</literal> — This solves an issue with
- Websphere where it throws a
- <literal>FileNotFoundException</literal> when a web
- application attempts to access a file resource that does not
- actually exist on disk. This is a common practice in modern web
- applications where filters or servlets are used to process
- resource requests like these. This issue manifests itself as
- failures to retrieve JavaScript, CSS, images, etc... when
- requesting a web page. <note>
- <title>Detailed can be found at:</title>
- <para><ulink
- url="http://www-1.ibm.com/support/docview.wss?uid=swg24014758">
- PK33090; 6.1: A filter that serves a file does not pop-up an
- alert message</ulink></para> </note></para>
- </listitem>
- </itemizedlist>
- </section>
+
</section>
<section id="jee5-websphere-section">
@@ -125,11 +48,6 @@
<literal>$SEAM_DIST/examples/jee5/booking</literal> directory.
</para>
- <para>As stated before the <literal>EJB3</literal> feature pack does not
- provide a full <literal>jee5</literal> implementation. This means
- that there are some tricks to getting an application deployed and
- functioning. </para>
-
<section>
<title>Configuration file changes</title>
@@ -143,7 +61,7 @@
</term>
<listitem>
<para>We need to change the way that we look up EJBs for
- Websphere. We need to remove the
+ WAS. We need to remove the
<literal>/local</literal> from the end of the
<literal>jndi-pattern</literal> attribute. It should
look like this: </para>
@@ -154,98 +72,94 @@
]]></programlisting>
</listitem>
</varlistentry>
+
<varlistentry>
- <term> <literal>resources/WEB-INF/web.xml</literal>
+ <term>
+ <literal>resources/META-INF/ejb-jar.xml</literal>
</term>
<listitem>
- <para>This is the first place that we notice an unexpected
- change because this is not full <literal>jee5</literal>
- implementation. </para>
- <para> Websphere does not support <literal>Servlet
- 2.5</literal>, it requires <literal>Servlet
- 2.4</literal>. For this change we need to adjust the top of
- the <literal>web.xml</literal> file to look like the
- following:</para>
+ <para>We need to replace the /local string from <literal>ejb-ref-name</literal>.
+ See at the following final code:</para>
+ <programlisting role="XML"><![CDATA[
+ <enterprise-beans>
+ <!-- EJB reference required when one Seam EJB component references another Seam EJB component using @In -->
+ <!-- Not required if you inject using @EJB, but then you lose state management and client-side interceptors (e.g., security) -->
+ <session>
+ <ejb-name>RegisterAction</ejb-name>
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/AuthenticatorAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.jboss.seam.example.booking.Authenticator</local>
+ </ejb-local-ref>
+ </session>
+ </enterprise-beans>]]></programlisting>
- <programlisting role="XML"><![CDATA[<xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- ]]></programlisting>
- <para>Next, we have to make some changes to the EJB references
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term> <literal>resources/WEB-INF/web.xml</literal>
+ </term>
+ <listitem>
+ <para>We have to make some changes to the EJB references
in the <literal>web.xml</literal>. These changes are
- what will allow Websphere to bind the EJB2 references in
+ what will allow WAS to bind automatically the EJB3 references in
the web module to the the actual EJB3 beans in the EAR
- module. Replace all of the
+ module. Replace all of the /local strings in
<literal>ejb-local-refs</literal> when the values
below.</para>
<programlisting role="XML"><![CDATA[
<!-- JEE5 EJB3 names -->
- <ejb-local-ref>
- <ejb-ref-name>jboss-seam-jee5/AuthenticatorAction</ejb-ref-name>
- <ejb-ref-type>Session</ejb-ref-type>
- <local-home></local-home>
- <local>org.jboss.seam.example.booking.Authenticator</local>
- </ejb-local-ref>
-
- <ejb-local-ref>
- <ejb-ref-name>jboss-seam-jee5/BookingListAction</ejb-ref-name>
- <ejb-ref-type>Session</ejb-ref-type>
- <local-home></local-home>
- <local>org.jboss.seam.example.booking.BookingList</local>
- </ejb-local-ref>
-
- <ejb-local-ref>
- <ejb-ref-name>jboss-seam-jee5/RegisterAction</ejb-ref-name>
- <ejb-ref-type>Session</ejb-ref-type>
- <local-home></local-home>
- <local>org.jboss.seam.example.booking.Register</local>
- </ejb-local-ref>
-
- <ejb-local-ref>
- <ejb-ref-name>jboss-seam-jee5/ChangePasswordAction</ejb-ref-name>
- <ejb-ref-type>Session</ejb-ref-type>
- <local-home></local-home>
- <local>org.jboss.seam.example.booking.ChangePassword</local>
- </ejb-local-ref>
-
- <ejb-local-ref>
- <ejb-ref-name>jboss-seam-jee5/HotelBookingAction</ejb-ref-name>
- <ejb-ref-type>Session</ejb-ref-type>
- <local-home></local-home>
- <local>org.jboss.seam.example.booking.HotelBooking</local>
- </ejb-local-ref>
-
- <ejb-local-ref>
- <ejb-ref-name>jboss-seam-jee5/HotelSearchingAction</ejb-ref-name>
- <ejb-ref-type>Session</ejb-ref-type>
- <local-home></local-home>
- <local>org.jboss.seam.example.booking.HotelSearching</local>
- </ejb-local-ref>
-
<ejb-local-ref>
- <ejb-ref-name>jboss-seam-jee5/EjbSynchronizations</ejb-ref-name>
+ <ejb-ref-name>jboss-seam-jee5/AuthenticatorAction</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
- <local-home></local-home>
+ <local>org.jboss.seam.example.booking.Authenticator</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/BookingListAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.jboss.seam.example.booking.BookingList</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/RegisterAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.jboss.seam.example.booking.Register</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/ChangePasswordAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.jboss.seam.example.booking.ChangePassword</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/HotelBookingAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.jboss.seam.example.booking.HotelBooking</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/HotelSearchingAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.jboss.seam.example.booking.HotelSearching</local>
+ </ejb-local-ref>
+
+ <ejb-local-ref>
+ <ejb-ref-name>jboss-seam-jee5/EjbSynchronizations</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
<local>org.jboss.seam.transaction.LocalEjbSynchronizations</local>
</ejb-local-ref>]]></programlisting>
- <para>The important change is that there is an empty
- <literal>local-home</literal> element for each EJB.
- This tells Websphere to make the correct bindings between
- the web module and the EJB3 beans. The
- <literal>ejb-link</literal> element is simply not used.
- </para>
<para>Note also that <literal>EjbSynchronizations</literal> is
a built-in Seam EJB and not part of the Hotel Booking example. This
means that if your application's <literal>components.xml</literal>
- specifies <literal>transaction:ejb-transaction</literal>
- , then you must include:</para>
+ specifies <literal>transaction:ejb-transaction</literal>,
+ then you must include:</para>
<programlisting role="XML"><![CDATA[
<ejb-local-ref>
<ejb-ref-name>myapp/EjbSynchronizations</ejb-ref-name>
@@ -263,7 +177,7 @@
</term>
<listitem>
<para>For this example we will be using the default
- datasource that comes with Websphere. To do this change the
+ datasource that comes with WAS. To do this change the
<literal>jta-data-source</literal> element:</para>
<programlisting role="XML"><![CDATA[
<jta-data-source>DefaultDatasource</jta-data-source>
@@ -287,7 +201,7 @@
<para>
<literal>hibernate.transaction.manager_lookup_class</literal>
— Standard Hibernate transaction
- manager property for Websphere 6.X</para>
+ manager property for WAS 6.X and 7</para>
</listitem>
<listitem>
<para>
@@ -295,7 +209,7 @@
— This is commented out because we want
the container to manage the transactions. Also
if this is set to <literal>true</literal> an
- exception will be thrown by Websphere when the
+ exception will be thrown by WAS when the
EJBContext is looked up.
@@ -305,31 +219,30 @@
<listitem>
<para><literal>hibernate.dialect</literal>
— From WAS 6.1.0.9 on the embedded DB was
- switched to the same Derby DB in
- Glassfish.</para>
+ switched to the same Derby DB as is in
+ Glassfish v2.</para>
</listitem>
</itemizedlist></para>
</listitem>
</varlistentry>
<varlistentry>
<term>
- <literal>resources/GlassfishDerbyDialect.class</literal>
+ <literal>src/GlassfishDerbyDialect.java</literal>
</term>
<listitem>
<para>You will need to get the
- <literal>GlassfishDerbyDialect.class</literal> and
- copy it into the <literal>/resources</literal>
- directory. The class exists in the JPA example and can be
+ <literal>GlassfishDerbyDialect.java</literal> and
+ copy it into the <literal>/src</literal>
+ directory. The java class exists in the JPA example source directory and can be
copied using the command below assuming you are in
<literal>jee5/booking</literal> directory:</para>
<programlisting><![CDATA[
-cp ../../jpa/resources-websphere61/WEB-INF/classes/GlassfishDerbyDialect.class
- ./resources]]></programlisting>
+cp ../../jpa/src/GlassfishDerbyDialect.java
+ ./src]]></programlisting>
<para>This class will be put into the
- <literal>jboss-seam-jee5.jar</literal> file using
- changes to the build.xml discussed later. </para>
+ <literal>jboss-seam-jee5.jar</literal> file. </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -344,7 +257,7 @@
<programlisting><![CDATA[
-cp ../../jpa/resources-websphere61/import.sql ./resources]]></programlisting>
+cp ../../jpa/resources-websphere7/import.sql ./resources]]></programlisting>
</para>
</listitem>
</varlistentry>
@@ -359,60 +272,16 @@
<para>In order to get the changes we have made into our application we
need to make some changes to the <literal>build.xml</literal>.
There are also some additional jars that are required by our
- application in order to work with Websphere. This section will cover
+ application in order to work with WAS. This section will cover
what changes are needed to the <literal>build.xml</literal>.</para>
<section>
- <title>New libraries dependencies</title>
- <para>
- <itemizedlist>
- <listitem>
- <para>JSF libraries — Websphere 6.1 comes with
- its own version of JSF 1.1 (Seam requires JSF 1.2). So
- we must add these jars to our application:
- <itemizedlist>
- <listitem>
- <para><literal>jsf-api.jar</literal>
- </para>
- </listitem>
- <listitem>
- <para><literal>jsf-impl.jar</literal>
- </para>
- </listitem>
- </itemizedlist> </para>
- </listitem>
- <listitem>
- <para>Since Websphere is not a fully compliant
- <literal>JEE5</literal> implementation we need to
- add these EL libraries:
- <itemizedlist>
- <listitem>
- <para><literal>el-api.jar</literal>
- </para>
- </listitem>
- <listitem>
- <para><literal>el-ri.jar</literal>
- </para>
- </listitem>
- </itemizedlist> </para>
- </listitem>
- <listitem>
- <para><literal>jboss-seam.jar</literal> — for
- some reason when deploying the application through
- the Websphere administration console it can not find
- the <literal>jboss-seam.jar</literal> at the base
- of the EAR archive. This means that we need to add it to
- the <literal>/lib</literal> of the EAR.</para>
- </listitem>
- <listitem>
- <para>Finally we remove the <literal>log4j.jar</literal>
+ <title>Library dependency changes</title>
+ <para>We remove the <literal>log4j.jar</literal>
so that all of the log output from our application will
- be added to the Websphere log. Additional steps are
+ be added to the WAS log. Additional steps are
required to fully configure log4j and those are outside
of the scope of this document.</para>
- </listitem>
- </itemizedlist> </para>
-
</section>
<section>
@@ -421,9 +290,8 @@
<para>Add the following entry to the bottom of the
<literal>build.xml</literal> file. This overrides the
default fileset that is used to populate the
- <literal>jboss-seam-jee5.jar</literal>. The primary change
- is the addition of the
- <literal>GlassfishDerbyDialect.class</literal>:
+ <literal>jboss-seam-jee5.jar</literal>.
+ :
</para>
@@ -431,43 +299,10 @@
<fileset id="jar.resources" dir="${resources.dir}">
<include name="import.sql" />
<include name="seam.properties" />
- <include name="GlassfishDerbyDialect.class" />
<include name="META-INF/persistence.xml" />
<include name="META-INF/ejb-jar.xml" />
</fileset>]]></programlisting>
-
- <para>Next we need to add the library dependencies discussed above.
- For this add the following to bottom of the
- <literal>ear.lib.extras</literal> fileset entry:
- </para>
-
-
- <programlisting role="XML"><![CDATA[
- <!--<include name="lib/log4j.jar" />-->
- <include name="lib/el-api.jar" />
- <include name="lib/el-ri.jar" />
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
- <include name="lib/jboss-seam.jar" />
-</fileset>]]></programlisting>
-
- <para>We also need to add richfaces-api.jar, jsf-impl.jar and
- el-ri.jar into WEB-INF/lib of the war file. Add the following
- fileset after <literal>ear.lib.extras</literal> fileset.</para>
- <programlisting role="XML"><![CDATA[
- <fileset id="war.lib.extras" dir="${seam.dir}">
- <include name="lib/richfaces-api.jar" />
- <include name="lib/jsf-impl.jar" />
- <include name="lib/el-ri.jar" />
- </fileset>]]></programlisting>
- <note>
- <title>A note about copying JSF and EL jars</title>
- <para>There is a class loading issue with WebSphere, which causes the jars
- from ear lib directory to not be available when the web module is
- initialized.</para>
- </note>
-
<para>Now all that is left is to execute the <literal>ant
archive</literal> task and the built application will be in
the <literal>jee5/booking/dist</literal> directory.
@@ -484,25 +319,26 @@
<para> For this we will use Websphere's administration console. As
before there are some tricks and tips that must be followed.</para>
- <para>The steps below are for the Websphere version stated above, yours
- may be slightly different.
+ <para>The steps below are for the WAS version stated above.
+ The ports are default values, if you changed them substitute your values.
<orderedlist>
<listitem>
<para>Log in to the administration console
- <programlisting><![CDATA[
-https://localhost:9043/ibm/console]]></programlisting>
+ <programlisting><![CDATA[https://localhost:9043/admin]]></programlisting>
+ or
+ <programlisting><![CDATA[http://localhost:9060/admin]]></programlisting>
</para>
</listitem>
<listitem>
- <para>Access the <literal>Enterprise
- Application</literal> menu option under the
- <literal>Applications</literal> top menu. </para>
+ <para>Access the <literal>Websphere enterprise
+ applications</literal> menu option under the
+ <literal>Applications --> Application Type</literal> left side menu. </para>
</listitem>
<listitem>
- <para>At the top of the <literal>Enterprise
- Application</literal> table select
+ <para>At the top of the <literal>Enterprise
+ Applications</literal> table select
<literal>Install</literal>. Below are installation
wizard pages and what needs to done on each:
<itemizedlist>
@@ -521,6 +357,16 @@
<literal>Next</literal>
button.</para>
</listitem>
+ <listitem>
+ <para>Select the
+ <literal>Fast Path</literal>
+ button.</para>
+ </listitem>
+ <listitem>
+ <para>Select the
+ <literal>Next</literal>
+ button.</para>
+ </listitem>
</itemizedlist> </para>
</listitem>
<listitem>
@@ -529,9 +375,10 @@
<itemizedlist>
<listitem>
<para>Select the <literal>Deploy
- enterprise beans</literal>
- check box. This is needed unless you
- used a Websphere tool to package the
+ enterprise beans</literal> and
+ <literal>Allow EJB reference targets to resolve automatically</literal>
+ check boxes. This is needed unless you
+ used a Websphere AS tool to package the
application. </para>
</listitem>
<listitem>
@@ -539,6 +386,8 @@
<literal>Next</literal>
button.</para>
</listitem>
+
+
</itemizedlist> </para>
</listitem>
<listitem>
@@ -554,38 +403,6 @@
</itemizedlist> </para>
</listitem>
<listitem>
- <para><literal>Map EJB references to
- beans</literal> This page will list all of the
- beans that we entered in the web.xml.
- <itemizedlist>
- <listitem>
- <para>Make sure that <literal>Allow
- EJB reference targets to resolve
- automatically</literal> check box
- is selected. This will tell
- Websphere to bind our EJB3 beans to
- the EJB references in the web
- module.</para>
- </listitem>
- <listitem>
- <para>Select the
- <literal>Next</literal>
- button.</para>
- </listitem>
- </itemizedlist> </para>
- </listitem>
- <listitem>
- <para><literal>Map virtual hosts for Web
- modules</literal>
- <itemizedlist>
- <listitem>
- <para>No changes needed here. Select
- the <literal>Next</literal>
- button.</para>
- </listitem>
- </itemizedlist> </para>
- </listitem>
- <listitem>
<para><literal>Summary</literal>
<itemizedlist>
<listitem>
@@ -604,7 +421,7 @@
application.</para>
</listitem>
<listitem>
- <para>When if finishes select the
+ <para>When it finishes select the
<literal>Save</literal> link and
you will be returned to the
<literal>Enterprise
@@ -617,7 +434,7 @@
</listitem>
<listitem id="websphere-app-adj-after-install" xreflabel="installation adjustments for jee5 example">
<para>Now that we have our application installed we need to
- make some adjustments to it before we can start it:
+ make some adjustments to it before we can start it:</para>
<itemizedlist>
<listitem>
<para>Starting from the <literal>Enterprise
@@ -631,22 +448,21 @@
</listitem>
<listitem>
<para>Select the
- <literal>jboss-seam-jee5.war</literal>
+ <literal>jboss-seam-jee5-booking.war</literal>
link.</para>
</listitem>
<listitem>
<para>Change the <literal>Class loader
order</literal> combo box to
<literal>Classes loaded with application
- class loader first</literal>.</para>
+ class loader first (parent last)</literal>.</para>
</listitem>
<listitem>
<para>Select <literal>Apply</literal> and then
<literal>Save</literal> options.</para>
</listitem>
<listitem>
- <para>Return the <literal>Seam
- Booking</literal> page.</para>
+ <para>Return to the <literal>Seam Booking</literal> page.</para>
</listitem>
<listitem>
<para>On this page select the <literal>Class
@@ -657,59 +473,12 @@
<para>Select the radio button for
<literal>Classes loaded with application
class loader first</literal>.</para>
- </listitem>
+ </listitem>
<listitem>
- <para>Even though we are not enabling class reload
- you must also enter a valid number in the
- <literal>Polling interval for updated
- files</literal> text area (zero works
- fine).</para>
- </listitem>
- <listitem>
<para>Select <literal>Apply</literal> and then
<literal>Save</literal> options.</para>
</listitem>
- <listitem>
- <para>You should verify that the change you just
- made has been remembered. We have had problems with the last
- class loader change not taking effect - even
- after a restart. If the change did not take you
- will need to do it manually, following these
- directions:
- <itemizedlist>
- <listitem>
- <para> Open the following file in a text
- editor of your choice:
-
-
- <programlisting><![CDATA[
-$WebSphereInstall/$yourServerName/profiles/$yourProfileName/config/cells/
- $yourCellName/applications/Seam Booking.ear/deployments/
- Seam Booking/deployment.xml]]></programlisting>
- </para>
- </listitem>
- <listitem>
- <para> Modify the following line so that
- <literal>PARENT_FIRST</literal>
- is now
- <literal>PARENT_LAST</literal>:
-
-
- <programlisting><![CDATA[
-<classloader xmi:id="Classloader_#######" mode="PARENT_FIRST"/>]]></programlisting>
- </para>
- </listitem>
- <listitem>
- <para> Save the file and now when go to the
- <literal>Class loading and update
- detection</literal> page you
- should see <literal>Classes loaded
- with application class loader
- first</literal> selected. </para>
- </listitem>
- </itemizedlist> </para>
- </listitem>
- </itemizedlist> </para>
+ </itemizedlist>
</listitem>
<listitem>
<para>To start the application return to the
@@ -720,11 +489,11 @@
</listitem>
<listitem>
<para>You can now access the application at
- <literal>http://localhost:9080/seam-jee5/</literal>
+ <literal>http://localhost:9080/seam-jee5-booking/index.html</literal>
.</para>
</listitem>
</orderedlist>
- <note>
+ <!-- <note>
<title>A note about Websphere Stateful bean timeouts</title>
<para>The default timeout period for a Websphere 6.1 Stateful
EJB is 10 minutes. This means that you may see some EJB timeout
@@ -733,7 +502,7 @@
that is beyond the scope of this document. See the Websphere
documentation for details.
</para>
- </note>
+ </note> -->
</para>
</section>
@@ -744,8 +513,7 @@
<para>Thankfully getting the <literal>jpa</literal> example to work is
much easier than the <literal>jee5</literal> example. This is the
Hotel Booking example implemented in Seam POJOs and using Hibernate JPA
- with JPA transactions. It does not require EJB3 support to
- run.</para>
+ with JPA transactions. It does not use EJB3.</para>
<para> The example already has a breakout of configurations and build
scripts for many of the common containers including Websphere.</para>
@@ -756,9 +524,9 @@
<section>
<title>Building the <literal>jpa</literal> example</title>
<para> Building it only requires running the correct ant command:
- <programlisting>ant websphere61</programlisting>
+ <programlisting>ant websphere7</programlisting>
This will create container specific distribution and exploded
- archive directories with the <literal>websphere61</literal> label.</para>
+ archive directories with the <literal>websphere7</literal> label.</para>
</section>
<section>
<title>Deploying the <literal>jpa</literal> example</title>
@@ -776,19 +544,20 @@
<itemizedlist>
<listitem>
<para>Browse to the
- <literal>examples/jpa/dist-websphere61/jboss-seam-jpa.war</literal>
+ <literal>examples/jpa/dist-websphere7/jboss-seam-jpa.war</literal>
file using the file upload widget.
</para>
</listitem>
<listitem>
- <para>In the <literal>Context root</literal> text box
- enter <literal>jboss-seam-jpa</literal>.
- </para>
+ <para>Select the
+ <literal>Fast Path</literal>
+ button.</para>
</listitem>
<listitem>
- <para>Select the <literal>Next</literal> button.
- </para>
- </listitem>
+ <para>Select the
+ <literal>Next</literal>
+ button.</para>
+ </listitem>
</itemizedlist> </para>
</listitem>
<listitem>
@@ -797,6 +566,20 @@
</para>
</listitem>
<listitem>
+ <para><literal>Map context roots for Web modules</literal>
+ <itemizedlist>
+ <listitem>
+ <para>In the <literal>Context root</literal> text box
+ enter <literal>jboss-seam-jpa</literal>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Select the <literal>Next</literal> button.
+ </para>
+ </listitem>
+ </itemizedlist></para>
+ </listitem>
+ <listitem>
<para><literal>Summary</literal> page
<itemizedlist>
<listitem>
@@ -809,6 +592,7 @@
</listitem>
</itemizedlist> </para>
</listitem>
+
</itemizedlist>
</para>
</listitem>
@@ -816,7 +600,7 @@
<para>As with the <literal>jee5</literal> example there are some
class loader changes needed before we start the application.
Follow the instructions at <xref linkend="websphere-app-adj-after-install"/>
- but exchange <literal>jboss-seam-jpa</literal> for <literal>Seam Booking</literal>.
+ but exchange <literal>jboss-seam-jpa_war</literal> for <literal>Seam Booking</literal>.
</para>
</listitem>
<listitem>
@@ -834,34 +618,40 @@
</section>
<section>
- <title>Whats different for Websphere 6.1</title>
+ <title>What's different for Websphere AS V7</title>
<para>The differences between the JPA examples that deploys to JBoss
- 4.2 and Websphere 6.1 are mostly expected; library and
+ 4.2 and Websphere AS V7 are mostly expected; library and
configuration file changes. </para>
<itemizedlist>
<listitem>
<para>Configuration file changes
<itemizedlist>
<listitem>
- <para><literal>WEB-INF/web.xml</literal>
- — the only significant change is that
- Websphere 6.1 only support <literal>Servlet
- 2.4</literal> so the top of this file was changed.
- </para>
- </listitem>
- <listitem>
<para>
<literal>META-INF/persistence.xml</literal>
— the main changes here are for the
datasource JNDI path, switching to the Websphere
- 6.1 transaction manager look up class, and
+ transaction manager look up class, and
changing the hibernate dialect to be
<literal>GlassfishDerbyDialect</literal>
.</para>
</listitem>
<listitem>
<para>
- <literal>WEB-INF/classes/GlassfishDerbyDialect.class
+ <literal>WEB-INF/components.xml</literal>
+ — the change here is <literal>jndi-pattern</literal>
+ without /local string.</para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>META-INF/ejb-jar.xml</literal>
+ — the same change in <literal>ejb-ref-name</literal>,
+ where is replace /local string in
+ <literal>jboss-seam-jee5/AuthenticatorAction</literal>.</para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>src/GlassfishDerbyDialect.java
</literal> — this class is needed for the
hibernate dialect change to
<literal>GlassfishDerbyDialect</literal>
@@ -873,15 +663,14 @@
<literal>ID</literal> column can not be
populated by this file and was removed.
</para>
- </listitem>
+ </listitem>
</itemizedlist> </para>
</listitem>
<listitem>
<para>Changes for dependent libraries</para>
- <para><literal>WEB-INF/lib</literal> — The Websphere
- version requires several library packages because they are
+ <para>The Websphere 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. Below are
+ hibernate and their dependencies. Below are
listed only the additional jars needed above and beyond the JBoss
<literal>JPA</literal> example.
<itemizedlist>
@@ -927,31 +716,6 @@
</itemizedlist> </para>
</listitem>
<listitem>
- <para>Seam requires JSF 1.2 and these are the jars needed
- for that. Websphere 6.1 ships with its own implementation
- of JSF 1.1.
- <itemizedlist>
- <listitem>
- <simpara>
- <literal>jsf-api.jar</literal>
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- <literal>jsf-impl.jar</literal>
- </simpara>
- </listitem>
- <listitem>
- <simpara> <literal>el-ri.jar</literal>
- </simpara>
- </listitem>
- <listitem>
- <simpara> <literal>el-api.jar</literal>
- </simpara>
- </listitem>
- </itemizedlist> </para>
- </listitem>
- <listitem>
<para>Various third party jars that Websphere needs:
<itemizedlist>
<listitem>
@@ -993,7 +757,7 @@
<section>
<title>Deploying an application created using
- <literal>seam-gen</literal> on Websphere 6.1.0.13</title>
+ <literal>seam-gen</literal> on Websphere V7</title>
<para><literal>seam-gen</literal> is a very useful tool for developers
to quickly get an application up and running, and provides a foundation
@@ -1145,18 +909,18 @@
</varlistentry>
<varlistentry>
<term>
- <literal>resources/GlassfishDerbyDialect.class</literal>
+ <literal>src/GlassfishDerbyDialect.java</literal>
</term>
<listitem>
- <para>As with other examples we need to include this class for
+ <para>As with other examples we need to include this java class for
DB support. It can be copied from the
<literal>jpa</literal> example into the
- <literal>websphere_example/resources</literal>
+ <literal>websphere_example/src</literal>
directory.
<programlisting><![CDATA[
-cp $SEAM/examples/jpa/resources-websphere61/WEB-INF/classes/GlassfishDerbyDialect.class
- ./resources]]></programlisting>
+cp $SEAM/examples/jpa/src/GlassfishDerbyDialect.java
+ ./src]]></programlisting>
</para>
</listitem>
</varlistentry>
@@ -1218,41 +982,24 @@
<varlistentry>
<term> <literal>resources/WEB-INF/web.xml</literal>
</term>
- <listitem>
- <para> Websphere does not support <literal>Servlet
- 2.5</literal>, it required <literal>Servlet
- 2.4</literal>. For this change we need to adjust the top of
- the <literal>web.xml</literal> file to look like the
- following:</para>
-
- <programlisting role="XML"><![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- ]]></programlisting>
-
+ <listitem>
<para>As with the <literal>jee5/booking</literal>
example we need to add EJB references to the web.xml. These
- references require the empty
- <literal>local-home</literal> to flag them for
+ references require replacing /local string in
+ <literal>ejb-ref-name</literal> to flag them for
Websphere to perform the proper binding.</para>
- <programlisting role="XML"><![CDATA[
- <ejb-local-ref>
- <ejb-ref-name>websphere_example/AuthenticatorAction</ejb-ref-name>
- <ejb-ref-type>Session</ejb-ref-type>
- <local-home></local-home>
- <local>org.jboss.seam.tutorial.websphere.action.Authenticator</local>
- </ejb-local-ref>
+ <programlisting role="XML"><![CDATA[
+ <ejb-local-ref>
+ <ejb-ref-name>websphere_example/AuthenticatorAction</ejb-ref-name>
+ <ejb-ref-type>Session</ejb-ref-type>
+ <local>org.jboss.seam.tutorial.websphere.action.Authenticator</local>
+ </ejb-local-ref>
<ejb-local-ref>
<ejb-ref-name>websphere_example/EjbSynchronizations</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
- <local-home></local-home>
<local>org.jboss.seam.transaction.LocalEjbSynchronizations</local>
</ejb-local-ref>]]></programlisting>
</listitem>
@@ -1262,23 +1009,23 @@
<section>
<title>Creating the <literal>AuthenticatorAction</literal>
EJB</title>
- <para> We want to take the existing <literal>Authenticator</literal>
+ <para>We want to take the existing <literal>Authenticator</literal>
Seam POJO component and create an EJB3 out of it. </para>
<orderedlist>
- <listitem>
+ <listitem> <para>Change the generated Authenticator class</para>
<itemizedlist>
<listitem>
- <para> Rename the class to
+ <para>Rename the class to
<literal>AuthenticatorAction</literal> </para>
</listitem>
<listitem>
- <para> Add the <literal>@Stateless</literal>
+ <para>Add the <literal>@Stateless</literal>
annotation to the new
<literal>AuthenticatorAction</literal> class.
</para>
</listitem>
<listitem>
- <para> Create an interface called
+ <para>Create an interface called
<literal>Authenticator</literal> which
<literal>AuthenticatorAction</literal>
implements (EJB3 requires session beans to have a
@@ -1345,62 +1092,6 @@
</copy>]]></programlisting>
</listitem>
<listitem>
- <para>We need to ge the
- <literal>GlassfishDerbyDialect.class</literal> into
- our application jar. To do that find the
- <literal>jar</literal> task and modify the top of it so that
- it looks like this:
- </para>
-
-
- <programlisting role="XML"><![CDATA[
-<target name="jar" depends="compile,copyclasses"
- description="Build the distribution .jar file">
- <copy todir="${jar.dir}">
- <fileset dir="${basedir}/resources">
- <include name="seam.properties" />
- <include name="*.drl" />
- <include name="GlassfishDerbyDialect.class" />
- </fileset>
- </copy>
-...]]></programlisting>
- </listitem>
- <listitem>
- <para>Next we need to get the
- <literal>jboss-seam.jar</literal> into the base of the
- <literal>EAR</literal> file. For deployment Websphere
- requires this jar to be in both the <literal>/lib</literal>
- directory and at the base of the <literal>EAR</literal>. You
- must add the following to the <literal>archive</literal>
- task: </para>
-
-
- <programlisting role="XML"><![CDATA[
-<fileset dir="${lib.dir}">
- <include name="jboss-seam.jar" />
-</fileset>]]></programlisting>
- <para>So that the whole <literal>archive</literal> task looks
- like:</para>
-
-
- <programlisting role="XML"><![CDATA[
-<target name="archive" depends="jar,war,ear"
- description="Package the archives">
- <jar jarfile="${dist.dir}/${project.name}.jar" basedir="${jar.dir}"/>
- <jar jarfile="${dist.dir}/${project.name}.war" basedir="${war.dir}"/>
- <jar jarfile="${dist.dir}/${project.name}.ear">
- <fileset dir="${ear.dir}"/>
- <fileset dir="${dist.dir}">
- <include name="${project.name}.jar"/>
- <include name="${project.name}.war"/>
- </fileset>
- <fileset dir="${lib.dir}">
- <include name="jboss-seam.jar" />
- </fileset>
- </jar>
-</target>]]></programlisting>
- </listitem>
- <listitem>
<para>Now we need to get extra jars into the
<literal>build.xml</literal>. Look for the
<literal><fileset dir="${basedir}"></literal> section
@@ -1417,9 +1108,7 @@
<include name="*hibernate.cfg.xml" />
<include name="jbpm.cfg.xml" />
</fileset>
- <fileset dir="${lib.dir}">
- <include name="jboss-seam.jar" />
- </fileset>
+
<fileset dir="${basedir}">
<include name="lib/jbpm*.jar" />
<include name="lib/jboss-el.jar" />
@@ -1451,17 +1140,6 @@
<include name="lib/jboss-common-core.jar" />]]></programlisting>
</listitem>
<listitem>
- <para>JSF dependencies. You will need to copy the
- <literal>el-ri.jar</literal> from the
- <literal>$SEAM/examples/jpa/lib</literal> directory.</para>
- <programlisting role="XML"><![CDATA[
- <!-- jsf libs -->
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
- <include name="lib/el-api.jar" />
- <include name="lib/el-ri.jar"/>]]></programlisting>
- </listitem>
- <listitem>
<para> Third party dependencies.</para>
<programlisting role="XML"><![CDATA[
<!-- 3rd party and supporting jars -->
@@ -1477,8 +1155,7 @@
</listitem>
<listitem>
<para><literal>jboss-seam.jar</literal> - this is needed in
- both the <literal>ear</literal> base and
- <literal>/lib</literal>
+ the <literal>ear</literal> base
directory.</para>
<programlisting role="XML"><![CDATA[
<!-- seam jar -->
@@ -1505,13 +1182,7 @@
<include name="lib/hibernate-entitymanager.jar"/>
<include name="lib/hibernate-validator.jar"/>
<include name="lib/jboss-common-core.jar" />
-
- <!-- jsf libs -->
- <include name="lib/jsf-api.jar" />
- <include name="lib/jsf-impl.jar" />
- <include name="lib/el-api.jar" />
- <include name="lib/el-ri.jar"/>
-
+
<!-- 3rd party and supporting jars -->
<include name="lib/javassist.jar"/>
<include name="lib/dom4j.jar" />
@@ -1525,20 +1196,7 @@
<!-- seam jar -->
<include name="lib/jboss-seam.jar" />
-</fileset>]]></programlisting>
-
- <para>The last step is to add <literal>jsf-impl.jar</literal>
- and <literal>el-ri.jar</literal> to the war target. Look for
- <literal>copy todir="${war.dir}/WEB-INF/lib"</literal> and add the
- following:</para>
-<programlisting role="XML"><![CDATA[<copy todir="${war.dir}/WEB-INF/lib">
- <fileset dir="${lib.dir}">
- <includesfile name="deployed-jars-war.list" />
- <include name="jsf-impl.jar" />
- <include name="el-ri.jar" />
- <exclude name="jboss-seam-gen.jar" />
- </fileset>
-</copy>]]></programlisting>
+</fileset>]]></programlisting>
</listitem>
</itemizedlist>
@@ -1548,7 +1206,6 @@
<title> Building and deploying the seam-gen'd application to Websphere
</title>
-
<itemizedlist>
<listitem>
<para> Build your application by calling
15 years, 9 months
Seam SVN: r9986 - trunk/build.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-01-29 10:52:44 -0500 (Thu, 29 Jan 2009)
New Revision: 9986
Modified:
trunk/build/root.pom.xml
Log:
JBSEAM-3894
Modified: trunk/build/root.pom.xml
===================================================================
--- trunk/build/root.pom.xml 2009-01-29 15:50:57 UTC (rev 9985)
+++ trunk/build/root.pom.xml 2009-01-29 15:52:44 UTC (rev 9986)
@@ -38,7 +38,7 @@
<!-- Externalize some version numbers here -->
<properties>
- <version.richfaces>3.2.2.SR1</version.richfaces>
+ <version.richfaces>3.3.0.GA</version.richfaces>
<version.wicket>1.3.3</version.wicket>
<version.drools>4.0.4</version.drools>
</properties>
15 years, 9 months
Seam SVN: r9985 - in trunk/examples/jpa/resources-websphere7: META-INF and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-01-29 10:50:57 -0500 (Thu, 29 Jan 2009)
New Revision: 9985
Added:
trunk/examples/jpa/resources-websphere7/META-INF/
trunk/examples/jpa/resources-websphere7/META-INF/persistence.xml
Log:
JBSEAM-3570 - adding new configuration for WAS V7
Added: trunk/examples/jpa/resources-websphere7/META-INF/persistence.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/META-INF/persistence.xml (rev 0)
+++ trunk/examples/jpa/resources-websphere7/META-INF/persistence.xml 2009-01-29 15:50:57 UTC (rev 9985)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
+ <persistence-unit name="bookingDatabase" transaction-type="RESOURCE_LOCAL">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>DefaultDatasource</jta-data-source>
+ <properties>
+ <!-- From WAS 6.1.0.9, the embedded DB is switched to the same Derby DB in GlassFish -->
+ <property name="hibernate.dialect" value="GlassfishDerbyDialect"/>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
+ <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/>
+ </properties>
+ </persistence-unit>
+</persistence>
Property changes on: trunk/examples/jpa/resources-websphere7/META-INF/persistence.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
Seam SVN: r9984 - in trunk/examples/jpa: resources-websphere61/WEB-INF/classes and 4 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2009-01-29 10:48:00 -0500 (Thu, 29 Jan 2009)
New Revision: 9984
Added:
trunk/examples/jpa/build-websphere7.xml
trunk/examples/jpa/resources-websphere7/
trunk/examples/jpa/resources-websphere7/WEB-INF/
trunk/examples/jpa/resources-websphere7/WEB-INF/classes/
trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml
trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml
trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml
trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml
trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml
trunk/examples/jpa/resources-websphere7/import.sql
trunk/examples/jpa/resources-websphere7/seam.properties
trunk/examples/jpa/src/GlassfishDerbyDialect.java
Removed:
trunk/examples/jpa/resources-websphere61/WEB-INF/classes/GlassfishDerbyDialect.class
Modified:
trunk/examples/jpa/build.xml
Log:
JBSEAM-3570 - adding new configuration for WAS V7
Added: trunk/examples/jpa/build-websphere7.xml
===================================================================
--- trunk/examples/jpa/build-websphere7.xml (rev 0)
+++ trunk/examples/jpa/build-websphere7.xml 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+
+<project name="JPA Booking" default="noejb.archive" basedir=".">
+
+ <!-- Naming -->
+ <property name="Name" value="The JPA Example for WebSphere 7" />
+ <property name="example.name" value="jboss-seam-jpa" />
+
+ <!-- resources -->
+ <property name="resources.dir" value="resources-websphere7" />
+ <property name="dist.dir" value="dist-websphere7" />
+ <property name="exploded-archives.dir" value="exploded-archives-websphere7" />
+
+ <!-- Libraries to include -->
+ <property name="seam.ui.lib" value="true" />
+ <property name="seam.debug.lib" value="true" />
+ <property name="facelets.lib" value="true" />
+ <property name="richfaces.lib" value="true" />
+ <property name="el-ri.lib" value="true" />
+ <property name="jboss-common-core.lib" value="true" />
+
+ <import file="../build.xml" />
+
+ <fileset id="noejb.war.lib.extras" dir="${seam.dir}">
+ <!-- Seam deps -->
+ <include name="lib/dom4j.jar" />
+ <include name="lib/javassist.jar" />
+
+ <!-- Misc -->
+ <include name="lib/commons-beanutils.jar" />
+ <include name="lib/commons-digester.jar" />
+ <include name="lib/commons-collections.jar" />
+ <!-- JSF (and related) implementation -->
+ <!-- <include name="lib/jsf-api.jar"/>-->
+<!-- <include name="lib/jsf-impl.jar" />-->
+<!-- <include name="lib/el-api.jar" />-->
+
+ <!-- Hibernate and deps -->
+ <include name="lib/hibernate.jar" />
+ <include name="lib/hibernate-commons-annotations.jar" />
+ <include name="lib/hibernate-annotations.jar" />
+ <include name="lib/hibernate-entitymanager.jar" />
+ <include name="lib/hibernate-validator.jar" />
+ <include name="lib/cglib.jar" />
+ <include name="lib/asm.jar" />
+ <include name="lib/antlr.jar" />
+ </fileset>
+
+ <fileset id="noejb.war.extras" dir="${resources.dir}">
+ <include name="WEB-INF/classes/**/*" />
+ </fileset>
+
+</project>
+
Property changes on: trunk/examples/jpa/build-websphere7.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/examples/jpa/build.xml
===================================================================
--- trunk/examples/jpa/build.xml 2009-01-29 00:13:36 UTC (rev 9983)
+++ trunk/examples/jpa/build.xml 2009-01-29 15:48:00 UTC (rev 9984)
@@ -42,6 +42,10 @@
<ant antfile="build-websphere61.xml"/>
</target>
+ <target name="websphere7" description="Build the JPA artifacts, suitable for deployment to WebSphere 7">
+ <ant antfile="build-websphere7.xml"/>
+ </target>
+
<target name="tomcat55" description="Build the JPA artifacts, suitable for deployment to Tomcat 5.5">
<ant antfile="build-tomcat55.xml"/>
</target>
@@ -65,12 +69,13 @@
<ant antfile="build-weblogic92.xml" target="clean" />
<ant antfile="build-weblogic10.xml" target="clean" />
<ant antfile="build-websphere61.xml" target="clean" />
+ <ant antfile="build-websphere7.xml" target="clean" />
<ant antfile="build-tomcat55.xml" target="clean" />
<ant antfile="build-tomcat6.xml" target="clean" />
<ant antfile="build-jboss-embedded.xml" target="clean" />
</target>
- <target name="all" depends="jboss, jboss405, glassfish, weblogic92,weblogic10, websphere61, tomcat55, tomcat6"/>
+ <target name="all" depends="jboss, jboss405, glassfish, weblogic92,weblogic10, websphere61, websphere7, tomcat55, tomcat6"/>
<target name="test">
<ant antfile="build-jboss.xml" target="test" />
Deleted: trunk/examples/jpa/resources-websphere61/WEB-INF/classes/GlassfishDerbyDialect.class
===================================================================
(Binary files differ)
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml (rev 0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 5723 2007-07-08 22:54:42Z myuan $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!--
+ <category name="org.hibernate">
+ <priority value="DEBUG"/>
+ </category>
+ -->
+
+
+ <category name="org.jboss.seam">
+ <priority value="DEBUG"/>
+ </category>
+
+
+ <!--
+ <category name="org.jboss.kernel">
+ <priority value="DEBUG"/>
+ </category>
+ -->
+
+ <root>
+ <priority value="INFO"/>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/classes/log4j.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml (rev 0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:persistence="http://jboss.com/products/seam/persistence"
+ xmlns:transaction="http://jboss.com/products/seam/transaction"
+ xmlns:security="http://jboss.com/products/seam/security"
+ xmlns:web="http://jboss.com/products/seam/web"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
+ http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
+ http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
+ http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.1.xsd
+ http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.1.xsd
+ http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">
+
+ <core:manager conversation-timeout="120000"
+ concurrent-request-timeout="500"
+ conversation-id-parameter="cid"/>
+
+ <transaction:entity-transaction entity-manager="#{em}"/>
+
+ <persistence:entity-manager-factory name="bookingDatabase"/>
+
+ <persistence:managed-persistence-context name="em" auto-create="true"
+ entity-manager-factory="#{bookingDatabase}"/>
+
+ <security:identity authenticate-method="#{authenticator.authenticate}"/>
+
+</components>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/components.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml (rev 0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <!-- Facelets support -->
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+
+</faces-config>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml (rev 0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pages xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd"
+
+ no-conversation-view-id="/main.xhtml"
+ login-view-id="/home.xhtml">
+
+ <page view-id="/register.xhtml">
+
+ <action if="#{validation.failed}"
+ execute="#{register.invalid}"/>
+
+ <navigation>
+ <rule if="#{register.registered}">
+ <redirect view-id="/home.xhtml"/>
+ </rule>
+ </navigation>
+
+ </page>
+
+ <page view-id="/home.xhtml" action="#{identity.isLoggedIn}">
+
+ <navigation from-action="#{identity.isLoggedIn}">
+ <rule if-outcome="true">
+ <redirect view-id="/main.xhtml"/>
+ </rule>
+ </navigation>
+
+ <navigation>
+ <rule if="#{identity.loggedIn}">
+ <redirect view-id="/main.xhtml"/>
+ </rule>
+ </navigation>
+
+ </page>
+
+ <page view-id="/password.xhtml"
+ login-required="true">
+
+ <navigation>
+ <rule if="#{changePassword.changed}">
+ <redirect view-id="/main.xhtml"/>
+ </rule>
+ </navigation>
+
+ </page>
+
+ <page view-id="/main.xhtml"
+ login-required="true">
+
+ <navigation from-action="#{hotelBooking.selectHotel(hot)}">
+ <redirect view-id="/hotel.xhtml"/>
+ </navigation>
+
+ </page>
+
+ <page view-id="/hotel.xhtml"
+ conversation-required="true">
+
+ <description>View hotel: #{hotel.name}</description>
+
+ <navigation from-action="#{hotelBooking.bookHotel}">
+ <redirect view-id="/book.xhtml"/>
+ </navigation>
+
+ </page>
+
+ <page view-id="/book.xhtml"
+ conversation-required="true">
+
+ <description>Book hotel: #{hotel.name}</description>
+
+ <navigation from-action="#{hotelBooking.setBookingDetails}">
+ <rule if="#{hotelBooking.bookingValid}">
+ <redirect view-id="/confirm.xhtml"/>
+ </rule>
+ </navigation>
+
+ </page>
+
+ <page view-id="/confirm.xhtml"
+ conversation-required="true">
+
+ <description>Confirm booking: #{booking.description}</description>
+
+ <navigation from-action="#{hotelBooking.confirm}">
+ <redirect view-id="/main.xhtml"/>
+ </navigation>
+
+ </page>
+
+ <page view-id="*">
+
+ <navigation from-action="#{identity.logout}">
+ <redirect view-id="/home.xhtml"/>
+ </navigation>
+
+ <navigation from-action="#{hotelBooking.cancel}">
+ <redirect view-id="/main.xhtml"/>
+ </navigation>
+
+ </page>
+
+ <exception class="org.jboss.seam.security.NotLoggedInException">
+ <redirect view-id="/home.xhtml">
+ <message severity="warn">You must be logged in to use this feature</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.faces.application.ViewExpiredException">
+ <redirect view-id="/home.xhtml">
+ <message severity="warn">Session expired, please log in again</message>
+ </redirect>
+ </exception>
+
+</pages>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/pages.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml
===================================================================
--- trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml (rev 0)
+++ trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app id="WebApp_ID" version="2.4"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <!-- Seam -->
+
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
+
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter>
+ <filter-name>RichFaces Filter</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>enable-cache</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>RichFaces Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Faces Servlet -->
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Faces Servlet Mapping -->
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+
+ <!-- JSF parameters -->
+
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
Property changes on: trunk/examples/jpa/resources-websphere7/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/resources-websphere7/import.sql
===================================================================
--- trunk/examples/jpa/resources-websphere7/import.sql (rev 0)
+++ trunk/examples/jpa/resources-websphere7/import.sql 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,22 @@
+insert into Customer (username, password, name) values ('gavin', 'foobar', 'Gavin King')
+insert into Customer (username, password, name) values ('demo', 'demo', 'Demo User')
+insert into Hotel (price, name, address, city, state, zip, country) values (120, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (180, 'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (450, 'W Hotel', 'Union Square, Manhattan', 'NY', 'NY', '10011', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (450, 'W Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY', '10011', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (250, 'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC', '20036', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (300, '70 Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY', '10011', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (300, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (80, 'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI', '54703', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (90, 'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau Claire', 'WI', '54701', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (160, 'Marriot Downtown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (200, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'Spain')
+insert into Hotel (price, name, address, city, state, zip, country) values (210, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'Israel')
+insert into Hotel (price, name, address, city, state, zip, country) values (240, 'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo', '', '105', 'Japan')
+insert into Hotel (price, name, address, city, state, zip, country) values (130, 'Hotel Beaulac', ' Esplanade Leopold-Robert 2', 'Neuchatel', '', '2000', 'Switzerland')
+insert into Hotel (price, name, address, city, state, zip, country) values (140, 'Conrad Treasury Place', 'William & George Streets', 'Brisbane', 'QLD', '4001', 'Australia')
+insert into Hotel (price, name, address, city, state, zip, country) values (230, 'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal', 'Quebec', 'H3G1H6', 'Canada')
+insert into Hotel (price, name, address, city, state, zip, country) values (460, 'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA', '30326', 'USA')
+insert into Hotel (price, name, address, city, state, zip, country) values (220, 'Swissotel', '68 Market Street', 'Sydney', 'NSW', '2000', 'Australia')
+insert into Hotel (price, name, address, city, state, zip, country) values (250, 'Meli White House', 'Albany Street', 'Regents Park London', '', 'NW13UP', 'Great Britain')
+insert into Hotel (price, name, address, city, state, zip, country) values (210, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA')
Added: trunk/examples/jpa/resources-websphere7/seam.properties
===================================================================
Property changes on: trunk/examples/jpa/resources-websphere7/seam.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/examples/jpa/src/GlassfishDerbyDialect.java
===================================================================
--- trunk/examples/jpa/src/GlassfishDerbyDialect.java (rev 0)
+++ trunk/examples/jpa/src/GlassfishDerbyDialect.java 2009-01-29 15:48:00 UTC (rev 9984)
@@ -0,0 +1,19 @@
+import org.hibernate.dialect.DerbyDialect;
+import org.hibernate.id.IdentityGenerator;
+
+
+public class GlassfishDerbyDialect extends DerbyDialect {
+
+ public GlassfishDerbyDialect() {
+
+ }
+
+ @Override
+ public Class getNativeIdentifierGeneratorClass() {
+
+ return IdentityGenerator.class;
+ }
+
+
+
+}
Property changes on: trunk/examples/jpa/src/GlassfishDerbyDialect.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 9 months
Seam SVN: r9983 - trunk/doc/Seam_Reference_Guide/it-IT.
by seam-commits@lists.jboss.org
Author: nico.ben
Date: 2009-01-28 19:13:36 -0500 (Wed, 28 Jan 2009)
New Revision: 9983
Modified:
trunk/doc/Seam_Reference_Guide/it-IT/Excel.po
Log:
JBSEAM-3767: Italian translation of Seam guide
Modified: trunk/doc/Seam_Reference_Guide/it-IT/Excel.po
===================================================================
--- trunk/doc/Seam_Reference_Guide/it-IT/Excel.po 2009-01-27 14:28:12 UTC (rev 9982)
+++ trunk/doc/Seam_Reference_Guide/it-IT/Excel.po 2009-01-29 00:13:36 UTC (rev 9983)
@@ -6,7 +6,7 @@
"Project-Id-Version: Seam_Reference_Guide\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-18 15:00+0000\n"
-"PO-Revision-Date: 2009-01-26 23:15+0100\n"
+"PO-Revision-Date: 2009-01-29 01:13+0100\n"
"Last-Translator: Nicola Benaglia <nico.benaz(a)gmail.com>\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
@@ -1386,25 +1386,26 @@
#: Excel.xml:1397
#, no-c-format
msgid "<literal>startColumn</literal> — The starting column of the image. The default is the internal counter. The value is a number. Note that the value is 0-based."
-msgstr ""
+msgstr "<literal>startColumn</literal> — La colonna iniziale dell'immagine. Il default è il contatore interno. Il valore è un numero. Si noti che il valore inizia da zero."
#. Tag: para
#: Excel.xml:1405
#, no-c-format
msgid "<literal>startRow</literal> — The starting row of the image. The default is the internal counter. The value is a number. Note that the value is 0-based."
-msgstr ""
+msgstr "<literal>startRow</literal> — La riga iniziale dell'immagine. Il default è il contatore interno. Il valore è un numero. Si noti che il valore inizia da zero."
+# come tradurre span?
#. Tag: para
#: Excel.xml:1413
#, no-c-format
msgid "<literal>columnSpan</literal> — The column span of the image. The default is one resulting in the default width of the image. The value is a float."
-msgstr ""
+msgstr "<literal>columnSpan</literal> — Lo span di colonna dell'immagine. Il default è quello risultante nella larghezza di default dell'immagine. Il default è un float."
#. Tag: para
#: Excel.xml:1421
#, no-c-format
msgid "<literal>rowSpan</literal> — The row span of the image. The default is the one resulting in the default height of the image. The value is a float."
-msgstr ""
+msgstr "<literal>rowSpan</literal> — Lo span di colonna dell'immagine. Il default è quello risultante nella altezza di default dell'immagine. Il default è un float."
#. Tag: para
#: Excel.xml:1429
@@ -1438,7 +1439,7 @@
#: Excel.xml:1462
#, no-c-format
msgid "defines an image in A1:E5 based on the given data"
-msgstr ""
+msgstr "definisce un'immagine in A1:A5 basato sui dati in questione"
#. Tag: title
#: Excel.xml:1466
15 years, 10 months
Seam SVN: r9982 - in trunk: src/test/ftest and 10 other directories.
by seam-commits@lists.jboss.org
Author: jharting
Date: 2009-01-27 09:28:12 -0500 (Tue, 27 Jan 2009)
New Revision: 9982
Added:
trunk/src/test/ftest/examples/todo/
trunk/src/test/ftest/examples/todo/build.xml
trunk/src/test/ftest/examples/todo/jboss-embedded.xml
trunk/src/test/ftest/examples/todo/jboss.xml
trunk/src/test/ftest/examples/todo/src/
trunk/src/test/ftest/examples/todo/src/org/
trunk/src/test/ftest/examples/todo/src/org/jboss/
trunk/src/test/ftest/examples/todo/src/org/jboss/seam/
trunk/src/test/ftest/examples/todo/src/org/jboss/seam/example/
trunk/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/
trunk/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/
trunk/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/
trunk/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/SeleniumTodoTest.java
Modified:
trunk/examples/todo/view/login.jsp
trunk/examples/todo/view/todo.jsp
trunk/src/test/ftest/build.xml
Log:
JBSEAM-3690 Added tests for todo example
Modified: trunk/examples/todo/view/login.jsp
===================================================================
--- trunk/examples/todo/view/login.jsp 2009-01-26 22:16:12 UTC (rev 9981)
+++ trunk/examples/todo/view/login.jsp 2009-01-27 14:28:12 UTC (rev 9982)
@@ -7,10 +7,10 @@
<body>
<h1>Login</h1>
<f:view>
- <h:form>
+ <h:form id="login">
<div>
- <h:inputText value="#{login.user}"/>
- <h:commandButton value="Login" action="#{login.login}"/>
+ <h:inputText id="username" value="#{login.user}"/>
+ <h:commandButton id="submit" value="Login" action="#{login.login}"/>
</div>
</h:form>
</f:view>
Modified: trunk/examples/todo/view/todo.jsp
===================================================================
--- trunk/examples/todo/view/todo.jsp 2009-01-26 22:16:12 UTC (rev 9981)
+++ trunk/examples/todo/view/todo.jsp 2009-01-27 14:28:12 UTC (rev 9982)
@@ -10,13 +10,13 @@
<f:view>
<h:form id="list">
<div>
- <h:outputText value="There are no todo items." rendered="#{empty taskInstancePriorityList}"/>
- <h:dataTable value="#{taskInstancePriorityList}" var="task" rendered="#{not empty taskInstancePriorityList}">
+ <h:outputText id="noItems" value="There are no todo items." rendered="#{empty taskInstancePriorityList}"/>
+ <h:dataTable id="items" value="#{taskInstancePriorityList}" var="task" rendered="#{not empty taskInstancePriorityList}">
<h:column>
<f:facet name="header">
<h:outputText value="Description"/>
</f:facet>
- <h:inputText value="#{task.description}" style="width: 400"/>
+ <h:inputText id="description" value="#{task.description}" style="width: 400"/>
</h:column>
<h:column>
<f:facet name="header">
@@ -30,18 +30,18 @@
<f:facet name="header">
<h:outputText value="Priority"/>
</f:facet>
- <h:inputText value="#{task.priority}" style="width: 30"/>
+ <h:inputText id="priority" value="#{task.priority}" style="width: 30"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Due Date"/>
</f:facet>
- <h:inputText value="#{task.dueDate}" style="width: 100">
+ <h:inputText id="dueDate" value="#{task.dueDate}" style="width: 100">
<s:convertDateTime type="date" dateStyle="short"/>
</h:inputText>
</h:column>
<h:column>
- <s:button action="#{todoList.done}" taskInstance="#{task}" value="Done"/>
+ <s:button id="done" action="#{todoList.done}" taskInstance="#{task}" value="Done"/>
</h:column>
</h:dataTable>
</div>
@@ -49,13 +49,13 @@
<h:messages/>
</div>
<div>
- <h:commandButton value="Update Items" rendered="#{not empty taskInstanceList}"/>
+ <h:commandButton id="update" value="Update Items" rendered="#{not empty taskInstanceList}"/>
</div>
</h:form>
<h:form id="new">
<div>
- <h:inputText value="#{todoList.description}" style="width: 400"/>
- <h:commandButton value="Create New Item" action="#{todoList.createTodo}"/>
+ <h:inputText id="description" value="#{todoList.description}" style="width: 400"/>
+ <h:commandButton id="create" value="Create New Item" action="#{todoList.createTodo}"/>
</div>
</h:form>
</f:view>
Modified: trunk/src/test/ftest/build.xml
===================================================================
--- trunk/src/test/ftest/build.xml 2009-01-26 22:16:12 UTC (rev 9981)
+++ trunk/src/test/ftest/build.xml 2009-01-27 14:28:12 UTC (rev 9982)
@@ -68,6 +68,7 @@
<testexample name="seampay" />
<testexample name="seamspace" />
<testexample name="spring" />
+ <testexample name="todo" />
<testexample name="wicket" />
<antcall target="stop.selenium.server"/>
</target>
@@ -83,6 +84,7 @@
<testexample name="registration" />
<testexample name="seambay" />
<testexample name="seampay" />
+ <testexample name="todo" />
<testexample name="booking" />
<testexample name="jpa" />
<testexample name="hibernate" />
@@ -147,6 +149,7 @@
<cleanexample name="seampay" />
<cleanexample name="seamspace" />
<cleanexample name="spring" />
+ <cleanexample name="todo" />
<cleanexample name="wicket" />
</target>
@@ -169,6 +172,7 @@
<undeployexample name="seampay" />
<undeployexample name="seamspace" />
<undeployexample name="spring" />
+ <undeployexample name="todo" />
<undeployexample name="wicket" />
</target>
Added: trunk/src/test/ftest/examples/todo/build.xml
===================================================================
--- trunk/src/test/ftest/examples/todo/build.xml (rev 0)
+++ trunk/src/test/ftest/examples/todo/build.xml 2009-01-27 14:28:12 UTC (rev 9982)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<project name="todo.ftest.build" basedir="." default="build">
+ <property name="example.name" value="todo"/>
+ <property name="jboss.deploy.target" value="deploy"/>
+ <property name="jboss.undeploy.target" value="undeploy"/>
+ <property name="jboss.example.ready.check.url" value="seam-todo/login.seam"/>
+ <property name="jboss-embedded.deploy.target" value="tomcat.deploy"/>
+ <property name="jboss-embedded.undeploy.target" value="tomcat.undeploy"/>
+ <property name="jboss-embedded.example.ready.check.url" value="jboss-seam-todo/login.seam"/>
+
+ <import file="../build.xml" />
+</project>
Property changes on: trunk/src/test/ftest/examples/todo/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/todo/jboss-embedded.xml
===================================================================
--- trunk/src/test/ftest/examples/todo/jboss-embedded.xml (rev 0)
+++ trunk/src/test/ftest/examples/todo/jboss-embedded.xml 2009-01-27 14:28:12 UTC (rev 9982)
@@ -0,0 +1,31 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Todo example" verbose="2" parallel="false">
+ <test name="todo_jboss-embedded">
+ <parameter name="PROPERTY_FILE" value="" />
+ <parameter name="CONTEXT_PATH" value="/jboss-seam-todo" />
+ <classes>
+ <class name="org.jboss.seam.example.todo.test.selenium.SeleniumTodoTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: trunk/src/test/ftest/examples/todo/jboss-embedded.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/todo/jboss.xml
===================================================================
--- trunk/src/test/ftest/examples/todo/jboss.xml (rev 0)
+++ trunk/src/test/ftest/examples/todo/jboss.xml 2009-01-27 14:28:12 UTC (rev 9982)
@@ -0,0 +1,31 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Todo example" verbose="2" parallel="false">
+ <test name="todo_jboss">
+ <parameter name="PROPERTY_FILE" value="" />
+ <parameter name="CONTEXT_PATH" value="/seam-todo" />
+ <classes>
+ <class name="org.jboss.seam.example.todo.test.selenium.SeleniumTodoTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: trunk/src/test/ftest/examples/todo/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/SeleniumTodoTest.java
===================================================================
--- trunk/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/SeleniumTodoTest.java (rev 0)
+++ trunk/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/SeleniumTodoTest.java 2009-01-27 14:28:12 UTC (rev 9982)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.example.todo.test.selenium;
+
+import java.text.MessageFormat;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * This is a base class for todo example selenium tests
+ * @author Jozef Hartinger
+ *
+ */
+public class SeleniumTodoTest extends SeamSeleniumTest
+{
+
+ public static final String LOGIN_URL = "/login.seam";
+ public static final String TODO_URL = "/todo.seam";
+ public static final String LOGIN_USERNAME = "id=login:username";
+ public static final String LOGIN_SUBMIT = "id=login:submit";
+ public static final String NEW_ITEM_DESCRIPTION = "id=new:description";
+ public static final String NEW_ITEM_CREATE = "id=new:create";
+
+ public static final String NO_ITEMS_FOUND = "id=list:noItems";
+ public static final String FIRST_ITEM_DESCRIPTION = "id=list:items:0:description";
+ public static final String FIRST_ITEM_PRIORITY = "id=list:items:0:priority";
+ public static final String FIRST_ITEM_DONE = "id=list:items:0:done";
+ public static final String NTH_ITEM_DESCRIPTION = "id=list:items:{0}:description";
+ public static final String NTH_ITEM_PRIORITY = "id=list:items:{0}:priority";
+ public static final String NTH_ITEM_DONE = "id=list:items:{0}:done";
+ public static final String ITEMS_COUNT = "//table[@id=\"list:items\"]/tbody/tr";
+ public static final String ITEMS_UPDATE = "list:update";
+
+
+ public static final String DEFAULT_USERNAME = "tester";
+
+ @BeforeClass
+ public void prepareTestFixture() {
+ String[] fixture = {"selenium test for todo example", "buy milk", "clean the bathroom"};
+ setUp();
+ assertTrue("Item list should be empty", browser.isElementPresent(NO_ITEMS_FOUND));
+ for (String item : fixture) {
+ browser.type(NEW_ITEM_DESCRIPTION, item);
+ browser.clickAndWait(NEW_ITEM_CREATE);
+ }
+ assertEquals("Unexpected count of items.", fixture.length, browser.getXpathCount(ITEMS_COUNT));
+ super.tearDown();
+ }
+
+ @BeforeMethod
+ @Override
+ public void setUp() {
+ super.setUp();
+ browser.open(CONTEXT_PATH + LOGIN_URL);
+ browser.type(LOGIN_USERNAME, DEFAULT_USERNAME);
+ browser.clickAndWait(LOGIN_SUBMIT);
+ assertTrue("Navigation failure. Todo page expected.", browser.getLocation().contains(TODO_URL));
+ }
+
+ @Test
+ public void getEntryDoneTest() {
+ String description = browser.getValue(FIRST_ITEM_DESCRIPTION);
+ int itemCount = browser.getXpathCount(ITEMS_COUNT).intValue();
+ browser.clickAndWait(FIRST_ITEM_DONE);
+ assertFalse("Item should disappear from item list when done.", browser.isTextPresent(description));
+ assertEquals("Unexpected count of items.", --itemCount, browser.getXpathCount(ITEMS_COUNT));
+ }
+
+ /**
+ * This test sets high priority to first item and verifies that the item is be moved to the bottom and the priority number is kept.
+ */
+ @Test
+ public void priorityTest() {
+ String description = browser.getValue(FIRST_ITEM_DESCRIPTION);
+ String priority = "10";
+ int itemCount = browser.getXpathCount(ITEMS_COUNT).intValue();
+ int lastItemRowId = itemCount - 1;
+ browser.type(FIRST_ITEM_PRIORITY, priority);
+ browser.clickAndWait(ITEMS_UPDATE);
+ assertEquals("Message should move to the end of item list after priority change.", description, browser.getValue(MessageFormat.format(NTH_ITEM_DESCRIPTION, lastItemRowId)));
+ assertEquals("Unexpected priority.", priority, browser.getValue(MessageFormat.format(NTH_ITEM_PRIORITY, lastItemRowId)));
+ }
+}
Property changes on: trunk/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/SeleniumTodoTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 10 months