Showing posts with label Tomee. Show all posts
Showing posts with label Tomee. Show all posts

April 03, 2014

How to deploy EJB 2.x in Tomee Server

TOMEE Server is an enterprise application server where you can deploy and run enterprise components such as EJBs.
Tomee uses OPENEJB framework to run EJBs in tomcat.
However, there are still some configurations and steps thats needs to be follow while deploying EJBs 2.x in TOMEE and make it run.
  1. Same as in another enterprise servers, we need to package EJBs in EAR file.
  2. EAR files cannot be deploy in webapps folder of TOMEE.
  3. To deploy EAR files, TOMEE have one more folder named as apps, where you can place enterprise related component jars/ears.
  4. By-default, this features is disabled and can be enable by editing tomee.xml which resides under conf folder.
  5. Just uncomment below line in tomee.xml and save the file
    <Deployments dir=\"apps\" />
  6. Restart the server, it will create a folder named apps besides webapps folder (If not then create the folder manually with same name and restart the server).
  7. Once the folder gets created, copy your EAR file there and again restart the server.
  8. Once the server gets restarted you will see extracted EAR folder and deployed EJBs in Tomee server console.
You can see EJBs details like ejbname, JNDI name , EJBID and other details in tomee server console.