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:
change userdefineexception extend exception rather runtimeexception, , add userdefineexception throws clause of remote interface.
annotation userdefineexception
@applicationexception
, or specify<application-exception>com.example.userdefineexception</application-exception>
in ejb-jar.xml.
Comments
Post a Comment