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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:39:59+00:00 2026-06-16T05:39:59+00:00

Im was trying to build an example from book Im reading about JBoss 5

  • 0

Im was trying to build an example from book Im reading about JBoss 5 (JBoss AS 5 Developmet), however even the code directly from the book simply does not work.

This is my interface:

@Remote
public interface Mailer {

    public void sendMail(String aToEmailAddr, 
                         String aSubject, String aBody);

}

This is EJB that implements this interface

@Stateless  
@RemoteBinding(jndiBinding="remote/MailerEJB")

public  class MailerBean implements Mailer {... }

And this is the client application which tries to lookup the bean.

public class MailClient {
     public static void main(String[] args) throws Exception
       {
          InitialContext ctx = new InitialContext();
          Mailer mailer = (Mailer) ctx.lookup("remote/MailerEJB");


       }

}

When i try to run MailClient class ive got following exception

Exception in thread "main" javax.naming.NameNotFoundException: remote not bound

I also have jndi.properties file, which I added to the build path, and it looks like this>

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jnp.interfaces

Even in jmx-console I simply cant see remote/MailerEJB Bean.

Im using jboss-5.0.1.GA + JBDS + java 1.7.0

Can somebody help me out ?

  • 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-06-16T05:40:00+00:00Added an answer on June 16, 2026 at 5:40 am

    First of all you’ve to be sure that the EJB is properly deployed in the JBoss and the binding name it’s given, so if you can’t see the bean in the JNDIView of the JMX Console, it’s surely a deployment problem. To be sure that it’s correctly deployed you can check the JBoss logs in the moment of deploying the EJB (you ejb-jar or ear), look for a line similar to:

    EJBBindingName - EJB3.x Default Remote Business Interface
    

    In your case, if the binding you’ve defined is correct, it should be:

    remote/MailerEJB - EJB3.x Default Remote Business Interface
    

    This line indicates the real JNDI name that is given to the EJB, and it’s the one you’ve to use in your remote calls.

    On the other hand, try to remove the line between the annotations and the class definition:

    @Stateless  
    @RemoteBinding(jndiBinding="remote/MailerEJB")
    public  class MailerBean implements Mailer {... }
    

    Moreover in this post you can find specific instructions about how to make a remote call to an EJB from a simple command line Java program.

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

Sidebar

Related Questions

I am trying to get a simple example working from an assembly book I
I am trying to build a delphi project from the command line compiler Example:
I'm trying to build an example from GZipStream Class . With the command gmcs
I'm trying to build the following example from C? Go? Cgo! : package print
I've downloaded a source code from internet and I'm trying to build it with
I am just trying to compile some simple example code I typed in from
I am trying to build the hello.c example from http://www.glprogramming.com/red/chapter01.html (look for Example 1-2).
I'm trying to run the example from this question about using the BMC remedy
I am trying to run the example code from the MATLAB Doc, but when
I'm trying to build simplest Boost.Asio tutorial example "timer1" (it's in timer.cpp) with waf

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.