Appendix A Jaguar 1.1 Java Classes and Interfaces
package com.sybase.jaguar.beans.enterprise;public class CommunicationManager extends Object
CommunicationManager instantiates stub objects used to invoke Jaguar component methods.
Future versions of the Java Developer's Kit will include a built-in version of this class. The Jaguar implementation is based on a draft version of JavaSoft's Enterprise JavaBeans specification.
None. All methods are static.
jaguar.beans.enterprise.Stub interface
Create an instance of a server component and return a stub instance that communicates with the server component instance.
Package |
|
Class |
public static synchronized Stub createInstance
( Properties props)
throws EnterpriseBeanException
props
A JProperties object initialized to describe the component and the particulars that are required to establish communication with the server. This object must be an initialized JProperties object; passing an instance of any other class will result in an exception.
An instance of the stub class for the component specified
by URL or null
if
no installed driver can instantiate a stub for the specified URL.
Cast the returned object to either the generated-stub interface or the generated-stub class. Casting to the interface provides portability to other communication drivers. However, you must cast to the stub class and not the interface if you call Jaguar methods that return row results.
Note
The Jaguar results processing methods cannot be used unless
you cast the returned object to the generated stub class (and not
the interface). These methods are inherited from either jaguar.stub.jdbc102.JJDBCStub class or jaguar.stub.jdbc11.JJDBCStub class, depending on
the JDK version used by your code.
createInstance(String, Class), getDriver(String), registerDriver(CommunicationDriver), jaguar.beans.enterprise.JProperties class
Create an instance of a server component and return a stub instance that communicates with the server component instance.
Package |
|
Class |
public static synchronized Stub createInstance
( String URL, Class typeView)
throws EnterpriseBeanException
URL
A Uniform Resource Locator (URL) of the form:
ejb:protocol[//subprotocol1]
where protocol identifies which CommunicationDriver instance will be used to instantiate the stub class and the rest of the URL indicates a server component and the particulars that are required to establish communication with the server. Each implementation of CommunicationDriver recognizes a different protocol. The comments below describe the URL to use for Jaguar components.
typeView
Not used. Pass as null
.
An instance of the stub class for the component specified
by URL or null
if
no installed driver can instantiate a stub for the specified URL.
Cast the returned object to either the generated-stub interface or the generated-stub class. Casting to the interface provides portability to other communication drivers. However, you must cast to the stub class and not the interface if you call Jaguar methods that return row results.
Note
The Jaguar results processing methods cannot be used unless
you cast the returned object to the generated stub class (and not
the interface). These methods are inherited from either jaguar.stub.jdbc102.JJDBCStub class or jaguar.stub.jdbc11.JJDBCStub class, depending on
the JDK version used by your code.
Jaguar component URLs are composed as follows:
ejb:{iiop|iiops|jdbc|jdbc102}//host:port:[jag_tunnel:
[tport:]][jag_new_connection:]user:pwrd:
stubpack/srvpack/comp
Note
The component URL must not contain white space. The syntax
description above contains a newline to improve readability.
ejb
- Required
to identify the resource as an Enterprise JavaBean.
iiop|iiops|jdbc|jdbc102
- Identifies
the communication protocol, as follows:
jag_tunnel
- This
option is provided for backward compatibility with Jaguar version
1.1. It has no effect. (The Jaguar 2.0 client runtime uses HTTP
tunnelling automatically if it detects that a firewall is forbidding IIOP
connections.)
jag_new_connection
- Use
this keyword if the the stub must use a dedicated connection rather
than sharing the connection with other stub instances that connect
to the same server. Using dedicated connections may improve the
response time of client method calls at the expense of server-side,
client-side, and network resources.
Note
The stub class name must be the same as the component name,
as it appears in Jaguar Manager.
The example URL below connects to machine "xyz.com," at port 9000, with user "fred," and password "secret." It runs in a JDK 1.1 application (or component) and identifies the component "Stock" in package "Trade." The stub class is OnLineApps.Trade.
ejb:jdbc//xyz.com:9000:fred:secret:OnLineApps.Trade/Trade/Stock
createInstance(Properties), getDriver(String), registerDriver(CommunicationDriver)
Remove a previously registered driver from the driver manager's list of installed drivers.
Package |
|
Class |
public static synchronized void deregisterDriver
( CommunicationDriver driver)
throws CommunicationDriverException
driver
The CommunicationDriver instance to be deregistered.
registerDriver(CommunicationDriver)
Get the driver instance that recognizes the protocol in the specified URL.
Package |
|
Class |
public static void getDriver
( String URL)
throws CommunicationDriverException
URL
A URL that identifies an Enterprise JavaBean. See createInstance(String, Class) for details on the URL format.
A CommunicationDriver instance that recognizes the specified URL. If no installed driver recognizes the URL, a CommunicationDriverException is thrown.
createInstance(Properties), registerDriver(CommunicationDriver)
Get an enumeration of currently registered drivers.
Package |
|
Class |
public static Enumeration getDrivers()
throws CommunicationDriverException
A java.util.Enumeration object that contains each currently installed CommunicationDriver instance.
getDriver(String), registerDriver(CommunicationDriver)
Add a driver to the driver manager's list of installed drivers.
Package |
|
Class |
public static synchronized void registerDriver
( CommunicationDriver driver)
throws CommunicationDriverException
driver
The CommunicationDriver instance to be registered.
deregisterDriver(CommunicationDriver)
Copyright © 2000 Sybase, Inc. All rights reserved. |
![]() |