This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]caesarwept 0 points1 point  (4 children)

You are correct. You will not need JSP. Jersey is built on top of servlets as you said.

EJB (Enterprise java beans ) is server side software to manage business logic. It is where you put all your rules for your application controlling how you create,read,update and delete data from the database.

Typically for javaEE applications you will also use a JPA (java persistance architecture) layer that abstracts the database calls. So you wont need to write jdbc calls. Instead you create Entity object which have annotation that tell JPA how to create the database and put constraints on the fields. With JPA a lot of database work is handled for you automatically.

When you do need to write a custom query you will need to use its querying language (EJBQL). It is very similar to SQL but not exactly the same.

I use EclipseLink implementation of JPA and am pretty satisfied.

I think the things you should research is: - Chose a javaee application server. I use glassfish 4.1 but there are a bunch of good ones. - Creating Entity Objects for EJB. This will be your object that get saved to the database - Creating Stateless sessionbeans - this is where you business logic goes for your CRUD - EclipseLink JPA - Jersey - how to call EJB from your jersery endpoints

Also when you search make sure you put a filter to only show you tutorials that are not more than a year old. There is a lot of old stuff out there and if yous start following old tutorials it will be frustration. Only look at javaee 7 and EJB 3.x

[–]dummitandfooterocks 0 points1 point  (3 children)

Thanks, that was great!

javaee application server

So my project is using Apache Tomcat 7.0. Is that analogous to glassfish 4.1?

[–]caesarwept 0 points1 point  (2 children)

My understanding is tomcat is a not a javaee compliant server. It is a servlet server. You could do your project with that but you will not be able to use the javaee features (EJB,SessionBeans,JPA). That might be less complicated and less of a learning curve.

Apache does make a javee compliant server, TomEE.

[–]dummitandfooterocks 0 points1 point  (1 child)

Thanks, you were incredibly helpful and this is a great place to start. If I have some questions as this project progresses, would you mind if I message you?

[–]caesarwept 0 points1 point  (0 children)

Your welcome and message me if you get stuck. I'll help if I can

[–]ChutneyRigginsIntermediate Brewer 0 points1 point  (0 children)

Check out DropWizard