1 /*2 * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//transaction/src/java/org/apache/commons/transaction/memory/jca/MapConnection.java,v 1.1 2004/11/18 23:27:18 ozeigermann Exp $3 <<<<<<< .mine4 * $Revision: 1.1 $5 * $Date: 2005-02-26 14:16:14 +0100 (Sa, 26 Feb 2005) $6 =======7 * $Revision$8 * $Date: 2005-02-26 14:16:14 +0100 (Sa, 26 Feb 2005) $9 >>>>>>> .r16816910 *11 * ====================================================================12 *13 * Copyright 1999-2002 The Apache Software Foundation 14 *15 * Licensed under the Apache License, Version 2.0 (the "License");16 * you may not use this file except in compliance with the License.17 * You may obtain a copy of the License at18 *19 * http://www.apache.org/licenses/LICENSE-2.020 *21 * Unless required by applicable law or agreed to in writing, software22 * distributed under the License is distributed on an "AS IS" BASIS,23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.24 * See the License for the specific language governing permissions and25 * limitations under the License.26 *27 */28 29 package org.apache.commons.transaction.memory.jca;30 31 import java.util.Map ;32 33 import javax.resource.ResourceException ;34 import javax.resource.cci.Connection ;35 import javax.resource.cci.ConnectionMetaData ;36 import javax.resource.cci.Interaction ;37 import javax.resource.cci.LocalTransaction ;38 import javax.resource.cci.ResultSetInfo ;39 import javax.resource.spi.ManagedConnection ;40 41 /**42 * 43 * @version $Revision$44 * 45 */46 public class MapConnection implements Connection {47 48 protected MapManagedConnection mc;49 50 public MapConnection(ManagedConnection mc) {51 this.mc = (MapManagedConnection) mc;52 }53 54 public Map getMap() {55 return mc.map;56 }57 58 public void close() throws ResourceException {59 mc.close();60 }61 62 public Interaction createInteraction() throws ResourceException {63 return null;64 }65 66 public LocalTransaction getLocalTransaction() throws ResourceException {67 return (LocalTransaction )mc.getLocalTransaction();68 }69 70 public ConnectionMetaData getMetaData() throws ResourceException {71 return null;72 }73 74 public ResultSetInfo getResultSetInfo() throws ResourceException {75 return null;76 }77 78 void invalidate() {79 mc = null;80 }81 82 }83