users@glassfish.java.net

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

From: <glassfish_at_javadesktop.org>
Date: Tue, 09 Mar 2010 03:07:08 PST

[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]

Output:
init:
deps-jar:
compile-single:
run-main:
Exception in thread "main" java.lang.NullPointerException
        at AppClient.main(AppClient.java:12)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
[Message sent by forum member 'alexjava2008' (alekirk2004_at_yahoo.it)]

http://forums.java.net/jive/thread.jspa?messageID=390838