[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

EJB convert between local and remote interface

Posted on 2002-07-11
4
Medium Priority
?
477 Views
Last Modified: 2013-11-24
Hi

I am writing an EJB. I want to be able to convert from local to remote interface, and from remote to local interface.

If f.ex I have a EJB called ABean, with local interface ALocal and remote interface ARemote. How can I get the ALocal interface when I have the corresponding ARemote interface. And how can I get the ARemote interface when I have the corresponding ALocal interface.

Thanx
0
Comment
Question by:steff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:klf
ID: 7145775
Use the EBJ's SessionContext, EntityContext, or MessageDrivenContext object. These have getEJBLocalObject and getEJBObject methods.  As the names suggest SessionContext is use with session beans, EntityContext is used with entity beans, and MessageDrivenContext is use with message driven beans.


 
0
 

Author Comment

by:steff
ID: 7145826
According to the JavaDoc that comes with JBuilder 6, SessionContext only has getEJBObject, and NOT getEJBLocalObject.

Is the JavaDoc wrong?
0
 
LVL 1

Accepted Solution

by:
klf earned 400 total points
ID: 7145866
What version of the EJB  does JBuilder 6 implement?  
My information came from the Mastering Enterprise JavaBeans (2nd Editon) book that covers EJB 2.0.  Accoring to this SessionContext must implement the EJBContext interface that has a getEJBLocalObject interface.  But since it's a container object JBuilder may have chosen not to provide a working implementation of getEJBLocalObject.  

0
 
LVL 35

Expert Comment

by:girionis
ID: 8917198
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to klf

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question