Skip to content

stasiukevych/ejb-env-parameters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EJB Environment Naming Context

Description

Project shows a simple example of injecting environment parameters through ejb-jar.xml. Using deployment descriptor file, you can set some constants/connection strings/url parameters etc.

Describe environment entry

For describing entry in ejb-jar.xml, you should follow the next structure:

<env-entry>
  <env-entry-name>connection</env-entry-name>
  <env-entry-type>java.lang.String</env-entry-type>
  <env-entry-value>jdbc:/mysql/ejb-env</env-entry-value>
</env-entry>

Deployment

Pay attention on deployment, in our example we are using the .war and structure will be the next src/main/webapp/WEB-INF/ejb-jar.xml, if you want to deploy as .ear you should use src/main/resources/META-INF/ejb-jar.xml.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages