A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Java
»
EJB and other Java EE Technologies
Author
EJB Home interface
Jaffery Rab
Ranch Hand
Joined: Jan 18, 2002
Posts: 36
posted
Aug 08, 2002 08:06:00
0
hi guys
I am new in
EJB
and trying to to some stuff but got problems
I created my remote interface called IntrestCalculator and compile it code is
import java.rmi.RemoteException; import javax.ejb.EJBObject; public interface IntrestCalculator extends EJBObject{ public void setPrincipal(double amount) throws RemoteException; public void setIntrestrate(double rate) throws RemoteException; public void setTerm(int years) throws RemoteException; public double getBalance() throws RemoteException; public double getIntrestEarned() throws RemoteException; }
then I create my home interface called IntrestCalculatorHome code is
import java.rmi.RemoteException; import javax.ejb.*; public interface IntrestCalculatorHome extends EJBHome{ //create IntrestCalculator EJB public IntrestCalculator create() throws RemoteException,CreateException; }
I put all of them in default package but when I compile home interface I am getting error message like
C:\jdk1.3.1_02\bin\IntrestCalculatorHome.java:12: cannot resolve symbol symbol : class IntrestCalculator location: interface SimpleBean.IntrestCalculatorHome public IntrestCalculator create() throws RemoteException,CreateException; ^ 1 error Tool completed with exit code 1
why it is not taking IntrestCalculator as areturn type ??? any clue
Thanx in advance
Peter Kristensson
Ranch Hand
Joined: Jul 02, 2001
Posts: 118
posted
Aug 08, 2002 10:37:00
0
Hi.
The create() method is supposed to give a reference to a remote interface.
I agree. Here's the link:
http://aspose.com/file-tools
subject: EJB Home interface
Similar Threads
error when compiling Home interface
Help with CalcHome.java interface
Unable to compile home interface file
Help with CalcHome.java interface
question on my first EJB program? thanks all
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter