[jboss-cvs] JBossAS SVN: r76814 - in trunk: system/src/main/org/jboss/system/server/profileservice and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Aug 8 05:52:46 EDT 2008
Author: scott.stark at jboss.org
Date: 2008-08-08 05:52:46 -0400 (Fri, 08 Aug 2008)
New Revision: 76814
Modified:
trunk/server/src/etc/conf/default/profile-repository.xml
trunk/server/src/etc/conf/default/profile.xml
trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
Log:
JBAS-5842, move the mainDeployer, profileService lookups to injection.
Modified: trunk/server/src/etc/conf/default/profile-repository.xml
===================================================================
--- trunk/server/src/etc/conf/default/profile-repository.xml 2008-08-08 08:57:43 UTC (rev 76813)
+++ trunk/server/src/etc/conf/default/profile-repository.xml 2008-08-08 09:52:46 UTC (rev 76814)
@@ -37,6 +37,8 @@
<bean name="ProfileServiceBootstrap" class="org.jboss.system.server.profileservice.ProfileServiceBootstrap">
<property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+ <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+ <property name="profileService"><inject bean="ProfileService"/></property>
</bean>
<!-- A filter for excluding files from the scanner -->
Modified: trunk/server/src/etc/conf/default/profile.xml
===================================================================
--- trunk/server/src/etc/conf/default/profile.xml 2008-08-08 08:57:43 UTC (rev 76813)
+++ trunk/server/src/etc/conf/default/profile.xml 2008-08-08 09:52:46 UTC (rev 76814)
@@ -23,6 +23,8 @@
<bean name="ProfileServiceBootstrap" class="org.jboss.system.server.profileservice.ProfileServiceBootstrap">
<property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+ <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+ <property name="profileService"><inject bean="ProfileService"/></property>
</bean>
<!-- A filter for excluding files from the scanner -->
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2008-08-08 08:57:43 UTC (rev 76813)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/ProfileServiceBootstrap.java 2008-08-08 09:52:46 UTC (rev 76814)
@@ -83,6 +83,10 @@
{
return mainDeployer;
}
+ public void setMainDeployer(MainDeployer mainDeployer)
+ {
+ this.mainDeployer = mainDeployer;
+ }
/**
* Return the ProfileService bean.
@@ -93,6 +97,10 @@
{
return profileService;
}
+ public void setProfileService(ProfileService profileService)
+ {
+ this.profileService = profileService;
+ }
/**
* Get the kernel.
@@ -118,17 +126,17 @@
{
shutdown.set(false);
- KernelController controller = kernel.getController();
-
- // Get the beans TODO injection!
- profileService = getBean(controller, "ProfileService", ProfileService.class);
+ if(profileService == null)
+ throw new IllegalStateException("The ProfileService has not been injected");
log.debug("Using ProfileService: " + profileService);
- mainDeployer = getBean(controller, "MainDeployer", MainDeployer.class);
+ if(profileService == null)
+ throw new IllegalStateException("The MainDeployer has not been injected");
log.debug("Using MainDeployer: " + mainDeployer);
// Validate that everything is ok
mainDeployer.checkComplete();
+
// Load the profile beans
try
{
More information about the jboss-cvs-commits
mailing list