Chapter 10: Creating Application Clients  Configuring application client properties

Chapter 10: Creating Application Clients

Creating an application client

An application client uses JNDI to look up and gain access to EJB components, resources, and environment properties defined in an XML deployment descriptor.

An application client connects to an EAServer component using a JNDI environment naming context. Here is a simple implementation of an application client:

InitialContext initCntxt = new InitialContext();

Object acctRef =    initCntxt.lookup(“java:comp/env/ejb/acctBean”);
acctBeanHome home = (acctBeanHome)
Account acct = home.findByPrimaryKey(new
String name = acct.getName();

The application client JAR file includes a deployment descriptor that defines the JNDI environment naming context entries. This example defines the EJB reference for an acctBean:


StepsCreating an application client in EAServer Manager

  1. Expand the top-level Applications folder, then expand the icon that represents your application, and highlight Clients.

  2. Choose File | New Application Client and enter a name for the application client.

  3. If necessary, create the EJB client. See Chapter 8, “Creating Enterprise JavaBeans Clients.”

  4. Configure the application client properties. See “Configuring application client properties”.

Copyright © 2005. Sybase Inc. All rights reserved. Configuring application client properties