Revision: 1160
Author: lstreepy
Date: 2006-05-15 07:14:29 -0700 (Mon, 15 May 2006)
ViewCVS: http://svn.sourceforge.net/spring-rich-c/?rev=1160&view=rev
Log Message:
-----------
Allow refid's to be used in the setRegistryEntries method. The bean names will
be resolved
on demand when the service is requested in a call to getService.
Modified Paths:
--------------
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationServices.java
Modified:
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationServices.java
===================================================================
---
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationServices.java
2006-05-15 11:36:06 UTC (rev 1159)
+++
trunk/spring-richclient/support/src/main/java/org/springframework/richclient/application/support/DefaultApplicationServices.java
2006-05-15 14:14:29 UTC (rev 1160)
@@ -135,6 +135,11 @@
if( service != null ) {
services.put(serviceType, service);
}
+ } else {
+ // Runtime derefence of refid's
+ if( service instanceof String ) {
+ service = getApplicationContext().getBean((String)service,
serviceType);
+ }
}
// If we still don't have an implementation, then it's a bust
@@ -154,7 +159,8 @@
* Add entries to the service registry. This is typically called from a
bean
* definition in the application context. The entryMap parameter must be a
map with
* keys that are either class instances (the serviceType) or the String
name of the
- * class and values that are the implementation to use for that service.
+ * class and values that are the implementation to use for that service or
an idref
+ * to a bean that is the implementation (passed as a String).
*
* @param entryMap Map of entries
*/
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
spring-rich-c-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spring-rich-c-cvs