ConnectToServer – PB Docs 2018

ConnectToServer

Description

Connects a client application to an EJB server. The client
application must call ConnectToServer before it can use a remote object
on the server.

Syntax

Argument

Description

connection

The name of the EJBConnection object you want to
use to establish the connection

properties[ ]

A string array used to pass name/value pairs that
specify how the connection will be established

Return value

None

Throws

NamingException

Examples

In this example, the client application connects to a WebLogic
server application using the Connection object called conn:

Usage

You must provide ConnectToServer with a set of properties that
specify how the connection will be established. Before calling
ConnectToServer, declare a string array variable and assign values for
the javax.naming.Context constants shown in the following table to the
elements of the array.

javax.naming.context constant

Value

INITIAL_CONTEXT_FACTORY

Server dependent. For
example:

WebLogic:

weblogic.jndi.WLInitialContextFactory

WebSphere:

com.ibm.websphere.naming.WsnInitialContextFactory

PROVIDER_URL

URL for the Server’s port. For example:
iiop://myserver:9000

SECURITY_PRINCIPAL

User name required for access to the
server.

SECURITY_CREDENTIALS

Credentials associated with the user name,
typically a password.

See also

CreateJavaInstance

Lookup


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x