Weld SVN: r5089 - in examples/trunk/se: numberguess and 1 other directory.
by weld-commits@lists.jboss.org
Author: peteroyle
Date: 2009-11-17 04:40:06 -0500 (Tue, 17 Nov 2009)
New Revision: 5089
Modified:
examples/trunk/se/hello-world/pom.xml
examples/trunk/se/numberguess/pom.xml
Log:
Changed weld-core dependency from provided to default scope
Modified: examples/trunk/se/hello-world/pom.xml
===================================================================
--- examples/trunk/se/hello-world/pom.xml 2009-11-17 07:11:55 UTC (rev 5088)
+++ examples/trunk/se/hello-world/pom.xml 2009-11-17 09:40:06 UTC (rev 5089)
@@ -54,7 +54,6 @@
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
- <scope>provided</scope>
</dependency>
</dependencies>
Modified: examples/trunk/se/numberguess/pom.xml
===================================================================
--- examples/trunk/se/numberguess/pom.xml 2009-11-17 07:11:55 UTC (rev 5088)
+++ examples/trunk/se/numberguess/pom.xml 2009-11-17 09:40:06 UTC (rev 5089)
@@ -20,7 +20,6 @@
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
14 years, 6 months
Weld SVN: r5088 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-11-17 02:11:55 -0500 (Tue, 17 Nov 2009)
New Revision: 5088
Modified:
doc/trunk/reference/en-US/environments.xml
Log:
improve
Modified: doc/trunk/reference/en-US/environments.xml
===================================================================
--- doc/trunk/reference/en-US/environments.xml 2009-11-17 06:23:37 UTC (rev 5087)
+++ doc/trunk/reference/en-US/environments.xml 2009-11-17 07:11:55 UTC (rev 5088)
@@ -250,11 +250,17 @@
</listitem>
<listitem>
<para>
- <literal>@Application</literal> and <literal>@Dependent</literal> scopes
+ <literal>@Application</literal>, <literal>@Dependent</literal> and
+ <literal>@Singleton</literal> scopes
</para>
</listitem>
<listitem>
<para>
+ Decorators
+ </para>
+ </listitem>
+ <listitem>
+ <para>
Stereotypes
</para>
</listitem>
@@ -265,7 +271,7 @@
</listitem>
<listitem>
<para>
- Portable extensions
+ Portable extension support
</para>
</listitem>
</itemizedlist>
@@ -297,12 +303,10 @@
Here's an example of a simple CDI SE application:
</para>
- <programlisting role="JAVA"><![CDATA[@ApplicationScoped
+ <programlisting role="JAVA"><![CDATA[@Singleton
public class HelloWorld
{
- @Inject @Parameters List<String> parameters;
-
- public void printHello(@Observes ContainerInitialized event) {
+ public void printHello(@Observes ContainerInitialized event, @Parameters List<String> parameters) {
System.out.println("Hello " + parameters.get(0));
}
}]]></programlisting>
14 years, 6 months
Weld SVN: r5087 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-11-17 01:23:37 -0500 (Tue, 17 Nov 2009)
New Revision: 5087
Modified:
doc/trunk/reference/en-US/environments.xml
Log:
revise SE section
Modified: doc/trunk/reference/en-US/environments.xml
===================================================================
--- doc/trunk/reference/en-US/environments.xml 2009-11-17 05:56:07 UTC (rev 5086)
+++ doc/trunk/reference/en-US/environments.xml 2009-11-17 06:23:37 UTC (rev 5087)
@@ -239,35 +239,40 @@
<itemizedlist>
<listitem>
<para>
- <literal>POJOs (no EJBs)</literal>
+ Managed beans with <literal>@PostConstruct</literal> and <literal>@PreDestroy</literal>
+ lifecycle callbacks
</para>
</listitem>
<listitem>
<para>
- <literal>Typesafe Dependency Injection</literal>
+ Dependency injection with qualifiers and alternatives
</para>
</listitem>
<listitem>
<para>
- <literal>Application and Dependent Contexts</literal>
+ <literal>@Application</literal> and <literal>@Dependent</literal> scopes
</para>
</listitem>
<listitem>
<para>
- <literal>Qualifiers</literal>
+ Stereotypes
</para>
</listitem>
<listitem>
<para>
- <literal>Stereotypes</literal>
+ Events
</para>
</listitem>
<listitem>
<para>
- <literal>Typesafe Event Model</literal>
+ Portable extensions
</para>
</listitem>
</itemizedlist>
+
+ <para>
+ EJB beans are not supported.
+ </para>
<section id="weld-se">
<title>CDI SE Module</title>
@@ -279,10 +284,16 @@
<literal>ContainerInitialized</literal> event provided by this extension. The command line parameters can be
injected using either of the following:
</para>
- <programlisting role="JAVA"><![CDATA[@Inject @Parameters List<String> params;
-@Inject @Parameters String[] paramsArray; // useful for compatability with existing classes]]></programlisting>
-
+
+ <programlisting role="JAVA"><![CDATA[@Inject @Parameters List<String> params;]]></programlisting>
+
+ <programlisting role="JAVA"><![CDATA[@Inject @Parameters String[] paramsArray;]]></programlisting>
+
<para>
+ The second form is useful for compatibility with existing classes.
+ </para>
+
+ <para>
Here's an example of a simple CDI SE application:
</para>
@@ -297,7 +308,7 @@
}]]></programlisting>
<para>
- CDI SE applications can be bootstrapped by running the StartMain class like so:
+ CDI SE applications can be bootstrapped by running the <literal>StartMain</literal> class like so:
</para>
<programlisting role="JAVA"><![CDATA[java org.jboss.weld.environments.se.StartMain <args>]]></programlisting>
14 years, 6 months
Weld SVN: r5086 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-11-17 00:56:07 -0500 (Tue, 17 Nov 2009)
New Revision: 5086
Modified:
doc/trunk/reference/en-US/weldexamples.xml
Log:
stop begging
Modified: doc/trunk/reference/en-US/weldexamples.xml
===================================================================
--- doc/trunk/reference/en-US/weldexamples.xml 2009-11-17 05:09:58 UTC (rev 5085)
+++ doc/trunk/reference/en-US/weldexamples.xml 2009-11-17 05:56:07 UTC (rev 5086)
@@ -1342,9 +1342,8 @@
</section>
<para>
- That concludes our short tour of the Weld starter examples. For more information on Weld, or to help out with
- development, please visit <ulink
- url="http://www.seamframework.org/Weld/Development">http://www.seamframework.org/Weld/Development</ulink>.
+ That concludes our short tour of the Weld starter examples. For more information on Weld, please visit <ulink
+ url="http://www.seamframework.org/Weld">http://www.seamframework.org/Weld</ulink>.
</para>
<!--
14 years, 6 months
Weld SVN: r5085 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-11-17 00:09:58 -0500 (Tue, 17 Nov 2009)
New Revision: 5085
Modified:
doc/trunk/reference/en-US/weldexamples.xml
Log:
links
Modified: doc/trunk/reference/en-US/weldexamples.xml
===================================================================
--- doc/trunk/reference/en-US/weldexamples.xml 2009-11-17 05:04:36 UTC (rev 5084)
+++ doc/trunk/reference/en-US/weldexamples.xml 2009-11-17 05:09:58 UTC (rev 5085)
@@ -510,8 +510,8 @@
in the <literal>Start</literal> class. So running the example is as simple as right-clicking on that
Start class in <literal>src/test/java</literal> in the <emphasis>Package Explorer</emphasis> and choosing
<emphasis>Run as Java Application</emphasis>. You should see console output related to Jetty starting up;
- then visit able <literal>http://localhost:9090</literal> to view the app. To debug choose <emphasis>Debug
- as Java Application</emphasis> instead.
+ then visit able <ulink url="http://localhost:9090">http://localhost:9090</ulink> to view the app. To debug
+ choose <emphasis>Debug as Java Application</emphasis> instead.
</para>
</section>
@@ -532,7 +532,7 @@
<para>
to deploy the example to Tomcat. You can then access application at
- <literal>http://localhost:9090/weld-numberguess-wicket</literal>.
+ <ulink url="http://localhost:8080/weld-numberguess-wicket">http://localhost:8080/weld-numberguess-wicket</ulink>.
</para>
<para>
14 years, 6 months
Weld SVN: r5084 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-11-17 00:04:36 -0500 (Tue, 17 Nov 2009)
New Revision: 5084
Modified:
doc/trunk/reference/en-US/scopescontexts.xml
doc/trunk/reference/en-US/weldexamples.xml
Log:
fix syntax hiliting
Modified: doc/trunk/reference/en-US/scopescontexts.xml
===================================================================
--- doc/trunk/reference/en-US/scopescontexts.xml 2009-11-17 04:41:43 UTC (rev 5083)
+++ doc/trunk/reference/en-US/scopescontexts.xml 2009-11-17 05:04:36 UTC (rev 5084)
@@ -257,13 +257,13 @@
Therefore, the following link propagates the conversation:
</para>
- <programlisting role="HTML"><![CDATA[<a href="/addProduct.jsp?cid=#{conversation.id}">Add Product</a>]]></programlisting>
+ <programlisting role="XML"><![CDATA[<a href="/addProduct.jsp?cid=#{conversation.id}">Add Product</a>]]></programlisting>
<para>
It's probably better to use one of the link components in JSF 2:
</para>
- <programlisting role="HTML"><![CDATA[<h:link outcome="/addProduct.xhtml value="Add Product">
+ <programlisting role="XML"><![CDATA[<h:link outcome="/addProduct.xhtml value="Add Product">
<f:param name="cid" value="#{conversation.id}"/>
</h:link>]]></programlisting>
Modified: doc/trunk/reference/en-US/weldexamples.xml
===================================================================
--- doc/trunk/reference/en-US/weldexamples.xml 2009-11-17 04:41:43 UTC (rev 5083)
+++ doc/trunk/reference/en-US/weldexamples.xml 2009-11-17 05:04:36 UTC (rev 5084)
@@ -131,7 +131,7 @@
<area id="validator" coords="29" />
<area id="submit" coords="30" />
</areaspec>
- <programlisting role="HTML"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ <programlisting role="XML"><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
14 years, 6 months
Weld SVN: r5083 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-11-16 23:41:43 -0500 (Mon, 16 Nov 2009)
New Revision: 5083
Modified:
doc/trunk/reference/en-US/gettingstarted.xml
Log:
ws
Modified: doc/trunk/reference/en-US/gettingstarted.xml
===================================================================
--- doc/trunk/reference/en-US/gettingstarted.xml 2009-11-17 04:33:19 UTC (rev 5082)
+++ doc/trunk/reference/en-US/gettingstarted.xml 2009-11-17 04:41:43 UTC (rev 5083)
@@ -101,7 +101,7 @@
<para>
In order for the build scripts to know where to deploy the example, you have to tell them where to find your
- JBoss AS installation (i.e., <literal>JBOSS_HOME</literal>). Create a new file named<literal>local.build.properties</literal>
+ JBoss AS installation (i.e., <literal>JBOSS_HOME</literal>). Create a new file named <literal>local.build.properties</literal>
in the examples directory of the Weld distribution and assign the path of your JBoss AS installation to the
property key <literal>jboss.home</literal>, as follows:
</para>
14 years, 6 months
Weld SVN: r5082 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-11-16 23:33:19 -0500 (Mon, 16 Nov 2009)
New Revision: 5082
Modified:
doc/trunk/reference/en-US/dependencies.xml
doc/trunk/reference/en-US/ee.xml
doc/trunk/reference/en-US/gettingstarted.xml
doc/trunk/reference/en-US/injection.xml
doc/trunk/reference/en-US/next.xml
doc/trunk/reference/en-US/part1.xml
doc/trunk/reference/en-US/weldexamples.xml
Log:
fix broken links
Modified: doc/trunk/reference/en-US/dependencies.xml
===================================================================
--- doc/trunk/reference/en-US/dependencies.xml 2009-11-17 00:24:06 UTC (rev 5081)
+++ doc/trunk/reference/en-US/dependencies.xml 2009-11-17 04:33:19 UTC (rev 5082)
@@ -6,7 +6,7 @@
<para>
This section lists compile-time and runtime dependencies for Weld. This list is currently maintained in the <ulink
- src="https://jira.jboss.org/jira/browse/WELD-222">WELD-222</ulink> issue report as well as here in this appendix.
+ url="https://jira.jboss.org/jira/browse/WELD-222">WELD-222</ulink> issue report as well as here in this appendix.
</para>
<table>
@@ -128,7 +128,7 @@
<para>compile</para>
</entry>
<entry>
- <para><ulink src="http://opensource.atlassian.com/projects/hibernate/browse/BVAL-193">BVAL-193</ulink></para>
+ <para><ulink url="http://opensource.atlassian.com/projects/hibernate/browse/BVAL-193">BVAL-193</ulink></para>
</entry>
</row>
Modified: doc/trunk/reference/en-US/ee.xml
===================================================================
--- doc/trunk/reference/en-US/ee.xml 2009-11-17 00:24:06 UTC (rev 5081)
+++ doc/trunk/reference/en-US/ee.xml 2009-11-17 04:33:19 UTC (rev 5082)
@@ -30,7 +30,7 @@
</listitem>
<listitem>
<para>
- the default <ulink src="http://jcp.org/en/jsr/detail?id=303">Bean Validation</ulink>
+ the default <ulink url="http://jcp.org/en/jsr/detail?id=303">Bean Validation</ulink>
<literal>ValidationFactory</literal>, and
</para>
</listitem>
Modified: doc/trunk/reference/en-US/gettingstarted.xml
===================================================================
--- doc/trunk/reference/en-US/gettingstarted.xml 2009-11-17 00:24:06 UTC (rev 5081)
+++ doc/trunk/reference/en-US/gettingstarted.xml 2009-11-17 04:33:19 UTC (rev 5082)
@@ -81,9 +81,9 @@
<title>Deploying to JBoss AS</title>
<para>
- To deploy the examples to JBoss AS, you'll need <ulink src="http://jboss.org/jbossas/">JBoss AS
+ To deploy the examples to JBoss AS, you'll need <ulink url="http://jboss.org/jbossas/">JBoss AS
5.2.0.Beta1</ulink> or above. If a release of the JBoss AS 5.2 line isn't yet available, you can download a
- <ulink src="http://hudson.jboss.org/hudson/view/JBoss%20AS/job/JBoss-AS-5.x-sun16/">nightly snapshot</ulink>.
+ <ulink url="http://hudson.jboss.org/hudson/view/JBoss%20AS/job/JBoss-AS-5.x-sun16/">nightly snapshot</ulink>.
The reason JBoss AS 5.2.0.Beta1 or above is required is because it's the first release that has both CDI and
Bean Validation support built-in, making it close enough to Java EE 6 to run the examples. The good news is
that there are no additional modifications you have to make to the server. It's ready to go!
@@ -141,7 +141,7 @@
<note>
<para>
If you are using Eclipse, you should seriously consider installing the <ulink
- src="http://www.jboss.org/tools">JBoss Tools</ulink> add-ons, which include a wide variety of tooling for
+ url="http://www.jboss.org/tools">JBoss Tools</ulink> add-ons, which include a wide variety of tooling for
JSR-299 and Java EE development, as well as an enhanced JBoss AS server view.
</para>
</note>
@@ -149,7 +149,7 @@
<para>
Wait a few seconds for the application to deploy (or the application server to start) and see if you can
determine the most efficient approach to pinpoint the random number at the local URL <ulink
- src="http://localhost:8080/weld-numberguess">http://localhost:8080/weld-numberguess</ulink>.
+ url="http://localhost:8080/weld-numberguess">http://localhost:8080/weld-numberguess</ulink>.
</para>
<tip>
@@ -204,7 +204,7 @@
<para>
Again, wait a few seconds for the application to deploy (if you're really bored, read the log messages), and
- visit <ulink src="http://localhost:8080/weld-translator">http://localhost:8080/weld-translator</ulink> to begin
+ visit <ulink url="http://localhost:8080/weld-translator">http://localhost:8080/weld-translator</ulink> to begin
pseudo-translating.
</para>
@@ -225,9 +225,9 @@
<para>
To deploy the examples to GlassFish, you'll need the final <ulink
- src="https://glassfish.dev.java.net/">GlassFish V3</ulink> release (the preview release won't do). If the final
+ url="https://glassfish.dev.java.net/">GlassFish V3</ulink> release (the preview release won't do). If the final
release isn't yet available, you can download a <ulink
- src="http://download.java.net/glassfish/v3/promoted/">promoted build</ulink> in the meantime. Select the b69
+ url="http://download.java.net/glassfish/v3/promoted/">promoted build</ulink> in the meantime. Select the b69
preview release or above that ends in either <literal>-unix.sh</literal> or <literal>-windows.exe</literal>
depending on your platform. After the download is complete, execute the installer. On Linux/Unix, you'll need
to first make the script executable.
@@ -260,7 +260,7 @@
</para>
<para>
- You deploy applications to GlassFish using the <ulink src="http://localhost:4848">GlassFish Admin
+ You deploy applications to GlassFish using the <ulink url="http://localhost:4848">GlassFish Admin
Console</ulink>. To get the Admin Console running, you need to start a GlassFish domain, in our case
<literal>domain1</literal>. Switch to the <literal>bin</literal> folder in the directory where you
installed GlassFish and execute the following command:
@@ -270,13 +270,13 @@
<para>
After a few seconds you can visit the Admin Console in the browser at the URL <ulink
- src="http://localhost:4848">http://localhost:4848</ulink>. In the tree on the left-hand
+ url="http://localhost:4848">http://localhost:4848</ulink>. In the tree on the left-hand
side of the page, click on "Applications", then click on the "Deploy..." button under
the heading "Applications" and select the deployable artifact for either of the two examples.
The deployer should recognize that you have selected a Java EE artifact and allow you to
start it. You can see the examples running at either <ulink
- src="http://localhost:7070/weld-numberguess">http://localhost:7070/weld-numberguess</ulink> or <ulink
- src="http://localhost:7070/weld-translator">http://localhost:7070/weld-translator</ulink>,
+ url="http://localhost:7070/weld-numberguess">http://localhost:7070/weld-numberguess</ulink> or <ulink
+ url="http://localhost:7070/weld-translator">http://localhost:7070/weld-translator</ulink>,
depending on which example you deployed.
</para>
@@ -303,7 +303,7 @@
<para>
Let's give the Weld servlet extension a spin on Apache Tomcat. First, you'll need to download Tomcat 6.0.18 or
- later from <ulink src="http://tomcat.apache.org/download-60.cgi">tomcat.apache.org</ulink> and extract it.
+ later from <ulink url="http://tomcat.apache.org/download-60.cgi">tomcat.apache.org</ulink> and extract it.
</para>
<programlisting><![CDATA[$> unzip apache-tomcat-6.0.18.zip]]></programlisting>
@@ -389,7 +389,7 @@
<para>
Wait a few seconds for the application to deploy (or the application server to start) and see if you can figure
out the most efficient approach to pinpoint the random number at the local URL
- <ulink src="http://localhost:8080/weld-numberguess">http://localhost:8080/weld-numberguess</ulink>!
+ <ulink url="http://localhost:8080/weld-numberguess">http://localhost:8080/weld-numberguess</ulink>!
</para>
</section>
@@ -498,7 +498,7 @@
<para>
The log output of Jetty will be shown in the console. Once Jetty reports that the application has deployed, you
can access it at the following local URL: <ulink
- src="http://localhost:9090/weld-numberguess">http://localhost:9090/weld-numberguess</ulink>. The port is
+ url="http://localhost:9090/weld-numberguess">http://localhost:9090/weld-numberguess</ulink>. The port is
defined in the Maven Jetty plugin configuration within the <literal>jetty</literal> profile.
</para>
@@ -540,7 +540,7 @@
Now, you are ready to run the server in Eclipse. Import the project into your Eclipse workspace using "Import
Existing Project into Workspace. Then, find the start class in <literal>src/jetty/java</literal> and run its
main method as a Java Application. Jetty will launch. You can view the application at the following local URL: <ulink
- src="http://localhost:8080">http://localhost:8080</ulink>. Pay particular attention to the port in the URL and
+ url="http://localhost:8080">http://localhost:8080</ulink>. Pay particular attention to the port in the URL and
the lack of a trailing context path.
</para>
Modified: doc/trunk/reference/en-US/injection.xml
===================================================================
--- doc/trunk/reference/en-US/injection.xml 2009-11-17 00:24:06 UTC (rev 5081)
+++ doc/trunk/reference/en-US/injection.xml 2009-11-17 04:33:19 UTC (rev 5082)
@@ -447,7 +447,7 @@
<para>
See <ulink
- src="http://sfwk.org/Documentation/HowDoAResolveAnAmbiguousResolutionException...">this
+ url="http://sfwk.org/Documentation/HowDoAResolveAnAmbiguousResolutionException...">this
FAQ</ulink> for step-by-step instructions for how to resolve an ambigous resolution exception between a raw
bean type and a producer method that returns the same bean type.
</para>
Modified: doc/trunk/reference/en-US/next.xml
===================================================================
--- doc/trunk/reference/en-US/next.xml 2009-11-17 00:24:06 UTC (rev 5081)
+++ doc/trunk/reference/en-US/next.xml 2009-11-17 04:33:19 UTC (rev 5082)
@@ -8,20 +8,20 @@
Regardless, the CDI specification remains the authority for information on CDI. The spec is less than 100 pages and
is quite readable (don't worry, it's not like your Blu-ray player manual). Of course, it covers many details we've
skipped over here. The spec is available on the
- <ulink src="http://jcp.org/en/jsr/detail?id=299">JSR-299 page</ulink> at the JCP website.
+ <ulink url="http://jcp.org/en/jsr/detail?id=299">JSR-299 page</ulink> at the JCP website.
</para>
<para>
- The CDI reference implementation, Weld, is being developed at the <ulink src="http://seamframework.org/Weld">Seam
+ The CDI reference implementation, Weld, is being developed at the <ulink url="http://seamframework.org/Weld">Seam
project</ulink>. The RI development team and the CDI spec lead blog at <ulink
- src="http://in.relation.to">in.relation.to</ulink>. This guide was originally based on a series of blog entries
+ url="http://in.relation.to">in.relation.to</ulink>. This guide was originally based on a series of blog entries
published there while the specification was being developed. It's probably the best source of information about
the future of CDI, Weld and Seam.
</para>
<para>
- We encourage you to follow the <ulink src="https://lists.jboss.org/mailman/listinfo/weld-dev">weld-dev</ulink>
- mailing list and to get involved in <ulink src="http://seamframework.org/Weld/Development">development</ulink>. If
+ We encourage you to follow the <ulink url="https://lists.jboss.org/mailman/listinfo/weld-dev">weld-dev</ulink>
+ mailing list and to get involved in <ulink url="http://seamframework.org/Weld/Development">development</ulink>. If
you are reading this guide, you likely have something to offer.
</para>
@@ -34,7 +34,7 @@
<listitem>
<para>
Checkout source from <ulink
- src="http://anonsvn.jboss.org/repos/weld/doc/trunk/reference">http://anonsvn.jboss.org/repos/weld/doc/trunk/reference</ulink>
+ url="http://anonsvn.jboss.org/repos/weld/doc/trunk/reference">http://anonsvn.jboss.org/repos/weld/doc/trunk/reference</ulink>
using SVN
</para>
<programlisting><![CDATA[$> svn co http://anonsvn.jboss.org/repos/weld/doc/trunk/reference weld-reference]]></programlisting>
Modified: doc/trunk/reference/en-US/part1.xml
===================================================================
--- doc/trunk/reference/en-US/part1.xml 2009-11-17 00:24:06 UTC (rev 5081)
+++ doc/trunk/reference/en-US/part1.xml 2009-11-17 04:33:19 UTC (rev 5082)
@@ -12,7 +12,7 @@
<!-- NOTE synchronize this intro with the intro on http://seamframework.org/Weld -->
<para>
- The <ulink src="http://jcp.org/en/jsr/detail?id=299">JSR-299</ulink> specification (CDI) defines a set of
+ The <ulink url="http://jcp.org/en/jsr/detail?id=299">JSR-299</ulink> specification (CDI) defines a set of
complementary services that help improve the structure of application code. CDI layers an enhanced lifecycle
and interaction model over existing Java component types, including managed beans and Enterprise Java Beans.
The CDI services provide:
@@ -195,7 +195,7 @@
</para>
<para>
- Finally, CDI is a <ulink src="http://jcp.org">Java Community Process</ulink> (JCP) standard. Java EE 6 requires
+ Finally, CDI is a <ulink url="http://jcp.org">Java Community Process</ulink> (JCP) standard. Java EE 6 requires
that all compliant application servers provide support for JSR-299 (even in the web profile).
</para>
Modified: doc/trunk/reference/en-US/weldexamples.xml
===================================================================
--- doc/trunk/reference/en-US/weldexamples.xml 2009-11-17 00:24:06 UTC (rev 5081)
+++ doc/trunk/reference/en-US/weldexamples.xml 2009-11-17 04:33:19 UTC (rev 5082)
@@ -439,7 +439,7 @@
<para>
To use the Wicket example in Eclipse, you have one of two choices. You can either use a Maven plugin to
generate a regular Eclipse Web project, or you can open the example natively using the <ulink
- src="http://m2eclipse.sonatype.org/">m2eclipse plugin</ulink>. Since the Weld source code relies so
+ url="http://m2eclipse.sonatype.org/">m2eclipse plugin</ulink>. Since the Weld source code relies so
heavily on Maven, we encourage you to bite the bullet and adopt the m2eclipse plugin. Both approaches are
described here for your convenience..
</para>
14 years, 6 months
Weld SVN: r5081 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-11-16 19:24:06 -0500 (Mon, 16 Nov 2009)
New Revision: 5081
Modified:
doc/trunk/reference/en-US/extend.xml
Log:
useful!
Modified: doc/trunk/reference/en-US/extend.xml
===================================================================
--- doc/trunk/reference/en-US/extend.xml 2009-11-16 23:49:37 UTC (rev 5080)
+++ doc/trunk/reference/en-US/extend.xml 2009-11-17 00:24:06 UTC (rev 5081)
@@ -225,6 +225,52 @@
<para>Let's study some of the interfaces exposed by the <literal>BeanManager</literal>.</para>
</section>
+
+ <section>
+ <title>The <literal>InjectionTarget</literal> interface</title>
+
+ <para>
+ The first thing that a framework developer is going to look for in the portable extension SPI is a way to
+ inject CDI beans into objects which are not under the control of CDI. The <literal>InjectionTarget</literal>
+ interface makes this very easy.
+ </para>
+
+ <tip>
+ <para>
+ We recommend that frameworks let CDI take over the job of actually instantiating the framework-controlled
+ objects. That way, the framework-controlled objects can take advantage of constructor injection. However,
+ if the framework requires use of a constructor with a special signature, the framework will need to
+ instatiate the object itself, and so only method and field injection will be supported.
+ </para>
+ </tip>
+
+ <programlisting role="JAVA"><![CDATA[//get the BeanManager from JNDI
+BeanManager beanManager = (BeanManager) new InitialContext().lookup("java:comp/BeanManager");
+
+//CDI uses an AnnotatedType object to read the annotations of a class
+AnnotatedType<SomeFrameworkComponent> type = beanManager.createAnnotatedType(SomeFrameworkComponent.class);
+
+//The extension uses an InjectionTarget to delegate instantiation, dependency injection
+//and lifecycle callbacks to the CDI container
+InjectionTarget<SomeFrameworkComponent> it = beanManager.createInjectionTarget(type);
+
+//each instance needs its own CDI CreationalContext
+CreationalContext instanceContext = beanManager.createCreationalContext(null);
+
+//instantiate the framework component and inject its dependencies
+SomeFrameworkComponent instance = it.produce(instanceContext); //call the constructor
+it.inject(instance, ctx); //call initializer methods and perform field injection
+it.postConstruct(instance); //call the @PostConstruct method
+
+...
+
+//destroy the framework component instance and clean up dependent objects
+it.preDestroy(instance); //call the @PreDestroy method
+it.dispose(instance); //it is now safe to discard the instance
+ctx.release(); //clean up dependent objects
+]]></programlisting>
+
+ </section>
<section>
<title>The <literal>Bean</literal> interface</title>
@@ -237,12 +283,6 @@
</para>
<para>
- There's an easy way to find out what beans exist in the application:
- </para>
-
- <programlisting role="JAVA"><![CDATA[Set<Bean<?>> allBeans = beanManager.getBeans(Obect.class, new AnnotationLiteral<Any>() {});]]></programlisting>
-
- <para>
The <literal>Bean</literal> interface exposes all the interesting things we dicussed in
<xref linkend="bean-anatomy"/>.
</para>
@@ -260,6 +300,12 @@
}]]></programlisting>
<para>
+ There's an easy way to find out what beans exist in the application:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[Set<Bean<?>> allBeans = beanManager.getBeans(Obect.class, new AnnotationLiteral<Any>() {});]]></programlisting>
+
+ <para>
The <literal>Bean</literal> interface makes it possible for a portable extension to provide
support for new kinds of beans, beyond those defined by the CDI specification. For example,
we could use the <literal>Bean</literal> interface to allow objects managed by another framework
14 years, 6 months
Weld SVN: r5080 - doc/trunk/reference/en-US.
by weld-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-11-16 18:49:37 -0500 (Mon, 16 Nov 2009)
New Revision: 5080
Modified:
doc/trunk/reference/en-US/extend.xml
Log:
fix wrapped line
Modified: doc/trunk/reference/en-US/extend.xml
===================================================================
--- doc/trunk/reference/en-US/extend.xml 2009-11-16 23:47:30 UTC (rev 5079)
+++ doc/trunk/reference/en-US/extend.xml 2009-11-16 23:49:37 UTC (rev 5080)
@@ -354,7 +354,8 @@
}
@Override
- public void destroy(SecurityManager instance, CreationalContext<SecurityManager> ctx) {
+ public void destroy(SecurityManager instance,
+ CreationalContext<SecurityManager> ctx) {
it.preDestroy(instance);
it.dispose(instance);
ctx.release();
14 years, 6 months