Hi all.
First at all... sorry for my english mistakes...

I'am generating a create exception in a simple session bean. On the client i get 
     [java] Excepcion!!! java.lang.reflect.UndeclaredThrowableException -  
javax.ejb.CreateException: hola2

The bizarre thing that i cant understand is that ejbCreate is called until i invoke a 
method in the Remote interface, ie. if i put in comments the bussines method and left 
only de home.create() nothing pass, but if i invoke the bussines method, the ejbCreate 
is invoked too....

Well i believe that is wrong, but i don know... But itÂÃÂs sure that my 
client must get a createException... right?

thanks for any help!

The code:

in my ejbCreate i have:

public void ejbCreate()throws RemoteException,CreateException  {
  |     System.out.println("creando");
  |     throw new CreateException("hola2");
  | }


bussines method

public void migrateHistoricData() throws RemoteException{
  | try{
  | System.out.println("va a migrar");
  | }catch(Exception e){
  | System.out.println("en bean other exception "+e.getMessage());;
  |             throw (RemoteException)e;
  | }
  |             
  | }

and in my test client i have:

MigrationManagerSessionHome home = (MigrationManagerSessionHome)  
PortableRemoteObject.narrow(obj,MigrationManagerSessionHome.class);
  | MigrationManagerSession migraMgr = home.create();
  | migraMgr.migrateHistoricData();

if i put in comment migraMgr.migrateHistoricData(); nothing happens...but if i dont, i 
get on jboss server:
11:38:32,851 INFO  [STDOUT] creando
  | and in my client the UndeclaredThrowableException.
  | 
  | 
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3828635#3828635

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3828635


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to