diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-02 08:24:51 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-02 08:24:51 +0000 |
commit | a4cf73926c2e560a3a51b6d5e10027efeefb6a3b (patch) | |
tree | 5d3a3a8c3529ded36cf801766d91a7a0231bab07 | |
parent | 02e51b006e9b84e175cc7e9eee86f3b384a53096 (diff) |
Clean up some code removing sysout printlns and commented out code
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@749232 13f79535-47bb-0310-9956-ffa450edef68
2 files changed, 5 insertions, 25 deletions
diff --git a/java/sca/modules/myfaces/src/main/java/org/apache/tuscany/myfaces/TuscanyAnnotationLifecycleProvider.java b/java/sca/modules/myfaces/src/main/java/org/apache/tuscany/myfaces/TuscanyAnnotationLifecycleProvider.java index 2c470ffda2..a7152206eb 100644 --- a/java/sca/modules/myfaces/src/main/java/org/apache/tuscany/myfaces/TuscanyAnnotationLifecycleProvider.java +++ b/java/sca/modules/myfaces/src/main/java/org/apache/tuscany/myfaces/TuscanyAnnotationLifecycleProvider.java @@ -36,43 +36,24 @@ public class TuscanyAnnotationLifecycleProvider extends TomcatAnnotationLifecycl private static Log log = LogFactory.getLog(TomcatAnnotationLifecycleProvider.class);
private TuscanyAnnotationProcessor annotationProcessor;
- private ExternalContext externalContext;
- private ServletContext sc;
+ private ServletContext servletContext;
public TuscanyAnnotationLifecycleProvider(ExternalContext externalContext) {
super(externalContext);
- this.externalContext = externalContext;
- this.sc = (ServletContext)externalContext.getContext();
- AnnotationProcessor ap = (org.apache.AnnotationProcessor)sc.getAttribute(org.apache.AnnotationProcessor.class.getName());
+ this.servletContext = (ServletContext)externalContext.getContext();
+ AnnotationProcessor ap = (org.apache.AnnotationProcessor)servletContext.getAttribute(org.apache.AnnotationProcessor.class.getName());
annotationProcessor = new TuscanyAnnotationProcessor(ap);
}
public Object newInstance(String className) throws InstantiationException, IllegalAccessException, InvocationTargetException, NamingException, ClassNotFoundException {
- System.out.println("foo newInstance: " + className);
-
- Class clazz = ClassUtils.classForName(className);
+ Class<?> clazz = ClassUtils.classForName(className);
log.info("Creating instance of " + className);
Object object = clazz.newInstance();
- annotationProcessor.processAnnotations(object, sc);
+ annotationProcessor.processAnnotations(object, servletContext);
annotationProcessor.postConstruct(object);
return object;
}
-// public boolean isAvailable() {
-// try {
-// ServletContext sc = (ServletContext)externalContext.getContext();
-// AnnotationProcessor ap = (org.apache.AnnotationProcessor)sc.getAttribute(org.apache.AnnotationProcessor.class.getName());
-//
-// annotationProcessor = new TuscanyAnnotationProcessor(ap);
-// sc.setAttribute(org.apache.AnnotationProcessor.class.getName(), annotationProcessor);
-//
-// return super.isAvailable();
-// } catch (Exception e) {
-// // ignore
-// }
-// return false;
-// }
-
}
diff --git a/java/sca/modules/myfaces/src/main/java/org/apache/tuscany/myfaces/TuscanyAnnotationProcessor.java b/java/sca/modules/myfaces/src/main/java/org/apache/tuscany/myfaces/TuscanyAnnotationProcessor.java index 09aaac713a..bd9b19fd8c 100644 --- a/java/sca/modules/myfaces/src/main/java/org/apache/tuscany/myfaces/TuscanyAnnotationProcessor.java +++ b/java/sca/modules/myfaces/src/main/java/org/apache/tuscany/myfaces/TuscanyAnnotationProcessor.java @@ -44,7 +44,6 @@ public class TuscanyAnnotationProcessor implements org.apache.AnnotationProcesso }
public void processAnnotations(Object arg0, ServletContext servletContext) throws IllegalAccessException, InvocationTargetException, NamingException {
- System.out.println("foo2 processAnnotations: " + arg0);
ContextHelper.inject(arg0, servletContext);
annotationProcessor.processAnnotations(arg0);
}
|