How to throw error from EJB

Hi, there

I have some problem about throw an error ......

index.jsp

//.....

int rowCount=adminLogin.loginResult(userName,password);

//....

AdminLogin.java

import java.rmi.RemoteException;

import javax.ejb.Remote;

@Remote

publicinterface AdminLogin{

publicint loginResult(String userName,String password)throws RemoteException;

}

if any error occured how can i throw an error to show on index.jsp?

Thank for advance

[888 byte] By [BomberMana] at [2007-11-27 7:52:58]
# 1
You can create a new instance of RemoteException and throw it - throw new RemoteException();from wherever you want to throw this exception.HTHJitendra
jitenba at 2007-7-12 19:34:13 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
The use of java.rmi.Remote exception is not recommended with EJB 3.0.You are better off definingyour own application exception type and adding that to the signature of your business method. --ken
ksaksa at 2007-7-12 19:34:13 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
Thanks man
BomberMana at 2007-7-12 19:34:13 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...