1 Reply Latest reply on Jan 16, 2013 5:27 AM by jaikiran

    Server hangs because of missing resource

    lafr

      Using JBoss AS7-7.2.0-Alpha1-SNAPSHOT.

       

      Within my application I have SLSB containing this code:

      @Resource(name = "java:/Mail")

      private javax.mail.Session mailSession;

       

      An instance of this bean is used during deployment / startup of my ear-application by another class annotated with @WebListener from method contextInitialized.

       

      If the server has not yet been configured for mail (no mail-session with jndi-name "java:/Mail") the startup or deployment just hangs endless.

      Nothing in the logs to see what the problem is.

       

      Is the expected/wanted behaviour?

      At least an entry ito server.log of level INFO or WARN would be really helpful to find out what the server is missing.

      Better would be in my eyes to throw an exception because of the missing Resouce and fail the deployment.