New to EJB

hi all,
i am new to EJB...i have learnt servlets, jsp... with tomcat... i want to learn ejb..i have read some theoritcal tutorials... can anyone give the some sample programs or practical tutorials...with myecplise tooll...and jboss..integration....
thanks in advance..
--loguKK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Google is the best option..............

Similar Messages

  • New to EJBs  exception in client code

    Hi i am new to EJBs when i execute the client code it is giving the following exceptions
    can any one tell me the steps to execute a simple EJB session bean. what class paths and what config and what xml files are required??
    i followed so many tutorials but the problem is not solved
    thanks
    here is the exception i wrote the JNDI name as "HelloWorld" in the weblogic-ejb-jar.xml (i am using weblogic 8.1 application server)
    Full compiler error(s):
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:139: cannot resolve symbol
    symbol  : class HelloHome
    location: class jsp_servlet.__helloclient
            HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class); //[ /HelloClient.jsp; Line: 17]
            ^
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:139: cannot resolve symbol
    symbol  : class HelloHome
    location: class jsp_servlet.__helloclient
            HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class); //[ /HelloClient.jsp; Line: 17]
                              ^
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:139: cannot resolve symbol
    symbol  : class HelloHome
    location: class jsp_servlet.__helloclient
            HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class); //[ /HelloClient.jsp; Line: 17]
                                                                                   ^
    C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_FirstEjb_HelloClient\jsp_servlet\__helloclient.java:140: cannot resolve symbol
    symbol  : class Hello
    location: class jsp_servlet.__helloclient
            Hello hello = home.create(); //[ /HelloClient.jsp; Line: 18]
            ^
    4 errorsand the client jsp file is as follows
      <%@ page import="java.util.*"%>
    <%@ page import="javax.naming.InitialContext"%>
    <%@ page import="javax.naming.Context"%>
    <%@page language="java" contentType="text/html"%>
    <html>
        <head>
            <title>JSP Page</title>
        </head>
        <body>
            <%
                Properties props = System.getProperties();
                   out.println("SREENIVAS  FIRST EJB");
              try {
                   Context ctx = new InitialContext(props);
                Object obj = ctx.lookup("HelloWorld");
                HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
                Hello hello = home.create();
                   out.println(hello.hello());
                hello.remove();
                ctx.close();
            } catch (Exception e) {
                e.printStackTrace();
        %></body>
    </html>

    i got the output
    its working
    the change i did is
    i put all the remote,home and local interfaces in a package and added that package to a jar file.
    then i added the jar file to class path.
    import this package into your client class.
    thats it now just deploy your ejbmodule.jar and webapplication.war in the server and test the code
    bye bye

  • Can anyone assist me..new to ejb's

    hi all, i am new to ejbs..
    i have j2sdk1.4 on windows 2000 and able to run java programs..
    if i want to learn ejb's what software i needed and how to do settings..
    thx in advance

    Check out the sun tutorial. It'll get you started. You'll need ant and some sort of app server like tomcat or weblogic or webshere.

  • New to EJB, resources for EJB

    hi
    i'm new to ejb. can anybody suggest resources or links for learning EJB

    1. Get a good book. "Head First EJB" from O'reilly is a good investment.
    2. Hand on exercises. Try the Sun's J2EE tutorial.
    3. Study the spec.
    4. You're expert now.

  • New to EJB (Server Help Needed)

    I am new to EJB and I'm learning through a few books and online tutorials. The only problem is that when I try to use them, I get errors. I've done some researching and I think it has to do with my server setup. Here is what I have running and successfully configured:
    Apache Web Server
    Tomcat Container
    Java 2 SDK 1.4.0_01
    Java XML Pack (Winter 2002)
    I have Sun Studio 4 installed and I think that it installs J2EE but I'm not sure. Can someone help me understand where to go next? What do I have to install/configure to get the EJBs to work? Thanks, Jeremy

    Hello,
    J2EE is roughly about two things: Web applications beeing build out of Servlets, Jsp and HTML pages and a server-side component modell to deploy business logic in EJBs.
    Now for the Web part (generating dynamic HTML content etc.) you have what you need. Tomcat is doing just find. To deploy EJBs, you need an application server which has an EJB container. I don't know the Studio 4 but my understanding is that it is an IDE helping you to develop software, not an application server. You have to install such an appserver.
    My recommendation: go and download BEAs Weblogic 7.0 (www.beasys.com).This is a commercial product but it comes with a 30 day trial license. BEA provides a rather good online docu. Play with this appserver and deploy some EJBs.
    Alternatively there is also a free appserver: JBoss (www.jboss.org) but I have never used it. Yet, they have also online docu and forums to help you through.
    good luck,
    einar

  • New project ¿EJB 2.1 vs. EJB3?

    We are about to startup a new J2EE-based project. The expected number of lines is bigger than 200K lines of business logic (this prediction is based on the old system we're migrating to J2EE). The deadline is Q3 2006 and we have a in-depth background on J2EE 1.4 technologies (JSF, EJB 2.1, JSP, Servlets, etc., OC4J).
    The critical decision is which EJB's version we should be using in our project.
    Two options are considered:
    1. EJB 2.1. Drawbacks: our code will be obsolote by the time the project is finished and the need for a new migration project to updgrade to EJB 3.0.
    2. EJB 3: Drawbacks: Oracle may not support this specification for its application in production environments by the time the project is finished.
    ¿What do you think could be the best choice ?
    Regards.

    Oracle 10.1.3 Developers Preview 4 supports EJB 3.0.
    Question -- When is 10.1.3 going to go production ? Our bussiness decision is depending upon it .. so please give some realistic date.
    Thanks.
    --Anand                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • New to EJB, JMS

    I recently started to understand the concepts and examples around EJB, JMS, servlets. Now I am trying to understand how does UserTransactions (JTA) works in an environment where there is a TIBCO server that handles the queues and transactions to Oracle that gets handled by JBoss. I am just trying to understand what happens between utx.begin and utx.commit or utx.rollback when there are calls specific to JMS and JDBC are involved (in my case Tibco and Jboss). Does everything gets rolled back or commit ? I couldn't find any material that clears such concept. Best I could get was some information about Bean Managed transaction in JavaEE 5 tutorial. It would be great and helpful if someone could direct me to good resources or if somebody could explain it to me.

    JTA can make your queue and database a single unit of work. If the database process fails, the message is put back on the queue. You have to use XA database drivers and two-phase commit.
    For somebody who's new, this is a pretty advanced topic.
    %

  • New to EJB encounter javax.naming.NoInitialContextException

    HI, I am using j2ee 1.4 sdk to test my first EJB,
    in client code:
    InitialContext initialContext = new InitialContext();
    // lookup InterestCalculator EJB
    Object homeObject =
    initialContext.lookup( "InterestCalculator" );a Exception throwed!
    I think it is because I need to setup JNDI environment, but I don't know how to
    do it.
    Can anybody give me some tips?

    Hi,
    Use the following:
    Properties env = new Properties();
    env.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
    env.put("java.naming.provider.url", url);
    initial = new InitialContext(env);
    objref = initial.lookup(jndiname);where
    URL refers to the application server running on a machine with hostname (e.g. ashost) and with an ORB-port (e.g. 3700 as default port). For example,
    iiop://ashost:3700
    JNDIName matches in the deployment file. In the example, it is rmiconverter which can be found as
    <jndi-name>rmiconverter</jndi-name> in the file,
    <install_dir>/samples/rmi-iiop/simple/src/sun-ejb-jar.xml.
    -Amol

  • New bie ejb

    hi ,
    i am relatively newbie to ejb, i have been learing ejb for last week , having going through some stuff in ejb 2.1/3.0 versions i am relatively confused of difference ejb stuff here.
    what is the possible better version to start the ejb with, and can someone tell me the some differences in ejb 3.0 and ejb 2.1 stuffs.
    thanks in advance.

    If you're new to the technology you should definitely start with EJB 3.0. EJB 3.0 takes a POJO approach to writing ejb components so there are many fewer classes/interfaces to write and the rules for writing
    them are much simpler than before. There is also a much better API for handling persistent data called
    the Java Persistence API. Java Persistence API entities are not EJB components, but they can be
    used from EJB components (session beans, message-driven beans) as well as from other Java EE
    components.
    The Java EE 5 Tutorial is a good place to start :
    http://java.sun.com/javaee/5/docs/tutorial/doc/
    We also have an EJB FAQ and some simple examples here :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
    https://glassfish.dev.java.net/javaee5/ejb/EJB30.html
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • What's New in EJB 3? Free Seminar - Patrick Linskey - October 6th - London

    The BEA User Group, Skills Matter and SolarMetric are pleased to invite you to a free seminar on EJB 3 Persistence, which will take place in London on October 6th and is organised by the BEA User Group.
    EJB 3 expert group member and Bitter EJB author Patrick Linskey will introduce the audience to the EJB 3 Persistence specification.
    EJB 3 expert group member and Bitter EJB author Patrick Linskey will introduce the audience to the EJB 3 Persistence specification. Patrick will provide background on where EJB 3 Persistence came from and how it meets the goal of making EJB simpler. Patrick will then go through the details of the EJB 3 persistence specification with lots of code examples.
    By the end of the session, the audience should have a firm grasp on the basics of EJB 3 persistence including annotations for representing mappings and EJB QL, the benefits of using a POJO persistence model like EJB 3, and how to use EJB3 Persistence both when deploying to an appserver and in a J2SE application.
    For more information or to register, go to: http://skillsmatter.com/menu/210
    Skills Matter is a leading provider of training, mentoring and project based skills transfer in agile software development. We provide Java training, UML training, RUP, XP and TDD training and many other courses. For more information about Skills Matter, go to: http://www.skillsmatter.com
    The BEA User Group UK is a free, informal group of users of BEA products, run by volunteers. The group launched in April 2005 and aims to hold 4 regular meetings a year in the London area. For more information about the BEA User Group UK, go to: http://www.beaug.uk.com
    SolarMetric is the provider of Kodo JDO, SolarMetric's robust, high-performing, feature-rich implementation of the Java� Data Objects specification for transparent persistence. For more information about the SolarMetric, go to: http://www.solarmetric.com

    Hi Etteloc,
    Welcome to the community and thanks for posting!
    I'm sorry that your Mum's telephone service has developed a fault and also for the length of time this has taken to sort out.  I completely understand the circumstances and how vital it is for her to have a working telephone service. 
    No need to worry as I can get things sorted from here.  Click on my username and under the section "about me" you'll see the link to get in touch with us.  Please include the link to this thread when you complete the form.
    Once completed, post back with something along the lines of "details sent" (without pasting the reference number) and I'll arrange for it to be picked up as soon as possible.
    Thanks a million,
    Robbie
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Can not find my EJB's from my Servlet

    Hi
    I am new to EJB and am trying to get a Servlet to call some sessionless EJB beans. I have got it working in JDeveloper but when I deploy it to orion application server I keep getting a javax.naming.NameNotFoundException exception throw from the Servlet when it tries to find the first EJB.
    The code in the Servlet is:
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "admin");
    env.put(Context.SECURITY_CREDENTIALS, "jewels");
    // env.put(Context.PROVIDER_URL, "ormi://localhost:23891/current-workspace-app");
    env.put(Context.PROVIDER_URL, "ormi://localhost:23791/dev");
    Context ctx = new InitialContext(env);
    System.out.println("Getting mapping class ejb");
    //mapping
    ExponentMappingServiceHome mappingHome = (ExponentMappingServiceHome)ctx.lookup("ExponentMappingServiceHome");
    ExponentMappingService mapping = mappingHome.create();
    My EJB xml looks like this:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <description>Session Bean ( Stateless )</description>
    <display-name>ExponentMappingService</display-name>
    <ejb-name>ExponentMappingService</ejb-name>
    <home>com.exponent.ejb.service.map.ExponentMappingServiceHome</home>
    <remote>com.exponent.ejb.service.map.ExponentMappingService</remote>
    <ejb-class>com.exponent.ejb.service.map.ExponentMappingServiceBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <description>Session Bean ( Stateless )</description>
    <display-name>ExponentMappingViewsService</display-name>
    <ejb-name>ExponentMappingViewsService</ejb-name>
    <home>com.exponent.ejb.service.map.ExponentMappingViewsServiceHome</home>
    <remote>com.exponent.ejb.service.map.ExponentMappingViewsService</remote>
    <ejb-class>com.exponent.ejb.service.map.ExponentMappingViewsServiceBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <description>Session Bean ( Stateless )</description>
    <display-name>FalconService</display-name>
    <ejb-name>FalconService</ejb-name>
    <home>com.exponent.ejb.service.FalconServiceHome</home>
    <remote>com.exponent.ejb.service.FalconService</remote>
    <ejb-class>com.exponent.ejb.service.FalconServiceBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    I have been trying for a while to get the JNDI naming right but everything I try gets the above error. Any help would be great.
    Thanks
    Andre

    You have to lookup for "ExponentMappingService", and not "ExponentMappingServiceHome"
    The name you give in the <ejb-name> tag in ejb-jar.xml is the JNDI name of the EJB. This is the name u have to look up.

  • EJB Finder View Links and CMR

    Hi,
    Can someone please give me some input on the following warning in the JDeveloper online help!
    "Warning: You cannot create an EJB finder view link that expresses the same relationship as a CMR."
    I'm new to EJB, BC4J and JDeveloper. I created container managed entity beans with local interfaces only to represent my data and relationships. No problems with the mapping so far.
    To test the beans I used Session Facades with remote interfaces and build a sample test client.
    Now I thought I could create EJB Entity Facades, EJB Finder View Objects, EJB Finder View Links and EJB Application Modules to make use of the BC4J framework in order to speed up programming clients (JSP and JClient).
    So I've started studying the JDeveloper online help (which seems to be very useful) and found the above mentioned warning.
    Well, better a warning than nothing at all, but some more explanations would have been even better.
    Is there no need to use view links with CMR?
    How to achieve the same functionality (synchronizing two view objects in a master-detail-relationship) with CMR?
    Do you know any examples? I couldn't find any examples using EJB entity facades in the "sample code" area on OTN.
    Any comments about other (better) architectures are also welcome. Would it be better to use BMP entity beans in conjunction with BC4J?
    Many thanks for your help!
    Regards,
    Eric

    Steven,
    thank you for your reply and suggestions - I'll count on that. If I find time I'll read this book. It seems to be very interesting.
    For educational purposes I'd like to look at both persistence implementation strategies. I agree that it looks definitly easier to use entity objects. Certainly it's also performancewise a better choice.
    Anyhow, could you give me some useful tips for cmp entity beans and finder view objects?
    Is there something which works completely different if I use BC4J on top of it?
    How to implement a master-detail relationship in JClient (Swing) for example?
    What about writing an ejbfinder which doesn't return all, but all data where the foreign key is equal to a parameter passed to the finder method and use this as the source for a detail view object. This could be the primary key of the selected master. Well, I don't know whether this is doable. But that's what comes to my mind spontaneously.
    Would this be a solution? I'm still thinking about the aforementioned warning in the online help regarding view links.
    I guess the problem is that the foreign key is not part of the entity bean as it's not a cmp-field. Instead you have accessor methods to retrieve a related object or a collection of objects.
    I'm sure my questions are not too complicated to answer. It's only hard for a beginner to get an overview.
    I'm quite confident that I'll manage this if I give my best and get some help from knowledgeable people like you Steven.
    Regards,
    Eric

  • Error while running EJB from java client on JBOSS

    Hi
    As i am new to EJB i have created a helloworld application in ejb which is working fine when i try to call it from servlet but when i try to invoke the same ejb from java client (i.e from diff jvm) on jboss i got the following error:
    javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1399)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.gl.TestClient.main(TestClient.java:39)
    Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:254)
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
         ... 4 more
    Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:228)
         ... 5 more
    Caused by: java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:469)
         at java.net.Socket.<init>(Socket.java:366)
         at java.net.Socket.<init>(Socket.java:266)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:224)
         ... 5 more
    Following is my code:
    Home Interface:
    package com.gl;
    import javax.ejb.CreateException;
    public interface testHome extends EJBHome {
         String JNDI_NAME = "testBean";
         public     test create()
         throws java.rmi.RemoteException,CreateException;
    Remote Interface:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBObject;
    public interface test extends EJBObject {
         public String welcomeMessage() throws RemoteException;
    Bean:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class testbean implements SessionBean {
         public void ejbActivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbPassivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbRemove() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void setSessionContext(SessionContext arg0) throws EJBException,
                   RemoteException {
              // TODO Auto-generated method stub
         public void ejbCreate(){}
         public String welcomeMessage(){
              return "Welcome to the World of EJB";
    ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>testBean</ejb-name>
    <home>com.gl.testHome</home>
    <remote>com.gl.test</remote>
    <ejb-class>com.gl.testbean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    jboss.xml:
    <?xml version='1.0' ?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
    <jboss>
    <enterprise-beans>
    <entity>
    <ejb-name>testBean</ejb-name>
    <jndi-name>testBean</jndi-name>
    </entity>
    </enterprise-beans>
    </jboss>
    Client code:
    package com.gl;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class TestClient {
         public static void main(String[] args) throws Exception{
                   try{
                   /*     Properties props=new Properties();
                        props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                        props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
                        props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
                   Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.jnp.interfaces.NamingContextFactory");
    props.put(Context.PROVIDER_URL, "localhost:1099");
                        System.out.println("Properties ok");
                        //env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContextFactory");
                        //env.put(Context.PROVIDER_URL,"http://localhost:8080");
                        //env.put(Context.SECURITY_PRINCIPAL, "");
                        //env.put(Context.SECURITY_CREDENTIALS, "");
                        Context ctx=new InitialContext(props);
                        System.out.println("context ok");
                        //testHome home = (testHome)ctx.lookup("testBean");
                        Object obj = ctx.lookup ("testBean");
                        System.out.println("ojb = " + obj);
                        testHome ejbHome = (testHome)PortableRemoteObject.narrow(obj,testHome.class);
                   test ejbObject = ejbHome.create();
                   String message = ejbObject.welcomeMessage();
                        System.out.println("home ok");
                        System.out.println("remote ok");
                        System.out.println(message);
                        catch(Exception e){e.printStackTrace();}
    I am able to successfully deployed my ejb on JBOSS but i m getting above error when i am trying to invoke ejb from java client.
    kindly suggest me something to solve this issue.
    Regards
    Gagan
    Edited by: Gagan2914 on Aug 26, 2008 3:28 AM

    Is it a remote lookup? Then maybe this will help:
    [http://wiki.jboss.org/wiki/JBoss42FAQ]
    - Roy

  • Performing database operations using EJB 3.0

    I need to create a session bean that will perform operations on backend database. I am new to EJB 3.0 and need a gentle guidance to the solution
    This is what I believe is suppose to be done
    1. Create stateless bean interface marking operations.
    2. Create bean implementation for above
    3. Init stage will require me to connect to the Oracle database. Now am confused how will it get the connection details? Is there a way to extract the url username and password using resource bendle which can be accessed from within bean implementation?
    4. Bean method will perform update, read oprations
    5. Predestroy will close the connection
    6. A client will simply call this ejb with some input parameter(s)
    Please let me know if am doing anything wrong here

    If you use EJB technology for which it is designed, the container (server) will manage the transaction (and also the connections to the database) for you, so no creation or cleanup of connections on your part. I advise you to read into JPA which is designed to be used in conjunction with EJB tech. The books Enterprise Javabeans 3.0 and Pro EJB 3: the Java Persistence API may help you a lot.

  • EJB 3.0 - problem with persistence unit.

    Hi everybody, I got this problem I would like you to help me.
    I'm doing a proyect with EJB 3.0 using Netbeans 5.5 and Jboss
    The data source is MySQL.
    When I deploy the proyect, the Jboss Log show me this:
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    [Please help me, I'm kind of new in EJB]
    [ENTIRE JBOSS LOG]
    10:08:37,375 INFO [TomcatDeployer] undeploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16823DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
    10:08:37,515 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:37,515 INFO [EARDeployer] Undeployed J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:37,546 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:39,281 INFO [Ejb3Deployment] EJB3 deployment time took: 47
    10:08:39,296 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU with dependencies:
    10:08:39,296 INFO [JmxKernelAbstraction]      jboss.jca:name=jdbc/connectionPool,service=ManagedConnectionFactory
    10:08:39,312 WARN [ServiceController] Problem starting service persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    javax.naming.NameNotFoundException: jdbc not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:240)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:99)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy91.start(Unknown Source)
    at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:82)
    at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:626)
    at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:475)
    at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy36.start(Unknown Source)
    at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
    at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
    at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
    at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
    at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy37.start(Unknown Source)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
    at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy6.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
    10:08:39,812 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3 with dependencies:
    10:08:39,812 INFO [JmxKernelAbstraction]      persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    10:08:39,828 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3 with dependencies:
    10:08:39,828 INFO [JmxKernelAbstraction]      persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    10:08:39,859 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-ejb.jar
    10:08:39,859 INFO [TomcatDeployer] deploy, ctxPath=/DecmoCVLAC-war, warUrl=.../tmp/deploy/tmp16824DecmoCVLAC.ear-contents/DecmoCVLAC-war-exp.war/
    10:08:40,046 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.0.4.GA/server/default/deploy/DecmoCVLAC.ear
    10:08:40,062 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
    --- MBeans waiting for other MBeans ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    State: NOTYETINSTALLED
    I Depend On:
    persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    ObjectName: jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3
    State: NOTYETINSTALLED
    I Depend On:
    persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: persistence.units:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,unitName=DecmoCVLAC-ejbPU
    State: FAILED
    Reason: javax.naming.NameNotFoundException: jdbc not bound
    I Depend On:
    jboss.jca:service=ManagedConnectionFactory,name=jdbc/connectionPool
    Depends On Me:
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=NewMessage,service=EJB3
    jboss.j2ee:ear=DecmoCVLAC.ear,jar=DecmoCVLAC-ejb.jar,name=PersonaEntityFacade,service=EJB3

    Reason: javax.naming.NameNotFoundException: jdbc not bound
    Although i am quite new to this as well i would say that there is a problem with your connection with the database.
    It seems it cannot connect to Mysql.
    have you download the mysql package library and imported it ?
    Also in your deploy folder in you Jboss
    have you altered the jdbc to connect to you database in your dataset ? ( i am not sure about mysql, but postgre reguired this)
    Most probably it would be the same in mysql.
    <connection-url>jdbc:postgresql://127.0.0.1:5432/Dissertation</connection-url>
    Not sure if this is what you reguire, i am new at this my self

Maybe you are looking for

  • Viewing External video through HDV Camera!?

    I am trying to record some footage on to an HDV tape. The camera I am attempting to use as a deck is the Sony HDR-HC5 (it is a consumer based camera) I have my sequence set up as the preset for HDV1080i. But for some reason I can not get an image on

  • How to reset keychain. Tried so many times, not working!

    frustrating...i want to reset my keychain password...coz I have forgotten what it is...tried the steps given by apple but still not working!!!! Help!

  • Can you still not pair the iPad 2 to an iPhone

    I have been trying to pair my iPad 2 to my iPhone 4 via Bluetooth, when I turn on Bluetooth they both just stay in searching mode. I read that you couldn't do this but it was from last year so I'm wondering is this is still the case. Thanks in advanc

  • Hide songs in iCloud on my phone

    I recently purchase iMatch and now have lots of songs in the cloud, more songs than will fit on my phone.  I want to set my phone up, so that I only see songs I have downloaded to my phone on my phone.  I dont want to see everything in iCloud on my p

  • Servlet on weblogic server

    hi,