Author: peteroyle
Date: 2009-05-25 11:53:52 -0400 (Mon, 25 May 2009)
New Revision: 2705
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
Log:
Brace Formatting
Modified:
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java
===================================================================
---
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java 2009-05-25
11:18:14 UTC (rev 2704)
+++
extensions/trunk/se/src/main/java/org/jboss/webbeans/environment/se/StartMain.java 2009-05-25
15:53:52 UTC (rev 2705)
@@ -39,62 +39,56 @@
*/
public class StartMain
{
-
- private static final String BOOTSTRAP_IMPL_CLASS_NAME =
"org.jboss.webbeans.bootstrap.WebBeansBootstrap";
-
- private final Bootstrap bootstrap;
- private final BeanStore applicationBeanStore;
- public static String[] PARAMETERS;
-
- private WebBeansManager manager;
-
-
- public StartMain(String[] commandLineArgs)
- {
- PARAMETERS = commandLineArgs;
- try
- {
- bootstrap = Reflections.newInstance(BOOTSTRAP_IMPL_CLASS_NAME,
Bootstrap.class);
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Error loading Web Beans bootstrap, check
that Web Beans is on the classpath", e);
- }
- this.applicationBeanStore = new ConcurrentHashMapBeanStore();
- }
-
- private void go()
- {
- bootstrap.setEnvironment(Environments.SE);
- bootstrap.getServices().add(WebBeanDiscovery.class, new SEWebBeanDiscovery() {});
- bootstrap.setApplicationContext(applicationBeanStore);
- bootstrap.initialize();
- this.manager = bootstrap.getManager();
- bootstrap.boot();
- DependentContext.instance().setActive(true);
-
bootstrap.getManager().getInstanceByType(ShutdownManager.class).setBootstrap(bootstrap);
- }
-
- /**
- * The main method called from the command line.
- *
- * @param args
- * the command line arguments
- */
- public static void main(String[] args)
- {
- new StartMain(args).main();
- }
-
- public Manager main()
- {
- go();
- return manager;
- }
- public static String[] getParameters() {
- // TODO(PR): make immutable
- return PARAMETERS;
- }
+ private static final String BOOTSTRAP_IMPL_CLASS_NAME =
"org.jboss.webbeans.bootstrap.WebBeansBootstrap";
+ private final Bootstrap bootstrap;
+ private final BeanStore applicationBeanStore;
+ public static String[] PARAMETERS;
+ private WebBeansManager manager;
+ public StartMain(String[] commandLineArgs)
+ {
+ PARAMETERS = commandLineArgs;
+ try {
+ bootstrap = Reflections.newInstance(BOOTSTRAP_IMPL_CLASS_NAME,
Bootstrap.class);
+ } catch (Exception e) {
+ throw new IllegalStateException("Error loading Web Beans bootstrap,
check that Web Beans is on the classpath", e);
+ }
+ this.applicationBeanStore = new ConcurrentHashMapBeanStore();
+ }
+
+ private void go()
+ {
+ bootstrap.setEnvironment(Environments.SE);
+ bootstrap.getServices().add(WebBeanDiscovery.class, new SEWebBeanDiscovery()
{});
+ bootstrap.setApplicationContext(applicationBeanStore);
+ bootstrap.initialize();
+ this.manager = bootstrap.getManager();
+ bootstrap.boot();
+ DependentContext.instance().setActive(true);
+
bootstrap.getManager().getInstanceByType(ShutdownManager.class).setBootstrap(bootstrap);
+ }
+
+ /**
+ * The main method called from the command line.
+ *
+ * @param args
+ * the command line arguments
+ */
+ public static void main(String[] args)
+ {
+ new StartMain(args).main();
+ }
+
+ public Manager main()
+ {
+ go();
+ return manager;
+ }
+
+ public static String[] getParameters()
+ {
+ // TODO(PR): make immutable
+ return PARAMETERS;
+ }
}
Show replies by date