Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6893417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:39:21+00:00 2026-05-27T06:39:21+00:00

In this tutorial: http://www.objectdb.com/tutorial/jpa/eclipse/ee/servlet Is @EJB GuestDao guestDao; merely a way of loading the

  • 0

In this tutorial: http://www.objectdb.com/tutorial/jpa/eclipse/ee/servlet

Is @EJB GuestDao guestDao; merely a way of loading the model on the page so it can be used? If I wasn’t in a servlet and didn’t have access to @EJB how would I load the model? Can I load models from other models?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:39:22+00:00Added an answer on May 27, 2026 at 6:39 am
    @EJB GuestDao guestDao;
    

    With that you are defining your servlet’s (could be another ejb) dependecy on the ejb GuestDao. When the servlet is instantiated by the container, it makes sure that it injects the ejb (servlet’s dependency) into the servlet.

    It works on local ejbs, whereas if it were a remote ejb then you would have to do a JNDI lookup.

    Check out the API Doc.

    Alternative to that would be to use something called EntityManager. Which can be injected into the servlet by by using the annotation @PersistenceContext if you are using container managed persistence. But you can also create it programmatically (when you are not in a servlet and don’t have access to @EJB) by using EntityManagerFactory.

    See example of how you would do that in a desktop application here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this tutorial: http://www.objectdb.com/tutorial/jpa/eclipse/ee/ejb I keep seeing words prefixed with @. Is there
I'm using this tutorial: http://www.objectdb.com/tutorial/jpa/eclipse/ee/ejb Is the persist function required? The class isn't extending
I am looking at this tutorial http://www.codeproject.com/KB/cpp/authforwebservices.aspx and I am wondering what the reason
I have been writting a keyword search script based on this tutorial: http://www.hackosis.com/2007/11/06/howto-simple-search-engine-with-php-and-mysql/ Like
I want to include Core Location and I'm trying to follow this tutorial: http://www.mobileorchard.com/hello-there-a-corelocation-tutorial/
Sorry for stupid questions, I'm doing everything as described in this tutorial: http://www.functionx.com/visualc/howto/calldlgfromdlg.htm I
I am using this tutorial to create a login form http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form/ It authenticates against
ajax tutorial on w3school at http://www.w3schools.com/ajax/ajax_database.asp In this function (function GetXmlHttpObject()), it creates a
http://www.codinghorror.com/blog/2008/04/setting-up-subversion-on-windows.html I am following this as a guide to install subversion. The tutorial at
I have followed this tutorial: http://www.phpjabbers.com/how-to-make-a-php-calendar-php26-6.html#comments to make a very basic calendar. My aim

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.