Author: peteroyle
Date: 2009-03-19 18:54:09 -0400 (Thu, 19 Mar 2009)
New Revision: 2116
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/AbstractScanner.java
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/URLScanner.java
Log:
- Updated to new logging
- Added String[] getArgsAsArry() to ParametersFactory for easier compatibility with
existing apps.
- WBRI-186 is now fixed, so reintroduced generics to List<String> getArgs().
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java 2009-03-19
22:49:24 UTC (rev 2115)
+++
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/ShutdownManager.java 2009-03-19
22:54:09 UTC (rev 2116)
@@ -4,16 +4,17 @@
import javax.event.Observes;
import javax.inject.manager.Manager;
-import org.apache.log4j.Logger;
import org.jboss.webbeans.bootstrap.api.Bootstrap;
import org.jboss.webbeans.context.DependentContext;
import org.jboss.webbeans.environment.se.events.Shutdown;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
@ApplicationScoped
public class ShutdownManager
{
- private static Logger log = Logger.getLogger(ShutdownManager.class);
+ private static LogProvider log = Logging.getLogProvider(ShutdownManager.class);
private boolean hasShutdownBeenCalled = false;
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java 2009-03-19
22:49:24 UTC (rev 2115)
+++
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/beans/ParametersFactory.java 2009-03-19
22:54:09 UTC (rev 2116)
@@ -37,21 +37,30 @@
public class ParametersFactory
{
private String[] args;
+ private List<String> argsList;
/**
- * Producer method for the injectible command line args.
+ * Producer method for the injectable command line args.
*
* @return The command line arguments.
*/
- @Produces
- @Parameters
- // TODO Give generic type - WBRI-186
- public List getArgs()
+ @Produces @Parameters
+ public List<String> getArgs()
{
- return Collections.unmodifiableList(new
ArrayList<String>(Arrays.asList(this.args)));
+ return argsList;
}
-
+
/**
+ * Producer method for the injectable command line args.
+ * @return The command line arguments.
+ */
+ @Produces @Parameters
+ public String[] getArgsAsArray( )
+ {
+ return this.args;
+ }
+
+ /**
* StartMain passes in the command line args here.
*
* @param args
@@ -60,5 +69,6 @@
public void setArgs(String[] args)
{
this.args = args;
+ this.argsList = Collections.unmodifiableList( new ArrayList<String>(
Arrays.asList( args ) ) );
}
}
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/AbstractScanner.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/AbstractScanner.java 2009-03-19
22:49:24 UTC (rev 2115)
+++
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/AbstractScanner.java 2009-03-19
22:54:09 UTC (rev 2116)
@@ -17,9 +17,9 @@
package org.jboss.webbeans.environment.se.discovery;
import java.net.URL;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
-import org.apache.log4j.Logger;
-
/**
* Abstract base class for {@link Scanner} providing common functionality
*
@@ -31,7 +31,7 @@
public abstract class AbstractScanner implements Scanner
{
- private static final Logger log = Logger.getLogger(Scanner.class);
+ private static final LogProvider log = Logging.getLogProvider(Scanner.class);
private final ClassLoader classLoader;
private final SEWebBeanDiscovery webBeanDiscovery;
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/URLScanner.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/URLScanner.java 2009-03-19
22:49:24 UTC (rev 2115)
+++
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/discovery/URLScanner.java 2009-03-19
22:54:09 UTC (rev 2116)
@@ -28,8 +28,9 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipFile;
+import org.jboss.webbeans.log.LogProvider;
+import org.jboss.webbeans.log.Logging;
-import org.apache.log4j.Logger;
/**
* Implementation of {@link Scanner} which can scan a {@link URLClassLoader}
@@ -42,7 +43,7 @@
*/
public class URLScanner extends AbstractScanner
{
- private static final Logger log = Logger.getLogger(URLScanner.class);
+ private static final LogProvider log = Logging.getLogProvider(URLScanner.class);
public URLScanner(ClassLoader classLoader, SEWebBeanDiscovery webBeanDiscovery)
{
Show replies by date