This discussion is archived
2 Replies Latest reply: Sep 4, 2012 3:34 AM by 945856 RSS

Standard way of naming jndi resources

945856 Newbie
Currently Being Moderated
Are you kidding me? The way of naming a jndi resource is not standardized? In JBoss the name of the datasource has to start with "java:/" while in Glassfish the name can not have a ':' in it!?!? Is this true? So it is not possible to create a valid jndi-name that works for both JBoss and Glassfish?
  • 1. Re: Standard way of naming jndi resources
    gimbal2 Guru
    Currently Being Moderated
    Since JEE6 there is more standardization for JNDI resource naming. But before that it was a giant mess, yes. The first way to combat such issues that was introduced with JEE5 was the addition of resource injections to not have to do manual JNDI lookups, in stead the container deals with that stuff for you. But injection was only possible in container managed resources, so it wasn't automated away entirely.

    In any case, the "problem" is not so huge that you have to start thinking people are kidding you. Believe me, there are far worse issues you'll run into when migrating from one container to another when you do more than basic web stuff with a single persistence unit.
  • 2. Re: Standard way of naming jndi resources
    945856 Newbie
    Currently Being Moderated
    ;-)
    Yes, I totally understand that there are several problems when moving from one container to another one, but it felt a bit ironic that the standard for naming resources does not have a standard for naming the jndi resource it self.
    But I agree that it is not a huge problem...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points