users@glassfish.java.net

Re: Help step-by-step for the use of Interceptors with a full code implem.

From: Alexis Moussine-Pouchkine <alexis.mp_at_sun.com>
Date: Tue, 09 Mar 2010 11:44:07 +0100

catching the parent Exception class and hiding it isn't particularly good coding practice ;)
can you remove the try/catch altogether?
-ALexis

On 9 mars 2010, at 11:41, glassfish_at_javadesktop.org wrote:

> [code]
> import javax.ejb.EJB;
>
> public class AppClient {
>
> @EJB
> private static MyBean myB;
>
> public static void main(String args[]) {
> // MyBean myB = new MyBean();
> try {
> myB.hello();
> System.out.println(myB.hello()); // Display the string.
> } catch (Exception ex) {
> System.out.println("Got some exception");
> }
> }
> }
> [/code]
>
> As output i obtain:
> init:
> deps-jar:
> compile-single:
> run-main:
> [b]Got some exception[/b]
> BUILD SUCCESSFUL (total time: 0 seconds)
>
> I don't know how use kenai.
> [Message sent by forum member 'alexjava2008' (alekirk2004_at_yahoo.it)]
>
> http://forums.java.net/jive/thread.jspa?messageID=390833
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>