How can I store Java EE configuration parameters outside of an EAR or WAR?

See this question for reading properties file outside of the WAR file. See this question for reading variable values from JNDI. I believe that this is the best solution. You can read a String variable with this code: Context initialContext = new InitialContext(); String myvar = (String) initialContext.lookup(“java:comp/env/myvar”); The above code will work on all … Read more

Maven2: Best practice for Enterprise Project (EAR file)

You create a new project. The new project is your EAR assembly project which contains your two dependencies for your EJB project and your WAR project. So you actually have three maven projects here. One EJB. One WAR. One EAR that pulls the two parts together and creates the ear. Deployment descriptors can be generated … Read more