[seam-commits] Seam SVN: r11883 - modules/envconfig/trunk.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Dec 23 17:40:17 EST 2009


Author: dan.j.allen
Date: 2009-12-23 17:40:16 -0500 (Wed, 23 Dec 2009)
New Revision: 11883

Modified:
   modules/envconfig/trunk/readme.txt
Log:
add notes


Modified: modules/envconfig/trunk/readme.txt
===================================================================
--- modules/envconfig/trunk/readme.txt	2009-12-23 22:33:00 UTC (rev 11882)
+++ modules/envconfig/trunk/readme.txt	2009-12-23 22:40:16 UTC (rev 11883)
@@ -12,10 +12,19 @@
 
 public @EnvironmentBinding class EnvironmentVars
 {
-   @Bind("msg") private final String msg = "Hello World!";
+   @Bind("msg") String msg = "Hello World!";
+
 }
 
 You can then inject the value into a managed bean as follows:
 
 @Resource(lookup = "java:global/msg") String msg;
 
+You can also bind custom objects:
+
+// somewhere in the same deployment must be a producer for @Admin User
+ at Inject @Admin @Bind("adminUser") User user;
+
+Then inject the resource:
+
+ at Resource(lookup = "java:global/adminUser") User user;



More information about the seam-commits mailing list