Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.common
Class T3Connection

    java.lang.Object
      weblogic.common.T3Connection

    public final class T3Connection

extends Object

A T3Connection object is used to establish communication between a T3Client and a WebLogic Server on a TCP/IP hostname and port number. A T3Connection is the representation of the link between a T3Client and a WebLogic Server.

Changes in internal communications in version 4.0 affected how T3Connection. Socket management is no longer managed by T3Connection (as of version 4.0); now sharing sockets is done automatically for you by the framework. Consequently, the methods in the T3Connection class have been deprecated. In general, the model in which T3Connection was used -- that you supply the URL of a WebLogic Server and get back a connection to the server -- has been made obsolete with the introduction of JNDI and the use of an InitialContext, by which access to all WebLogic services are then acquired without direct reference to any WebLogic Server in particular. This model facilitates cluster use for failover and load balancing.

Removing references to T3Connection is strongly recommended, since the class will not be supported indefinitely. The accessor methods in this class to get information about the connection still work as expected, with some exceptions. For example, if operating in a cluster environment, the accessors will only return information about the original host, port, etc. The `isConnected()` method always returns true, since there is no longer any real tie between the connection itself and its socket. The `disconnect()` method may not behave as you expect, since the socket is managed by the framework. Again, we recommend that you upgrade your classes to use the much more flexible JNDI model for access to all WebLogic services.

See Also:
  `WLInitialContextFactory`

Constructor Summary
`T3Connection(String url)` Deprecated. Use the JNDI model
`T3Connection(String url, UserInfo t3usr)` Deprecated. Use the JNDI model

Method Summary
`T3Connection` | `connect()` Deprecated. Use the JNDI model
`void` | `disconnect()` Deprecated. Use the JNDI model
`String` | `getHost()` Deprecated. Use the JNDI model and its accessors for information about the connection
`String` | `getPath()` Deprecated. Use the JNDI model and its accessors for information about the connection
`int` | `getPort()` Deprecated. Use the JNDI model and its accessors for information about the connection
`String` | `getProtocol()` Deprecated. Use the JNDI model and its accessors for information about the connection
`String` | `getQueryParam(String key)` Deprecated. Use the JNDI model and its accessors for information about the connection
`Hashtable` | `getQueryParams()` Deprecated. Use the JNDI model and its accessors for information about the connection
`String` | `getURL()` Deprecated. Use the JNDI model and its accessors for information about the connection
`UserInfo` | `getUser()` Deprecated. Use the JNDI model and its accessors for information about the connection
`boolean` | `isConnected()` Deprecated. Use the JNDI model
`String` | `toString()` Deprecated. Information is no longer very useful

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### T3Connection

    public T3Connection(String url)
                 throws UnknownHostException,
                        MalformedURLException

  Deprecated. Use the JNDI model

  Establishes a WebLogic Server connection to the specified URL for the specified UserInfo information. With version 4.0, the recommended method of establishing a connection to a server is through the use of a JNDI Context.

  Parameters:
    `URL` - URL for the WebLogic Server
  Throws:
    `UnknownHostException` - if the URL for the WebLogic Server is not found
    `MalformedURLException`

### T3Connection

    public T3Connection(String url,
                        UserInfo t3usr)
                 throws UnknownHostException,
                        MalformedURLException

  Deprecated. Use the JNDI model

  Establishes a WebLogic Server connection to the specified URL and the specified UserInfo information. With version 4.0, the recommended method of establishing a connection to a server is through the use of a JNDI Context.

  Parameters:
    `URL` - URL for the WebLogic Server
    `t3usr` - A UserInfo with username and credential to provide access to the WebLogic Server
  Throws:
    `UnknownHostException` - if the URL is not found
    `MalformedURLException` - if the URL for the WebLogic Server is invalid

Method Detail

### getHost

    public String getHost()

  Deprecated. Use the JNDI model and its accessors for information about the connection

  Returns the host name of a WebLogic Server to which a T3Connection was originally connected.

  Returns:
    Hostname

### getPort

    public int getPort()

  Deprecated. Use the JNDI model and its accessors for information about the connection

  Returns the port number over which a T3Connection was originally connected to a WebLogic Server.

  Returns:
    Port number on WebLogic Server

### getProtocol

    public String getProtocol()

  Deprecated. Use the JNDI model and its accessors for information about the connection

  Returns the protocol with which a T3Connection communicates to a WebLogic Server.

  Returns:
    Communication protocol

### getUser

    public UserInfo getUser()

  Deprecated. Use the JNDI model and its accessors for information about the connection

  Returns the UserInfo by which a T3Connection is connected to a WebLogic Server. A UserInfo has a username and credential that allows authentication and access to a secure WebLogic Server. The default is "Guest" (no password).

  Returns:
    UserInfo object

### getURL

    public String getURL()

  Deprecated. Use the JNDI model and its accessors for information about the connection

  Returns the URL with which a T3Connection was established as a UserInfo object.

  Returns:
    String

### getPath

    public String getPath()

  Deprecated. Use the JNDI model and its accessors for information about the connection

  Returns the path extracted from the URL used to connect to the WebLogic Server.

  Returns:
    Path sent to WebLogic Server

### getQueryParams

    public Hashtable getQueryParams()

  Deprecated. Use the JNDI model and its accessors for information about the connection

  Returns a Hashtable of the query params extracted from the URL used to connect to the WebLogic Server. May be null.

  Returns:
    Query params sent to WebLogic Server

### getQueryParam

    public String getQueryParam(String key)

  Deprecated. Use the JNDI model and its accessors for information about the connection

  Returns the value of the named query param, or null if there was no value passed for that param.

  Returns:
    Value of the given query param

### isConnected

    public boolean isConnected()

  Deprecated. Use the JNDI model

  Returns true. With version 4.0, management of the supporting socket is handled automatically by the framework, and this class no longer has access to the socket's state.

### connect

    public T3Connection connect()
                         throws IOException,
                                T3Exception

  Deprecated. Use the JNDI model

  Returns the current T3Connection. The method signature still throws exceptions to make it backwards compatible.

  Returns:
    T3Connection
  Throws:
    `IOException` - if an IO error occurs
    `weblogic.common.T3Exception` - if there is an error with the connect request
    `T3Exception`

### disconnect

    public void disconnect()
                    throws IOException,
                           T3Exception

  Deprecated. Use the JNDI model

  Does absolutely nothing. The method signature still throws exceptions to make it backwards compatible.

  Throws:
    `IOException` - if an IO error occurs
    `weblogic.common.T3Exception` - if there is an error with the disconnect request
    `T3Exception`

### toString

    public String toString()

  Deprecated. Information is no longer very useful

  Returns a string representation of the T3Connection, including the name of the host and the port to which it is connected.

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://edocs.bea.com/wls/docs103 Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD