KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > client > connector > ManagedConnectionMetaDataImpl


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2004 - Bull SA
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA.
19  *
20  * Initial developer(s): Frederic Maistre (Bull SA)
21  * Contributor(s): Nicolas Tachker (Bull SA)
22  */

23 package org.objectweb.joram.client.connector;
24
25 import javax.resource.ResourceException JavaDoc;
26 import org.objectweb.util.monolog.api.BasicLevel;
27 import org.objectweb.joram.client.jms.ConnectionMetaData;
28
29 /**
30  * A <code>ManagedConnectionMetaDataImpl</code> instance provides information
31  * related to a managed connection.
32  */

33 public class ManagedConnectionMetaDataImpl
34              implements javax.resource.spi.ManagedConnectionMetaData JavaDoc
35 {
36   /** Name of the user associated with the managed connection. */
37   private String JavaDoc userName;
38
39   
40   /**
41    * Constructs a <code>ManagedConnectionMetaDataImpl</code> instance.
42    */

43   public ManagedConnectionMetaDataImpl(String JavaDoc userName) {
44     if (AdapterTracing.dbgAdapter.isLoggable(BasicLevel.DEBUG))
45       AdapterTracing.dbgAdapter.log(BasicLevel.DEBUG, "ManagedConnectionMetaDataImpl(" + userName + ")");
46
47     this.userName = userName;
48   }
49
50    
51   /** Returns JORAM's name. */
52   public String JavaDoc getEISProductName() throws ResourceException JavaDoc
53   {
54     return ConnectionMetaData.jmsProviderName;
55   }
56
57   /** Returns the current JORAM release number. */
58   public String JavaDoc getEISProductVersion() throws ResourceException JavaDoc
59   {
60     return ConnectionMetaData.providerVersion;
61   }
62
63   /** Returns 0 as JORAM as no upper limit of active connections. */
64   public int getMaxConnections() throws ResourceException JavaDoc
65   {
66     return 0;
67   }
68
69   /** Returns the name of the user associated with the managed connection. */
70   public String JavaDoc getUserName() throws ResourceException JavaDoc
71   {
72     return userName;
73   }
74 }
75
Popular Tags