4 Replies Latest reply on Aug 23, 2006 10:53 AM by Gavin King

    Calling Seam Components (Stateless EJB) outside Seam app. Po


      I have 2 Seam appllications (ears). When I call from one app, EJB method from another app I get NPE in Component class (getApplicationContext() returns null):

       public static Component forName(String name)
       return (Component) Contexts.getApplicationContext().get( name + ".component" );

      This method is called by SeamInterceptor (PostConstruct method -> getSeamComponent).

      When I first call this EJB in normal Seam way ( with @In and from its own application ) and then call it from other ear with @EJB this sometimes works. In other words: if method PostConstruct from SeamInterceptor is called outside seam application (with @EJB) then NPE is throwed.

      It is legal to call EJB's annotated with @name outside Seam app ?

      How to deal with such scenario:
      I have 2 Seam applications (separeted ears) event in one application should begin jbpm process in second application and pass paramers to its business context. Is this possible ? How ?