• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Jsf - ejb3 problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to use jsf in combinatie with ejb 3 on websphere.
I have installed the websphere feature pack.

Jsf works fine, ejb 3 works also fine...
only the link between the 2 is not that fine....

when i try to access the ejb in the jsf backing bean:

public class WasProcessBean {

@EJB
private IWasProcessService wasProcessService;

Then the ejb is null.

But when i try to access the ejb from a servlet:

public class WasProcessServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {

@EJB
private IWasProcessService wasProcessService;

That the ejb isn't null...

What is wrong???
 
author & internet detective
Posts: 42003
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stijn,
Welcome to JavaRanch!

The specification says annotation based injection will work in Servlets and EJBs. Support in JSF backing beans is a vendor add on. My guess is WebSphere chose not to add it on. You would need to look up the EJB from the JNDI.
 
Always! Wait. Never. Shut up. Look at this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic