users
[Top] [All Lists]

RE: [cinjug-users] ClassCast Exception while trying to reference a local

To: "'John Olmstead'" <jolmstead2k@xxxxxxxxx>, "'Cinjug'" <users@xxxxxxxxxx>
Subject: RE: [cinjug-users] ClassCast Exception while trying to reference a local home object. Additional Info.
From: "COJUG" <cojug@xxxxxxxxx>
Date: Fri, 30 Apr 2004 08:30:15 -0400
Delivered-to: mailing list users@cinjug.org
Importance: Normal
In-reply-to: <20040430114649.39808.qmail@web41607.mail.yahoo.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Organization: COJUG

Defining a local and remote interface is acceptable and common. However, the remote and local interfaces must have different jndi names. Configuring the different names depends on the application server being used. In WebLogic 8.1, you define the jndi names in the weblogic-ejb-jar.xml deployment descriptor like the following.

 

<weblogic-ejb-jar>

  <weblogic-enterprise-bean>

    <ejb-name>TimeAccountBean</ejb-name>

    <jndi-name>TimeAccountHome</jndi-name>

    <local-jndi-name>TimeAccountHomeLocal</local-jndi-name>

  </weblogic-enterprise-bean>

</weblogic-ejb-jar>

 

Here TimeAccountHome can be used to look up the remote interface and TimeAccountHomeLocal can be used to look up the local interface.

 

-----------------------------------------------

Christopher M. Judd

Judd Solutions, LLC

President & Consultant

Co-author of Enterprise Java Development on a Budget

 

685 Farrington Dr.

Worthington, OH 43085

phone: 614-378-4119

email: cjudd@xxxxxxxxxxxxxxxxx

web: www.juddsolutions.com

 

-----Original Message-----
From: John Olmstead [mailto:jolmstead2k@xxxxxxxxx]
Sent:
Friday, April 30, 2004 6:47 AM
To: Cinjug
Subject: [cinjug-users] ClassCast Exception while trying to reference a local home object. Additional Info.

 

Ladies and Gentlemen;

 

Further investigation reveals the the reference being returned from the local home context lookup in the session bean is actually returning a reference to the remote home object.  I do have both local and home references defined and deployed for the entity bean.  I'm going to redeploy the project , removing the definitions for the remote home and component interfaces and retry the client.

 

I thought defining both local and remote interfaces for ejbs was acceptable practice?????

 

Thanks;

 

John Olmstead

 



John Olmstead
jolmstead2k@xxxxxxxxx


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs

<Prev in Thread] Current Thread [Next in Thread>