You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by da...@apache.org on 2007/03/18 16:36:18 UTC

svn commit: r519629 - /incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/main/java/wicket/spring/injection/annot/SpringComponentInjector.java

Author: dashorst
Date: Sun Mar 18 08:36:17 2007
New Revision: 519629

URL: http://svn.apache.org/viewvc?view=rev&rev=519629
Log:
Removed portlet spring injector

Modified:
    incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/main/java/wicket/spring/injection/annot/SpringComponentInjector.java

Modified: incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/main/java/wicket/spring/injection/annot/SpringComponentInjector.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/main/java/wicket/spring/injection/annot/SpringComponentInjector.java?view=diff&rev=519629&r1=519628&r2=519629
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/main/java/wicket/spring/injection/annot/SpringComponentInjector.java (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.5/wicket-spring-annot/src/main/java/wicket/spring/injection/annot/SpringComponentInjector.java Sun Mar 18 08:36:17 2007
@@ -37,7 +37,6 @@
 import wicket.injection.web.InjectorHolder;
 import wicket.model.Model;
 import wicket.protocol.http.WebApplication;
-import wicket.protocol.http.portlet.PortletApplication;
 import wicket.spring.ISpringContextLocator;
 
 /**
@@ -105,35 +104,6 @@
 
 		// store context in application's metadata ...
 		webapp.setMetaData(CONTEXT_KEY, new ApplicationContextHolder(ctx));
-
-		// ... and create and register the annotation aware injector
-		InjectorHolder
-				.setInjector(new AnnotSpringInjector(new ContextLocator()));
-	}
-
-	/**
-	 * Constructor for portlet applications
-	 * 
-	 * @param portletapp
-	 */
-	public SpringComponentInjector(PortletApplication portletapp) {
-		GenericApplicationContext ctx = new GenericApplicationContext();
-
-		// locate spring's application context ...
-		String configLocation = portletapp.getWicketPortlet().getInitParameter(
-				"contextConfigLocation");
-		Resource resource = null;
-		try {
-			resource = new UrlResource(ResourceUtils.getURL(configLocation));
-		} catch (FileNotFoundException e) {
-			throw new RuntimeException(e.getMessage());
-		}
-
-		new XmlBeanDefinitionReader(ctx).loadBeanDefinitions(resource);
-		ctx.refresh();
-
-		// ... store it in application's metadata ...
-		portletapp.setMetaData(CONTEXT_KEY, new ApplicationContextHolder(ctx));
 
 		// ... and create and register the annotation aware injector
 		InjectorHolder