Skip to Content
author's profile photo Former Member
Former Member

Call J2EE application from Portal Application

Hey experts,

I am trying to call a J2EE application from a Portal application.

I am using the BonusCalculationEjb and BonusCalculationEAR downloaded from the web.

I have added a JNDI name sabbir/calculatorJNDI in BonusCalculationBean

Then, I have deployed BonusCalculationEAR and it deploys OK.

In the Portal application I have added the following PrivateSharingReference"/>

I am using the following code to call it

InitialContext ctx = new InitialContext();

BonusCalculatorLocalHome home = (BonusCalculatorLocalHome) ctx.lookup("localejbs/");

BonusCalculatorLocal theCalculator = home.create();

double result = theCalculator.calculateBonus(6);

out.println("The bonus is " + result);

But, I am getting the following error

Path to object does not exist at sabbir, the whole lookup name is localejbs/

Can you please advise.

Thank you.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.