• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java EE 6, JAX-RS as EJB beans  RSS feed

 
Sergei Zhylinski
Ranch Hand
Posts: 89
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to everyone,

I downloaded Enthuware trial tests. One of tasks was to choose a correct JAX-RS resources implementation by EJB component. The right answers were:



But I can't create such a resource by myself. The beans are deployed and registered on containers successfully but when I try to access them through a client (browser) I am always getting 404 error.

Is this sample is a correct EJB implementation? Must the bean be packaged is a ejb or war module, what are the other ways to create JAX-RS root resources as EJB 3.1 beans?
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 3015
236
Android Chrome Eclipse IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

You have to use a "Dynamic Web Project" in Eclipse, so the bean is packaged in a war. Furthermore make sure you have an EE6-server (and not EE7 because you will have a different version of JAX-RS).

I have used Glassfish 3.1.2 as it includes Jersey (and you should know about Jersey on the exam).

This code example runs without problems:

URL: http://localhost:8080/[insert name of dynamic web project]/jax/rs/add/1/3
Output:
4


By the way: you can better ask questions on the Enthuware forums ( http://enthuware.com/forum/viewforum.php?f=40 ) because I will receive an email instantly.
 
Uwe Lindenberg
Ranch Hand
Posts: 44
2
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Frits,

thanks für the Enthuware test with the topic WebServices.

I got some questions concerning some answers.

Is it allowed to post it here? I would post some snippets from the test. My proxy (which is not changeable) does not allow discussing it at the Enthuware-forum.

Best regards and thanks in advance,


Uwe
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 3015
236
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Uwe,

I prefer to keep the feedback in one place because that is easier for all the customers. They also read the discussions about certain questions.

Just send me a PM.

Regards,
Frits
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!