ejb 3.0 - getting remote exception while calling an ejb3 method -


method(){ try{ code.. } catch(exception e) { throw new userdefineexception(); } } 

// while calling above method java client gettine remote exception expecting userdefineexception.

ejb container wrap undeclared (system) exceptions in remoteexception (or ejbexception local views). avoid this, should either:

  1. change userdefineexception extend exception rather runtimeexception, , add userdefineexception throws clause of remote interface.

  2. annotation userdefineexception @applicationexception, or specify <application-exception>com.example.userdefineexception</application-exception> in ejb-jar.xml.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -