This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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

 
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?
 
Creator of Enthuware JWS+ V6
Bartender
Posts: 3112
256
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.
 
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
Bartender
Posts: 3112
256
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!