Author: assaf
Date: Mon Oct 9 18:24:10 2006
New Revision: 454579
URL: http://svn.apache.org/viewvc?view=rev&rev=454579
Log:
Added GeronimoFactory for looking up Geronimo TransactionManager
Added:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/GeronimoFactory.java
(with props)
Added:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/GeronimoFactory.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/GeronimoFactory.java?view=auto&rev=454579
==============================================================================
---
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/GeronimoFactory.java
(added)
+++
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/GeronimoFactory.java
Mon Oct 9 18:24:10 2006
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ode.axis2.util;
+
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.repository.Artifact;
+import javax.transaction.TransactionManager;
+import java.util.HashMap;
+
+public class GeronimoFactory {
+
+ public GeronimoFactory() {
+ }
+
+ public TransactionManager getTransactionManager() {
+ Kernel kernel = KernelRegistry.getSingleKernel();
+ HashMap map = new HashMap();
+ map.put("name", "TransactionManager");
+ map.put("j2eeType", "TransactionManager");
+ map.put("ServiceModule", "geronimo/j2ee-server/1.1/car");
+ AbstractName name = new
AbstractName(Artifact.create("geronimo/j2ee-server/1.1/car"), map);
+ Object proxy = kernel.getProxyManager().createProxy(name,
TransactionManager.class);
+ return (TransactionManager) proxy;
+ }
+
+}
Propchange:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/GeronimoFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/GeronimoFactory.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/util/GeronimoFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain