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

  • Home
  • SEARCH
  • 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 7684521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:02:42+00:00 2026-05-31T19:02:42+00:00

I was going through a Jax-ws sample tutorial, my question is why we should

  • 0

I was going through a Jax-ws sample tutorial, my question is why we should use a EJB to implement a webservice? are there any other ways?

  • 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-31T19:02:43+00:00Added an answer on May 31, 2026 at 7:02 pm

    I assume that you put up your WebService somehow like this:

    @WebService
    @Stateless
    public class Webservice {
    
      @WebMethod
      public boolean returnTrue() {
        // your stuff here
        return true;
      }
    }
    

    You don’t really need the @Stateless-Annotation for your WebService to work and therefore you can waive to use EJB functionality in your Project.

    There are several ways of implementing WebServices in Java like JAX-WS or REST (JAX-RS).
    Additionally you can use supporting implementations like JAX-B or JAX-RPC.

    This is just a fraction of all the possibilities but it should be a good base to get you started.

    Hope this helpes, have Fun!


    EDIT:

    my question is why we should use a EJB to implement a webservice?

    Sorry, I didn’t focused on that the first time.
    As said above you don’t need EJB functionality to make a WebService work but it is most common to do this, because :

    • The invokation of a Bean within Java is simple (you can use Dependency Injection or a lookup)
    • You don’t have to generate your client-stubs for every WebService-class
    • You’re able to use the whole Java functionality from a Bean while WebServices are restricted. E.g. WebServices only allow sending simple datatypes between client and server (though it’s possible to send comlpex objects but it’s much more difficult)

    Hope this could make things more clear. Have Fun!

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

Sidebar

Related Questions

Going through the microsoft authentication tutorial listed here they have you create a master
Just going through the sample Scala code on Scala website, but encountered an annoying
Going through the Symblog tutorial of Symfony2, While creating forms I came to a
Going through Lynda's 2010 tutorial on rails and have been stuck on migration for
Going through the SproutCore Getting started tutorial and have a problem. Inside the Todos.todoListController
While going through a Zend tutorial , I came across the following statement: Note
Going through the Game Center / GameKit docs, I could not find any information
Going through some excercises to hone my binary tree skills, I decided to implement
Going through a tutorial for android (related to multithreading, loopers and handlers), i came
While going through the checkBox I found there is written CheckBox checkbox = (CheckBox)sender

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.