On Aug 7, 2008, at 9:11 AM, Karan Malhi wrote:


I think OPENEJB-516 (https://issues.apache.org/jira/browse/OPENEJB-516 ) can be closed, as the plugin will now add the javaee-api and openejb-client JARs to the classpath of projects associated with its runtime - does anyone
have any thoughts on this?

I also think OPENEJB-525 (
https://issues.apache.org/jira/browse/OPENEJB-525) can be closed as the
plugin is now built with Maven.


Yes, these issues should be closed.
Also, I think David just implemented the DependsOn functionality. What do you think about generating a dependency graph in eclipse? i.e the plugin could scrape through the EJB's / descriptors and generate this graph (which
could possibly also be modified).

Along those lines what would be really cool is if the tool could add the @DependsOn automatically for a user.

A singleton needs a @DependsOn declaration only when referring to (invoking) another singleton in either its @PostConstruct or @PreDestroy method. I don't know if it's possible, but if there was some way spot that and add the @DependsOn for them, that'd be really cool.

As an example, the bean has this:

@Singleton
@Startup
public class RedBean {

  @EJB(beanName="BlueBean")
  private BlueLocal blue

  @PostConstruct
  public void startup() {

  }
}

and all is fine, but when they add this to the @PostConstruct method...

  @PostConstruct
  public void startup() {
      blue.doSomeWork();
  }

At that point you need to add the @DependsOn like so:

@Singleton
@Startup
@DependsOn("BlueBean")
public class RedBean {
   ...
}

Don't know if that's possible, but would be cool.

-David

Reply via email to