2 Replies Latest reply on Mar 17, 2006 12:41 AM by Alexander Sack

    Rebinding EJB3 JNDI namespace

    Alexander Sack Novice

      I'm experimenting and I want to know if rebinding an EJB3's JNDI location a bad thing?

      I want to manage my EJB3 proactively and one of the issues is JNDI namespace collisions (foreign deployments interacting with my stuff that have similar names).

      I have some code that rebinds a STSB EJB3's JNDI location. That works, but unfortunately the bean never gets removed from JNDI during undeployment (I will guess its because I changed it underneath at @PostConstruct time). I initially tried to use the @PreDestroy lifecycle callback but that won't work either. since apparently STSBs never get destroyed during runtime.

      Am I just barking up the wrong tree here? I would rather proactively manage namespace than rely on @RemoteBinding/LocalBinding annotations.