Hi Rickard,
R�> Hi!
R�> Stephan Gruschke wrote:
>> R�> No, this is done by the LogInterceptor.
>> Ups ... ok. Aehm ... which logger method? debug? warning? exception?
R�> Not sure. Now that I think of it application exceptions shouldn't be
R�> logged in the normal case (nothing is really wrong with the server or
R�> application). RuntimeExceptions should be logged as an exception. App
R�> exceptions could be logged as debug info though.
Well it can become much log output if many ejb's throwing application
defined exception at the same time. The problem is how to determine
which application exception should be logged and which not.
Maybe while developing beans every exception should be logged, for
production use only the critical ones (the *really* unexpected).
Is it possible to set the preferences for exception logging in
jboss.xml? Maybe with exception filtering capabilites (based upon regular
expressions or package declarations)?
>> >> and wrap it into
>> >> an RemoteException.
>> Ok.
>>
>> R�> No, application exceptions should be thrown as-is. RuntimeExceptions
>> R�> should be wrapped through (in a ServerException I think).
>>
>> >> Is that ok? Otherwise we would have to modify the
>> >> method signature which is not an option.
>>
>> R�> This is only for create, right? I think we have no other option but to
>> R�> change the signature of the PM interface to allow application
>> R�> exceptions.
>> Nope ... seems to be createEntity(), findEntity() and findEntities().
>> This would result in extending those method to throw Exception ...
>> which could be difficult for higher modules to check which exception
>> occured (same problem again humm). Just extending these methods with
>> InvocationTargetException would point out that the bean made something
>> wrong.
R�> Hmm... tricky one.. needs some thinking. Are you sure finder methods can
R�> have application exceptions?
Oui. Section 9.2.5: '... The throws clause may define arbitrary
application specific exceptions, including the
javax.ejb.FinderException ...'.
stephan.
R�> /Ricakrd
--
Best regards,
Stephan mailto:[EMAIL PROTECTED]