This is a scenario where there is an EJB 2.1 deployed in standalone JBoss environment. It depends on data source for its operations. If a shut-down command is issued the container will unload the data source even though the EJB may still need it.
If the EJB tries to lookup the data source in JNDI after shut-down command has been issued the following exception is thrown:
Caused by: javax.naming.NameNotFoundException: JBossDBDriverTester-XA2 not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.${company name}.util.db.DBHelper.getDataSource(DBHelper.java:115)
Any explicit dependencies defined between EJB and the data source are ignored.