-1

I created a simple project JAVA EE with GlassFish to implement a simple REST API. During this project, I created a jdbc pool connection (with the glassfish interface) with postgresql and use EJB and Jersey to store my data in the database. There is no problem but now I would like to do the same with Tomcat to deploy on bluemix but I don't really understand...

I created a web project dynamic with tomcat 8.5 on Eclipse, created a simple jsp file to test and deploy it on bluemix, that works ! But now I would like to connect a database to my tomcat application like before, I googled it but I don't understand if it is possible and how to do this... Anybody can help me please ?

Thank in advance :)

ralphearle
  • 1,696
  • 13
  • 18
piupiu34
  • 21
  • 1
  • 7

2 Answers2

0

You cannot deploy EJBs in Tomcat because it only implements the servlet and JSP specifications from Java EE.

Steve C
  • 18,876
  • 5
  • 34
  • 37
0

You can use TomEE which is a full EE stack based on Tomcat but includes OpenEJB, OpenJpa etc. In their site you can find how to deploy TomEE as a war in a plain Tomcat in case that you want to use your existing Tomcat installation. Check the links below

TomEE Home

TomEE deployement as war

TomEE Datasource configuration

garfield
  • 571
  • 9
  • 21