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 670387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:15:24+00:00 2026-05-14T00:15:24+00:00

I am using Netbeans 6.8 and Glassfish v3.0. I created an ejb module and

  • 0

I am using Netbeans 6.8 and Glassfish v3.0.

I created an ejb module and created entity classes from database and then created stateless session bean with remote interface. Say eg.

 @Remote
public interface customerRemote{
    public void add(String name, String address);
    public Customer find(Integer id);
}

@Stateless
public class customerBean implements customerRemote{
    //implementations of methods
}

Then i created a new web application. But now how do i access remote ejb’s in my web application. I could lookup a bean with jndi name but what i want to know is, what type of object it will return? How do i typecast it in customerRemote? I don’t have any class named customerRemote in my web application. So, how do i do it? Also, what about the entity class Customer? There is no such class named Customer in my web application also. All ejb’s and entity classes are in separate ejb module. Please help me 🙁

  • 1 1 Answer
  • 2 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-14T00:15:25+00:00Added an answer on May 14, 2026 at 12:15 am

    How do i typecast it in
    customerRemote? I don’t have any class
    named customerRemote in my web
    application. So, how do i do it? Also,
    what about the entity class Customer?
    There is no such class named Customer
    in my web application also. All ejb’s
    and entity classes are in separate ejb
    module.

    Your web application must depend on a library that contains these classes and interfaces. Then you will be able to import the interface and typecast as usual. You have two approaches:

    • All in one jar. This seems to be what you have now. In this case your web app needs to depend on this jar.

    • Split API and implementation. A better approach is to split your ejb module in two jars: one jar myModule-api contains the classes that belong to the API of your module. In this case that would be customerRemote and Customer. And another jar myModule-impl contains the implementation (the implementation depends on the API of course). Then in your web app, you only need to depend on the API which is in myModule-api.

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

Sidebar

Related Questions

I have created a Database Application using Netbeans, GlassFish and JavaDB. Now my controller
Using NetBeans 7.1 / GlassFish 3.1, I created a new TimerSessionBean. @Stateless public class
From Netbeans 6.9.1 I chose to include Glassfish 3 on install. I then created
I am using JSF 2.1, EJB 3.1, JPA 2.0, Glassfish 3.1.1 and NetBeans 7.0.1.
I'm using Netbeans... in the Glassfish server log I see INFO: Loading XML bean
I have created and EJB with a remote interface: @Stateless public class TestSessionBean implements
I'm using GlassFish 3.1.1. and NetBeans 6.9.1. In NetBeans, I created web application and
I am using netbeans glassfish bundle to create a webservice. I am adding operations
I have a jax-ws web service developped using netbeans 7 and glassfish 3.1.2 .
I am using netbeans 7.1, glassfish 3.1.1 and hibernate 4.01 I am using the

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.