Seam SVN: r10168 - trunk/seam-gen/build-scripts.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-03-16 00:56:43 -0400 (Mon, 16 Mar 2009)
New Revision: 10168
Modified:
trunk/seam-gen/build-scripts/build-war.xml
Log:
fix typo
Modified: trunk/seam-gen/build-scripts/build-war.xml
===================================================================
--- trunk/seam-gen/build-scripts/build-war.xml 2009-03-16 03:38:48 UTC (rev 10167)
+++ trunk/seam-gen/build-scripts/build-war.xml 2009-03-16 04:56:43 UTC (rev 10168)
@@ -263,7 +263,7 @@
<copy todir="${war.dir}/WEB-INF/classes">
<fileset dir="${basedir}/resources">
<include name="messages*.properties"/>
- <include name="*.skin.properties" if="ricfaces.present"/>
+ <include name="*.skin.properties" if="richfaces.present"/>
<include name="*_theme.properties"/>
</fileset>
</copy>
15 years, 9 months
Seam SVN: r10167 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-03-15 23:38:48 -0400 (Sun, 15 Mar 2009)
New Revision: 10167
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
Log:
update explaination of EJB references to reflect that all versions of JBoss handle this automatically
Modified: trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-03-15 22:33:05 UTC (rev 10166)
+++ trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-03-16 03:38:48 UTC (rev 10167)
@@ -494,13 +494,13 @@
of finding it in JNDI according to the JNDI pattern (or <literal>@JndiName</literal> annotation).
</para>
- <para> So what about the rest of the application servers? Well, according to the Java EE spec, which most
+ <para>So what about the rest of the application servers? Well, according to the Java EE spec, which most
vendors try to adhere to religiously, you have to declare an EJB reference for your EJB in order for it
to be assigned a JNDI name. That requires some XML. It also means that it is up to you to establish a
JNDI naming convention so that you can leverage the Seam JNDI pattern. You might find the JBoss
convention a good one to follow.</para>
- <para> There are two places you have to define the EJB reference when using Seam on non-JBoss application
+ <para>There are two places you have to define the EJB reference when using Seam on non-JBoss application
servers. If you are going to be looking up the Seam EJB component through JSF (in a JSF view or as a JSF
action listener) or a Seam JavaBean component, then you must declare the EJB reference in web.xml. Here
is the EJB reference for the example component just shown: </para>
@@ -512,18 +512,24 @@
</ejb-local-ref>
]]></programlisting>
- <para> This reference will cover most uses of the component in a Seam application. However, if you want to
+ <para>This reference will cover most uses of the component in a Seam application. However, if you want to
be able to inject a Seam EJB component into another Seam EJB component using <literal>@In</literal>, you
need to define this EJB reference in another location. This time, it must be defined in ejb-jar.xml, and
it's a bit tricker. </para>
- <para> Within the context of an EJB method call, you have to deal with a somewhat sheltered JNDI context.
+ <para>Within the context of an EJB method call, you have to deal with a somewhat sheltered JNDI context.
When Seam attempts to find another Seam EJB component to satisfy an injection point defined using
- <literal>@In</literal>, it isn't going to be successful looking up the component in JNDI. You cannot
- simply resolve JNDI names as you please. You have to define those references explicitly. Unlike with the
- web context, however, you cannot declare EJB references globally for all EJB components. Instead, you
- have to specify the JNDI resources for a given EJB component one-by-one (this only applies to
- non-JBoss application servers of course!).</para>
+ <literal>@In</literal>, whether or not it finds it depends on whether an EJB reference exists in
+ JNDI. Strictly speaking, you cannot simply resolve JNDI names as you please. You have to define
+ the references explicitly. Fortunately, JBoss recognized how aggrevating this would be for the
+ developer and all versions of JBoss automatically register EJBs so they are always available in
+ JNDI, both to the web container and the EJB container. So if you are using JBoss, you can skip the next
+ few paragraphs. However, if you are deploying to GlassFish, pay close attention.</para>
+
+ <para>For application servers that stubbornly adhere to the EJB specification, EJB references must always be
+ defined explicitly. But unlike with the web context, where a single resource reference covers all
+ uses of the EJB from the web environment, you cannot declare EJB references globally in the EJB container.
+ Instead, you have to specify the JNDI resources for a given EJB component one-by-one.</para>
<para> Let's assume that we have an EJB named RegisterAction (the name is resolved using the three steps
mentioned previously). That EJB has the following Seam injection:</para>
15 years, 9 months
Seam SVN: r10166 - trunk/doc/Seam_Reference_Guide/en-US.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-03-15 18:33:05 -0400 (Sun, 15 Mar 2009)
New Revision: 10166
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
Log:
Fix nonsense in docs!
Modified: trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-03-14 07:34:37 UTC (rev 10165)
+++ trunk/doc/Seam_Reference_Guide/en-US/Configuration.xml 2009-03-15 22:33:05 UTC (rev 10166)
@@ -522,8 +522,8 @@
<literal>@In</literal>, it isn't going to be successful looking up the component in JNDI. You cannot
simply resolve JNDI names as you please. You have to define those references explicitly. Unlike with the
web context, however, you cannot declare EJB references globally for all EJB components. Instead, you
- have to specify the JNDI resources for a given EJB component one-by-one (this applies to JBoss AS 5 in
- addition to non-JBoss application servers).</para>
+ have to specify the JNDI resources for a given EJB component one-by-one (this only applies to
+ non-JBoss application servers of course!).</para>
<para> Let's assume that we have an EJB named RegisterAction (the name is resolved using the three steps
mentioned previously). That EJB has the following Seam injection:</para>
15 years, 9 months
Seam SVN: r10165 - in trunk/seam-gen: ide-project-files/idea and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-03-14 03:34:37 -0400 (Sat, 14 Mar 2009)
New Revision: 10165
Modified:
trunk/seam-gen/build.xml
trunk/seam-gen/ide-project-files/idea/project.ipr
Log:
Set the encoded database password and unique connection ID in IDEA project file
Modified: trunk/seam-gen/build.xml
===================================================================
--- trunk/seam-gen/build.xml 2009-03-14 07:33:49 UTC (rev 10164)
+++ trunk/seam-gen/build.xml 2009-03-14 07:34:37 UTC (rev 10165)
@@ -24,7 +24,10 @@
</condition>
<property file="${seam-gen.properties}"/>
+ <!-- set property defaults for backwards compatibility -->
+ <property name="jboss.domain" value="default"/>
<property name="glassfish.home" value=""/>
+
<import file="${seam.dir}/build/common.build.xml"/>
<target name="init">
@@ -61,6 +64,14 @@
<taskdef name="pathFixer"
classname="org.jboss.seam.tool.FixPathTask"
classpathref="seam-gen.lib.path"/>
+
+ <taskdef name="encodePassword"
+ classname="org.jboss.seam.tool.EncodePasswordTask"
+ classpathref="seam-gen.lib.path"/>
+
+ <taskdef name="randomUUID"
+ classname="org.jboss.seam.tool.RandomUUIDTask"
+ classpathref="seam-gen.lib.path"/>
</target>
<target name="init-properties" depends="init">
@@ -69,6 +80,8 @@
<packageDirectory property="model.dir" package="main/${model.package}"/>
<packageDirectory property="test.dir" package="test/${test.package}"/>
<pathFilename property="driver.file" path="${driver.jar}"/>
+ <encodePassword property="hibernate.connection.password.encoded" password="${hibernate.connection.password}"/>
+ <randomUUID property="hibernate.connection.uuid"/>
<!-- we don't want create because that will destroy their database on the next deploy -->
<condition property="hibernate.hbm2ddl.auto" value="update">
@@ -141,6 +154,8 @@
<filter token="dataSourceClass" value="${hibernate.connection.dataSource_class}"/>
<filter token="username" value="${hibernate.connection.username}"/>
<filter token="password" value="${hibernate.connection.password}"/>
+ <filter token="encodedPassword" value="${hibernate.connection.password.encoded}"/>
+ <filter token="connectionUUID" value="${hibernate.connection.uuid}"/>
<filter token="catalogProperty" value="${catalog.property}"/>
<filter token="schemaProperty" value="${schema.property}"/>
<filter token="hibernate.dialect" value="${hibernate.dialect}"/>
Modified: trunk/seam-gen/ide-project-files/idea/project.ipr
===================================================================
--- trunk/seam-gen/ide-project-files/idea/project.ipr 2009-03-14 07:33:49 UTC (rev 10164)
+++ trunk/seam-gen/ide-project-files/idea/project.ipr 2009-03-14 07:34:37 UTC (rev 10165)
@@ -36,10 +36,10 @@
<option name="DATABASE_URL" value="@jdbcUrl@" />
<option name="DRIVER_PATH" />
<option name="DATBASE_USERNAME" value="@username@" />
- <option name="ENCODED_DATABASE_PASSWORD" value="" />
+ <option name="ENCODED_DATABASE_PASSWORD" value="@encodedPassword@" />
<option name="DEFAULT_SCHEMA_NAME" />
<option name="TABLE_PATTERN" value="" />
- <option name="UUID" value="86c824fb-f41b-4fd1-986c-be634e7b9cfc" />
+ <option name="UUID" value="@connectionUUID@" />
<option name="NAME" value="@projectName@Datasource" />
<libraries>
<library>
15 years, 9 months
Seam SVN: r10164 - trunk/seam-gen/build-scripts.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-03-14 03:33:49 -0400 (Sat, 14 Mar 2009)
New Revision: 10164
Modified:
trunk/seam-gen/build-scripts/glassfish-readme.txt
Log:
add note about how to disable deployment of datasource on GlassFish when using default datasource
Modified: trunk/seam-gen/build-scripts/glassfish-readme.txt
===================================================================
--- trunk/seam-gen/build-scripts/glassfish-readme.txt 2009-03-14 07:33:00 UTC (rev 10163)
+++ trunk/seam-gen/build-scripts/glassfish-readme.txt 2009-03-14 07:33:49 UTC (rev 10164)
@@ -1,9 +1,13 @@
GlassFish deployment works out of the box for WAR projects. To deploy an EAR project, make the following changes:
-1. Uncomment the <ejb-local-ref> entries in resources/WEB-INF/web.xml (include additional entries as necessary)
-2. Strip the contents up to and including the # in the element <persistence-unit-name> in resources/WEB-INF/web.xml
-3. Uncomment the <jar-file> element in resources/META-INF/persistence-dev.xml & resources/META-INF/persistence-prod.xml
+ 1. Uncomment the <ejb-local-ref> entries in resources/WEB-INF/web.xml (include additional entries as necessary)
+ 2. Strip the contents up to and including the # in the element <persistence-unit-name> in resources/WEB-INF/web.xml
+ 3. Uncomment the <jar-file> element in resources/META-INF/persistence-dev.xml & resources/META-INF/persistence-prod.xml
+If you plan to use the default Derby datasource in GlassFish, named jdbc/__default, then uncomment the following property in the build.properties file at the root of the project:
+
+ glassfish.datasource.useDefault=true
+
GlassFish command reference:
gf-start - Starts GlassFish
15 years, 9 months
Seam SVN: r10163 - trunk/src/gen/org/jboss/seam/tool.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-03-14 03:33:00 -0400 (Sat, 14 Mar 2009)
New Revision: 10163
Added:
trunk/src/gen/org/jboss/seam/tool/EncodePasswordTask.java
trunk/src/gen/org/jboss/seam/tool/RandomUUIDTask.java
Log:
Add Ant tasks that are used to create values needed for the IDEA project file
Added: trunk/src/gen/org/jboss/seam/tool/EncodePasswordTask.java
===================================================================
--- trunk/src/gen/org/jboss/seam/tool/EncodePasswordTask.java (rev 0)
+++ trunk/src/gen/org/jboss/seam/tool/EncodePasswordTask.java 2009-03-14 07:33:00 UTC (rev 10163)
@@ -0,0 +1,49 @@
+package org.jboss.seam.tool;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+/**
+ * Encode the password provided using the same algorithm that IntelliJ IDEA uses
+ * to encode a JDBC database password before storing it in the project file,
+ * then assign it to the property.
+ */
+public class EncodePasswordTask extends Task
+{
+ private String property;
+ private String password;
+
+ @Override
+ public void execute() throws BuildException
+ {
+ getProject().setProperty(property, encode(password));
+ }
+
+ protected String encode(String value)
+ {
+ if (value == null)
+ {
+ return "";
+ }
+
+ String result = "";
+ for (int i = 0; i < value.length(); i++)
+ {
+ int c = value.charAt(i);
+ c ^= 0xdfaa;
+ result += Integer.toHexString(c);
+ }
+
+ return result;
+ }
+
+ public void setProperty(String property)
+ {
+ this.property = property;
+ }
+
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+}
Added: trunk/src/gen/org/jboss/seam/tool/RandomUUIDTask.java
===================================================================
--- trunk/src/gen/org/jboss/seam/tool/RandomUUIDTask.java (rev 0)
+++ trunk/src/gen/org/jboss/seam/tool/RandomUUIDTask.java 2009-03-14 07:33:00 UTC (rev 10163)
@@ -0,0 +1,31 @@
+package org.jboss.seam.tool;
+
+import java.util.UUID;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+/**
+ * Creates a random UUID using {@link java.util.UUID#randomUUID()} and
+ * assigns it to the property.
+ */
+public class RandomUUIDTask extends Task
+{
+ private String property;
+
+ @Override
+ public void execute() throws BuildException
+ {
+ getProject().setProperty(property, generateRandomUUID());
+ }
+
+ protected String generateRandomUUID()
+ {
+ return UUID.randomUUID().toString();
+ }
+
+ public void setProperty(String property)
+ {
+ this.property = property;
+ }
+}
15 years, 9 months
Seam SVN: r10162 - in trunk/seam-gen: ide-project-files/idea and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-03-14 02:51:33 -0400 (Sat, 14 Mar 2009)
New Revision: 10162
Modified:
trunk/seam-gen/icefaces/ide-project-files/idea/module.iml
trunk/seam-gen/ide-project-files/idea/module.iml
Log:
JBSEAM-3907
Modified: trunk/seam-gen/icefaces/ide-project-files/idea/module.iml
===================================================================
--- trunk/seam-gen/icefaces/ide-project-files/idea/module.iml 2009-03-14 05:43:39 UTC (rev 10161)
+++ trunk/seam-gen/icefaces/ide-project-files/idea/module.iml 2009-03-14 06:51:33 UTC (rev 10162)
@@ -58,6 +58,8 @@
<sourceFolder url="file://$MODULE_DIR$/src/hot" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/dist" />
+ <excludeFolder url="file://$MODULE_DIR$/exploded-archives" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />
Modified: trunk/seam-gen/ide-project-files/idea/module.iml
===================================================================
--- trunk/seam-gen/ide-project-files/idea/module.iml 2009-03-14 05:43:39 UTC (rev 10161)
+++ trunk/seam-gen/ide-project-files/idea/module.iml 2009-03-14 06:51:33 UTC (rev 10162)
@@ -53,6 +53,8 @@
<sourceFolder url="file://$MODULE_DIR$/src/hot" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/dist" />
+ <excludeFolder url="file://$MODULE_DIR$/exploded-archives" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />
15 years, 9 months
Seam SVN: r10161 - trunk/seam-gen.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-03-14 01:43:39 -0400 (Sat, 14 Mar 2009)
New Revision: 10161
Modified:
trunk/seam-gen/README
Log:
add note about IDEA
Modified: trunk/seam-gen/README
===================================================================
--- trunk/seam-gen/README 2009-03-14 05:03:08 UTC (rev 10160)
+++ trunk/seam-gen/README 2009-03-14 05:43:39 UTC (rev 10161)
@@ -31,8 +31,8 @@
Create a new Seam project workspace that includes all the
required dependencies, a build script, and two configuration
profiles (dev and prod). Uses the project attributes defined in
- seam-gen/build.properties. Also generates Eclipse and NetBeans
- project files, allowing the project to be easily imported.
+ seam-gen/build.properties. Also generates Eclipse, NetBeans and
+ IDEA project files, allowing the project to be quickly imported.
Example: seam create-project
15 years, 9 months
Seam SVN: r10159 - trunk/seam-gen/view.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-03-14 01:02:36 -0400 (Sat, 14 Mar 2009)
New Revision: 10159
Modified:
trunk/seam-gen/view/home.xhtml
Log:
whitespace
Modified: trunk/seam-gen/view/home.xhtml
===================================================================
--- trunk/seam-gen/view/home.xhtml 2009-03-14 04:45:41 UTC (rev 10158)
+++ trunk/seam-gen/view/home.xhtml 2009-03-14 05:02:36 UTC (rev 10159)
@@ -13,7 +13,7 @@
<h1>Welcome to Seam!</h1>
<rich:panel>
<h:panelGrid columns="2">
- <h:graphicImage value="/img/seamlogo.png" alt="Seam logo"/>
+ <h:graphicImage value="/img/seamlogo.png" alt="Seam logo"/>
<s:div styleClass="info">
<p><strong>Your seam-gen project is deployed!</strong> Here are some of the features this project provides:</p>
<ul class="bullets">
15 years, 9 months