geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r125993 - /geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
Date Sat, 22 Jan 2005 01:32:18 GMT
Author: djencks
Date: Fri Jan 21 17:32:17 2005
New Revision: 125993

URL: http://svn.apache.org/viewcvs?view=rev&rev=125993
Log:
fix app client jndi
Modified:
   geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java

Modified: geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java?view=diff&rev=125993&p1=geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java&r1=125992&p2=geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java&r2=125993
==============================================================================
--- geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
(original)
+++ geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
Fri Jan 21 17:32:17 2005
@@ -24,6 +24,7 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.transaction.context.TransactionContext;
 import org.apache.geronimo.transaction.context.TransactionContextManager;
+import org.apache.geronimo.kernel.Kernel;
 
 /**
  * @version $Rev: 46019 $ $Date: 2004-09-14 02:56:06 -0700 (Tue, 14 Sep 2004) $
@@ -36,12 +37,20 @@
     private final ObjectName appClientModuleName;
     private final Method mainMethod;
     private final ClassLoader classLoader;
+    private final Kernel kernel;
     private final TransactionContextManager transactionContextManager;
 
-    public AppClientContainer(String mainClassName, ObjectName appClientModuleName, ClassLoader
classLoader, AppClientPlugin jndiContext, TransactionContextManager transactionContextManager)
throws Exception {
+    public AppClientContainer(String mainClassName, 
+                              ObjectName appClientModuleName, 
+                              AppClientPlugin jndiContext,
+                              TransactionContextManager transactionContextManager,
+                              ClassLoader classLoader,
+                              Kernel kernel
+                              ) throws Exception {
         this.mainClassName = mainClassName;
         this.appClientModuleName = appClientModuleName;
         this.classLoader = classLoader;
+        this.kernel = kernel;
         this.jndiContext = jndiContext;
         this.transactionContextManager = transactionContextManager;
 
@@ -71,7 +80,7 @@
         TransactionContext oldTransactionContext = transactionContextManager.getContext();
         TransactionContext currentTransactionContext = null;
         try {
-            jndiContext.startClient(appClientModuleName, null, classLoader);
+            jndiContext.startClient(appClientModuleName, kernel, classLoader);
             currentTransactionContext = transactionContextManager.newUnspecifiedTransactionContext();
             mainMethod.invoke(null, new Object[]{args});
 
@@ -100,11 +109,19 @@
         infoFactory.addOperation("main", new Class[]{String[].class});
         infoFactory.addAttribute("mainClassName", String.class, true);
         infoFactory.addAttribute("appClientModuleName", ObjectName.class, true);
-        infoFactory.addAttribute("classLoader", ClassLoader.class, false);
         infoFactory.addReference("JNDIContext", AppClientPlugin.class);
         infoFactory.addReference("TransactionContextManager", TransactionContextManager.class);
+        infoFactory.addAttribute("classLoader", ClassLoader.class, false);
+        infoFactory.addAttribute("kernel", Kernel.class, false);
+
 
-        infoFactory.setConstructor(new String[]{"mainClassName", "appClientModuleName", "classLoader",
"JNDIContext", "TransactionContextManager"});
+        infoFactory.setConstructor(new String[]{"mainClassName", 
+                                                "appClientModuleName", 
+                                                "JNDIContext", 
+                                                "TransactionContextManager",
+                                                "classLoader", 
+                                                "kernel"                                
  
+        });
 
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Mime
View raw message