Calling remote interface methods  Managing transactions

Chapter 8: Creating Enterprise JavaBeans Clients

Calling local interface methods

You can use EJB local invocations in servlet, JSP, or EJB component code to call EJB components hosted on the same server. Proxies for a local bean can be instantiated with almost the same code that would be used to instantiate remote proxies. The differences are:

When an EJB 2.0 component provides local interfaces, any other component or Web application that calls the local interface must use the same class loader. ClassCastException errors occur when local interface calls are made from entities that use a different class loader. Configure the custom class lists for the calling and called components and parent entries to allow sharing of the class instances as described in “Custom class lists for packages, applications, or servers”.





Copyright © 2005. Sybase Inc. All rights reserved. Managing transactions