EJB Books

I have been programming on JSP/Servlets/Java Beans for one year. Now I want to learn EJB. Could you please tell me what books are good for me to start with?
Thanks!

If you can download large PDFs this is a bargain:
http://www.theserverside.com/books/masteringEJB/

Similar Messages

  • Can anybody recommend any good ejb book?

    Hi,
    I am looking for good ejb books, can anybody recommend any, please?
    I would like to have a good book to start with and then another book which could compliment the basics.

    A lot of effort went into the on-line review of "Mastering EJB 2" by Ed Roman et. al. at www.theserverside.com. The Server Side participants constantly reviewed the book while it was being written! I think it is the best book on EJBs, but don't take my word for it: check it out. You can download the book in non-printable PDF format from www.theserverside.com under the Resources tab. You'll have to sign up (for free) to download the book.

  • EJB books and tutorials

    Greetings,
    Can one recommend me some books on EJB and some tutorials on EJB ?
    Thanks!

    EJB: Enterprise Javabeans 3.0 (O'Reilly, isbn 975-0-596-00978-6)
    JPA: Pro EJB 3 - Java Persistence API (Apress, isbn 978-1-59059-645-6)
    These are the best two books I have read so far.

  • EJB Book

    i am buying on ejb from online.i can'tsee the contents of the book. i got the names of these books from amazon. i can't erally trust the reviews there. it would be really nice if you can tell me which book i should read for ejbs.
    Enterprise JavaBeans 3.0 (5th Edition) [ILLUSTRATED] (Paperback)
    by Bill Burke (Author), Richard Monson-Haefel
    EJB 3 in Action [ILLUSTRATED] (Paperback)
    by Debu Panda (Author), Reza Rahman (Author), Derek Lane (Author)
    Head First EJB (Brain-Friendly Study Guides; Enterprise JavaBeans) [ILLUSTRATED] (Paperback)
    by Kathy Sierra (Author), Bert Bates (Author)
    Beginning EJB 3 Application Development: From Novice to Professional (Beginning: from Novice to Professional) (Paperback)
    by Raghu R. Kodali (Author), Jonathan R. Wetherbee (Author), Peter Zadrozny (Author)
    Mastering Enterprise JavaBeans 3.0 (Paperback)
    by Rima Patel Sriganesh (Author), Gerald Brose (Author), Micah Silverman (Author)
    Bitter EJB [ILLUSTRATED] (Paperback)
    by Bruce Tate (Author), Mike Clark (Author), Bob Lee (Author), Patrick Linskey (Author)
    Special Edition Using Enterprise JavaBeans (EJB) 2.0      
    Special Edition Using Enterprise JavaBeans (EJB) 2.0 by Chuck Cavaness and Brian Keeton (Paperback - Sep 19, 2001)

    Mastering Enterprise JavaBeans 3.0 is by far the best one out of the list. However, advance topics are better found online.
    --Todd                                                                                                                                                                                                                                                                       

  • Why these EJB's are not worked.........................

    Hi all,
    Im using EJB 3.0 with Jboss 4.2. I deployed my ejb jar file and its client application (a war file) with EAR file.
    In my war I have servlet and Im trying to access my session bean through its local interface.
    Im following a example from 'O Rielly Enterprise Javabeans 3.0 5th edition'. I m tired so much with this application, finally thought to post my problem here.
    1. remote interface (from TravelAgent.jar)
    package com.titan;
    import javax.ejb.Remote;
    import com.titan.domain.Cabin;
    @Remote
    public interface TravelAgentRemote {
         public void createCabin(Cabin cabin);
         public Cabin findCabin(int id);
         public void sayHello();
    }2. Local interface (from TravelAgent.jar)
    package com.titan;
    import javax.ejb.Local;
    import com.titan.domain.Cabin;
    @Local
    public interface TravelAgentLocal {
         public void createCabin(Cabin cabin);
         public Cabin findCabin(int id);
         public void sayHi();
    }3. Session bean (from TravelAgent.jar)
    package com.titan;
    import javax.ejb.Stateless;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import javax.persistence.PersistenceContext;
    import javax.persistence.PersistenceContextType;
    import com.titan.domain.Cabin;
    @Stateless
    public class TravelAgentBean implements TravelAgentLocal, TravelAgentRemote{
         @PersistenceContext
         private EntityManager manager;
         //public static final String RemoteJNDIName = Tr
         //private EntityManagerFactory factory = Persistence.createEntityManagerFactory("titan");
         @Override
         public void createCabin(Cabin cabin) {
              manager.persist(cabin);
         @Override
         public Cabin findCabin(int id) {
              return manager.find(Cabin.class, id);
              //return null;
         @Override
         public void sayHello() {
              System.out.println("Hello EJB");
         @Override
         public void sayHi() {
              System.out.println("Hello EJB");
    }4. pesistence.xml (from jar's META-INF)
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
         <persistence-unit name="titan">
            <jta-data-source>java:comp/env/jdbc/sample</jta-data-source>
              <properties>
                  <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
                 <!-->property name="hibernate.hbm2ddl.auto" value="create-drop"/-->
              </properties>
         </persistence-unit>
    </persistence>5. Entity class
    package com.titan.domain;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.Table;
    @Entity
    @Table(name="cabin")
    public class Cabin implements Serializable{
         @Id
         @GeneratedValue(strategy=GenerationType.AUTO)
         @Column(name="id")
         private Integer id;
         //other fields and setters and getters
    }=========================================
    this is my servlet in war file.
    package test;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.ejb.EJB;
    import com.titan.TravelAgentBean;
    import com.titan.TravelAgentLocal;
    import com.titan.TravelAgentRemote;
    public class TestServlet extends HttpServlet{
         @EJB
         TravelAgentLocal travelAgentLocal;
         //@EJB TravelAgentBean travelAgentBean;
         @Override
         protected void doPost(HttpServletRequest req, HttpServletResponse resp)
                   throws ServletException, IOException {
              PrintWriter out = resp.getWriter();
              travelAgentLocal.sayHi();
    }this is my mssql-ds.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <datasources>
    <local-tx-datasource>
         <jndi-name>jdbc/sample</jndi-name>
         <use-java-context>false</use-java-context>
         <connection-url>jdbc:jtds:sqlserver://myip;databaseName=test;</connection-url>
         <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
         <user-name>sa</user-name>
         <password>bdcadmin</password>
         <min-pool-size>10</min-pool-size>
         <max-pool-size>20</max-pool-size>
         <blocking-timeout-millis>5000</blocking-timeout-millis>
    </local-tx-datasource>
    </datasources>I have set war's web.xml and jboss-web.xml properly.
    But in servlet it generates a NullPointerException. Ill post Exception and generated log here.
    ObjectName: persistence.units:ear=TravelAgent.ear,jar=TravelAgentEjb.jar,unitName=titan
      State: NOTYETINSTALLED
      I Depend On:
        jboss.jca:name=comp/env/jdbc/sample,service=DataSourceBinding
    ObjectName: persistence.units:ear=TravelAgent.ear,jar=TravelAgentEjb.jar,unitName=titan
      State: NOTYETINSTALLED
      I Depend On:
        jboss.jca:name=comp/env/jdbc/sample,service=DataSourceBinding
    ObjectName: persistence.units:ear=TravelAgent.ear,jar=TravelAgentEjb.jar,unitName=titan
      State: NOTYETINSTALLED
      I Depend On:
        jboss.jca:name=comp/env/jdbc/sample,service=DataSourceBinding
      Depends On Me:
        jboss.j2ee:ear=TravelAgent.ear,jar=TravelAgentEjb.jar,name=TravelAgentBean,service=EJB3
    ObjectName: jboss.j2ee:ear=TravelAgent.ear,jar=TravelAgentEjb.jar,name=TravelAgentBean,service=EJB3
      State: NOTYETINSTALLED
      I Depend On:
        persistence.units:ear=TravelAgent.ear,jar=TravelAgentEjb.jar,unitName=titan
    --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
    ObjectName: jboss.jca:name=comp/env/jdbc/sample,service=DataSourceBinding
      State: NOTYETINSTALLED
      Depends On Me:
        persistence.units:ear=TravelAgent.ear,jar=TravelAgentEjb.jar,unitName=titan
        persistence.units:ear=TravelAgent.ear,jar=TravelAgentEjb.jar,unitName=titan
        persistence.units:ear=TravelAgent.ear,jar=TravelAgentEjb.jar,unitName=titan
    ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS
      State: NOTYETINSTALLED
      Depends On Me:
        jboss.ejb:service=EJBTimerService,persistencePolicy=database
        jboss:service=KeyGeneratorFactory,type=HiLo
        jboss.mq:service=StateManager
        jboss.mq:service=PersistenceManager
    11:42:14,238 ERROR [[TestServlet]] Servlet.service() for servlet TestServlet threw exception
    java.lang.NullPointerException
              at java.lang.Thread.run(Unknown Source)
    12:02:11,946 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/sample' from JNDI name 'jdbc/sample'
    12:02:12,055 INFO  [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/sample' to JNDI name 'jdbc/sample'I cannot understand what is the above part from the exception. I think its a important description about bean deployment. It seems like there is a problem when reading it.
    Please If anyone knows please help me.
    These Ejb books teach us by giving source code and saying the way how it is developed or deployed, but I think when we get in to real job this way is not helpfull.
    ONE GOOD EXAMPLE IS REALLY ENOUGH. But unable to find such a example.
    regards,
    Dil.

    well one problem I see is that you removed the "hsqldb-ds.xml" file, which contains the DefaultDS datasource. One of the JBoss services depends on this datasource. You can find the declaration for this MBean in deploy/uuid-key-generator.sar/META-INF/jboss-service.xml. Change the "Datasource JNDI name" to your MySQL datasource name.
    However, I don't think this is the real problem you are having. It seems like the persistence unit is not being deployed properly, so somewhere in the log output there should be another exception that says why the persistence unit is failing. Most likely a typo in the XML.
    edit: hmm, failed to see the other thread on this topic... OP: please don't double post, it only leads to confusion!

  • How should I start with EJB programming?

    I have more than one year's programming experience in developing complicated data-driven web applications.
    Now I decide to use EJB to build new web applications, how should I start?
    Should I take a professional training class or just read several EJB books? I have Ed Roman's EJB book, it is great.
    Thanks for your reply in advance.
    James

    I think you start of by reading the EJB book by Ed Roman.It's free and availaible at www.theserverside.com.
    Read the first few chapters.
    Another good book is Richard-Monson Haefel's EJB published by Orielly.
    Start of by coding a few examples of stateless session beans on an easily deployable server like the J2EE server, available from this website.
    Your next aim should be to understand Entity beans and the issues surrounding container managed persistance and bean managed persistance.
    Voila in no time you wil be a champ.

  • Beginneer to J2EE, which book do you recommend me?

    Hi mates!
    I have a lot of experience in C++ and Java SE, but I never used J2EE.
    I would like to create an app that uses web interfaces, data bases (persistence) and a multithreaded server. I guess that is possible with J2EE, but no idea about Hibernate/Spring/JSF/Beans/WebFlow....
    What book do you recommend me to learn about that kind of things?
    Thank you very much for your help, I appreciate it a lot.

    I'd recommend to start with the free book [Core servlets 2nd edition|http://pdf.coreservlets.com] to learn about servlets & JSPs. In the mean time I'd find a good tutorial about JDBC and learn how to do database actions with Java.
    When you know that, the next step in my opinion would be to get the book [Enterprise Javabeans 3.0|http://www.amazon.com/Enterprise-JavaBeans-3-0-Richard-Monson-Haefel/dp/059600978X] , as it is still the best EJB book I know of.
    Finally if you want to go for the full package, I'd read [Pro EJB 3: Java Persistence API|http://www.amazon.com/Pro-EJB-Java-Persistence-API/dp/1590596455] or even its newer second edition, [Pro JPA 2|http://www.amazon.com/Pro-JPA-Mastering-Persistence-Technology/dp/1430219564] to stay up to date with the times. I haven't read the second edition yet, but the first one was an excellent book about the Java Persistence API.
    What remains would be a book about JavaServer Faces, if you want to use that as the view technology. I cannot really recommend a book about that.

  • A newbie of EJB: ask for the design

    I am now learning EJB. Now, I have the basic concept of EJB, e.g. Session
    Bean, Message-Driven Bean, Entity Bean. However, I am now trying to learn
    the design of the bean. I find it is quite difficult to design which type of
    bean should be created.
    Now, I want to create a web application which allows the user to
    add/edit/delete/view people information in a system. There is a table of
    People in the DB. So that there should be an entity bean of People. However,
    how should I design for the action of add, edit, delete and view?
    Thanks!
    Stephen

    read up at the www.theserverside.com. They also have a free EJB book.
    "Stephen Lee" <[email protected]> wrote in message
    news:3cb6dc05$[email protected]..
    I am now learning EJB. Now, I have the basic concept of EJB, e.g. Session
    Bean, Message-Driven Bean, Entity Bean. However, I am now trying to learn
    the design of the bean. I find it is quite difficult to design which typeof
    bean should be created.
    Now, I want to create a web application which allows the user to
    add/edit/delete/view people information in a system. There is a table of
    People in the DB. So that there should be an entity bean of People.However,
    how should I design for the action of add, edit, delete and view?
    Thanks!
    Stephen

  • Error converting j2EE-Specific ejb xml to object representation

    I am trying to webservice using Sun one. I got four entity beans and two sessions. I exposed the business of the session beans as webservice function.
    I tested the individual sesion beans they are working fine.
    When I created a webservice, and when I am trying to deploy the web service the follwing error occured.
    I tried to run the verrfier tool, but is not loading the file...it s getting stucked up.
    Here,
    BSApp -- J2ee application in which webservice is included
    BSManagerContrl --- is one of the two session bean which i created
    Book -- is the entity bean
    I also checked the module of the session bean to verify whether i included the Book enity bean or not. Other wise I would i successfully tested the session bean.
    Thank you
    [b][b]Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- Failed to load
    deployment descriptot for BSApp
    Cause: Error converting j2EE-Specific ejb xml to object representation
    BSManagerContrl_EJBModule.jar
    app_BSApp BSManagerContrl_EJBModule
    Referencing error: This bundle has no bean of name [Book]
    <ejb><ejb-name>Book</ejb-name><jndi-name>ejb/Book</jndi-name><pass-by-refernece>false</pass-by-reference><cmp><mapping-properties>

    Hi parsuram,
    Its not coming up anymore. All i did was re-map the table under Sun AS Mappings under properties for the EJBModule. Its really strange. Thanks a lot for your concern. I really appreciate it.

  • Why Threading is not allowed in EJB?

    Hello,
    I learnt that threading concepts is not allowed/used in EJB.
    can u please post your view, regarding the above question.
    Thanks

    Good mourning...
    EJB isn't used to web applications only, and also exist the Entity beans, the persistent beans and Message Driven Beans. EJB is a enterprise component that is deployed in Application Server. The AS harness the EJB instances amount. This amount is defined in ejb-jar.xml file. And, really, the EJB is thread-safety, thus only a client is connected in the specific time. For more and better information, read the Mastering EJB book, it's free download in theserverside.com, and this sections:
    - Several Entity Bean Instances May Represent the Same Underlying Data (pag. 114);
    - Entity Bean Instances Can Be Pooled (p�g 116).
    treat this specific issue.
    bye!

  • EJBs and Stored Procedures

    Hello!
    I want to bind an EJB (probably an BMP entity bean) to the result of a stored procedure.
    Can this be done? Are there any examples? thx

    You would be after the JDBC CallableStatement interface which is part of JDBC 2.0
    Most of the EJB books have a chapter on JDBC which will include it, there are probably examples on the web but I'm afraid I don't know where to find them.

  • Rules for EJB Application

    Hello,
    I am developing an ejb application. I am still learning and this is my first application.
    1) I am unable to understand where should use Entity Beans or session bean and why i mean how i justify my using Entity bean or session bean? If using entity beans how to decide that it should be BMP or CMP and why? how i justify using CMP or BMP?
    2) I have heard that Entity beans are related to Persistant data if so then if some application design has 50 to 75 tables then should there be those many Entity Beans corresponing to those tables? if i use 50 to 75 entity beans then what effect will it have on performance??
    it will be a great help if someone solve these queries by giving proper example. suppose in context a web application where vendors post there porduct to sell and different users come and purchase these products online.
    Thanxs

    Use session beans for business logic components and Entity beans for accessing persistent data. It is a common pattern to put up a "session facade" over the entity beans so that the client doesn't have to assume anything about storage and retrieval of data. You can have a 1-1 mapping between entity beans and database tables, but you don't have to. Read the online "Mastering EJB" book at www.theserverside.com to better understand the concept of EJB's.

  • Probmel with Local EJB JNDI Binding

    Hi friends,
    I am using jboss server. I need to deployee one session bean and one entity bean. and I have done it. but it show me jndi binding like this
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookBean' to jndi 'local/BookBean@18722656'
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookFacadeBean' to jndi 'local/BookFacadeBean@9668715'
    but it should be bind jndi bninding like this
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookBean' to jndi 'BookBean'
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookFacadeBean' to jndi 'BookFacadeBean'
    I don't understand where I am comminting mistake. I am giving ejb-jar.xml mapping below.
    <?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>
         <description>BookEJB</description>
         <display-name>BookEJB</display-name>
         <enterprise-beans>
              <session>
                   <display-name>BookFacade</display-name>
                   <ejb-name>BookFacadeBean</ejb-name>
                   <local-home>com.ejb.book.service.BookFacadeHome</local-home>
                   <local>com.ejb.book.service.BookFacadeLocal</local>
                   <ejb-class>com.ejb.book.service.BookFacadeBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
              </session>
              <entity>
                   <description>EntityBean</description>
                   <display-name>BookEntity</display-name>
                   <ejb-name>BookBean</ejb-name>
                   <local-home>com.ejb.book.persistence.BookLocalHome</local-home>
                   <local>com.ejb.book.persistence.BookLocal</local>
                   <ejb-class>com.ejb.book.persistence.BookLocalBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <abstract-schema-name>book</abstract-schema-name>
                   <cmp-field>
                        <field-name>bookID</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookName</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookAuthor</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookVersion</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookPrice</field-name>
                   </cmp-field>
                   <primkey-field>bookID</primkey-field>
                   <query>
                        <description>Query By All</description>
                             <query-method>
                                  <method-name>findAll</method-name>
                                  <method-params></method-params>
                             </query-method>
                             <ejb-ql>SELECT OBJECT(u) FROM book AS u </ejb-ql>
                   </query>
                   <query>
                        <description>Query for findByBookName</description>
                        <query-method>
                             <method-name>findByPrimaryKey</method-name>
                                  <method-params>
                                       <method-param>java.lang.Integer</method-param>
                                  </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookID=?1</ejb-ql>
              </query>
                   <query>
                        <description>Query for findByBookName</description>
                        <query-method>
                             <method-name>findByBookName</method-name>
                                  <method-params>
                                       <method-param>java.lang.String</method-param>
                                  </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookName=?1</ejb-ql>
              </query>
              <query>
                        <description>Query for findByBookAuthor</description>
                        <query-method>
                             <method-name>findByBookAuthor</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookAuthor=?1</ejb-ql>
              </query>
              <query>
                   <description>Query for findByBookVersion</description>
                   <query-method>
                        <method-name>findByBookVersion</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>SELECT OBJECT(u) FROM book AS u     WHERE u.bookVersion=?1</ejb-ql>
              </query>
              <query>
                   <description>Query for findByBookPrice</description>
                   <query-method>
                        <method-name>findByBookPrice</method-name>
                        <method-params>
                             <method-param>java.lang.Float</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookPrice=?1</ejb-ql>
              </query>
              </entity>
         </enterprise-beans>
         <assembly-descriptor>
              <container-transaction>
                   <method>
                        <ejb-name>BookBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <container-transaction>
                   <method>
                        <ejb-name>BookFacadeBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    I appreciate if you reply me on [email protected].
    Thanks in advance.
    TumoDav (UmaShankar)

    Hi friend,
    Thanks for replying me. But , I am unable to call this EJB by simple EJBClient (simple java file) when I am trying to call this ejb, then it show me this error :-
    javax.naming.NameNotFoundException: BookFacadeBean 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:296)
         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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:595)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at EJBClient.EJBClient.BookEJBClient(EJBClient.java:45)
         at EJBClient.EJBClient.main(EJBClient.java:30)
    Here I am giving my ejb client.
    package EJBClient;
    import java.util.Iterator;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import com.ejb.book.service.BookFacadeBean;
    import com.ejb.book.service.BookFacadeHome;
    import com.ejb.book.service.BookFacadeLocal;
    import com.ejb.book.vo.BookVo;
    * @author UmaShankar
    public class EJBClient {
         * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              BookEJBClient();
         public static void BookEJBClient(){
              String providerURL = "jnp://localhost:1099";
              String factoryName = "org.jnp.interfaces.NamingContextFactory"; //org.jnp.interfaces.NamingContextFactory
              String factoryPkgs = "org.jboss.naming:org.jnp.interfaces";
              Properties prop = System.getProperties();
              prop.put("Context.PROVIDER_URL", providerURL);
              prop.put("java.naming.provider.url", providerURL);
              prop.put("java.naming.factory.initial", factoryName);
              prop.put("java.naming.factory.url.pkgs", factoryPkgs);
              try{
                   Context ctx = new InitialContext(prop);
                   Object obj = ctx.lookup("BookFacadeBean");
                   BookFacadeHome home = (BookFacadeHome)PortableRemoteObject.narrow(obj, BookFacadeHome.class);
                   BookFacadeLocal local = home.create();
                   //java.util.Hashtable allD = local.getBookName();
                   System.out.println("-------------Start-------------------");
                   System.out.println("BookName:-"+local.getBookName());
                   System.out.println("BookAuthor:-"+local.getBookAuthor());
                   if(allD.isEmpty()){
                        System.out.println("There is no record. Empty Hash");
                   java.util.Set set = allD.keySet();
                   for(Iterator it = set.iterator();it.hasNext();System.out.println("-----------------------------")){
                        Integer key = (Integer)it.next();
                        BookVo vo = (BookVo)allD.get(key);
                        System.out.println(vo.getBookId());
                        System.out.println(vo.getBookName());
                        System.out.println(vo.getBookAuthor());
                        System.out.println(vo.getBookVersion());
                        System.out.println(vo.getBookPrive());
              }catch(Exception e){
                   e.printStackTrace();
    }

  • Can't seem to deploy EJB by following the 'Getting Started with WebGain Studio'

    Hi ,
    We're trying to evaluate the Weblogic 5.1 server with Webgain. We tried to
    follow the 'Getting Started with Webgain'
    example but when we tried to deploy the EJB it complained the error.
    Attached is the log from the VisualCafe.
    I need your help.
    Thank you very much.
    Quang.
    VisualCafe (21:54:20): sj -sysclasspath
    D:\VisualCafeEE\Bin\..\JAVA2\LIB\RT.JAR;D:\VisualCafeEE\Bin\..\JAVA2\LIB\TOO
    LS.JAR -g -d
    D:\WebGainStudio\Documentation\LibraryExample\BusinessLogic\Book\ -classpath
    VisualCafe (21:54:20):
    D:\WebGainStudio\Documentation\LibraryExample\BusinessLogic\Book\;d:\VisualC
    afeEE\java2\lib\rt.jar;d:\VisualCafeEE\java2\lib\dt.jar;d:\VisualCafeEE\java
    2\lib\i18n.jar;d:\VisualCafeEE\java2\lib\jaws.jar
    VisualCafe (21:54:20):
    ;d:\VisualCafeEE\java2\lib\plugprov.jar;D:\VisualCafeEE\JAVA\LIB\;D:\VisualC
    afeEE\JAVA\LIB\SYMCLASS.ZIP;D:\VisualCafeEE\JAVA\LIB\CLASSES.ZIP;D:\VisualCa
    feEE\JFC\SWINGALL.JAR;D:\VisualCafeEE\swing-1.1\S
    VisualCafe (21:54:20):
    WINGALL.JAR;d:\weblogic\license\;d:\weblogic\mssqlserver4v70\classes\;D:\Vis
    ualCafeEE\Bin\xutil.zip;D:\VisualCafeEE\Bin\Components\sfc.jar;D:\VisualCafe
    EE\Bin\Components\symbeans.jar;D:\VisualCafeEE\Ja
    VisualCafe (21:54:20):
    va\Lib\eradtools.jar;D:\VisualCafeEE\Java\Lib\eradpublic.jar;D:\VisualCafeEE
    \Java\Lib\dbaw.zip;D:\VisualCafeEE\Bin\Components\dbaw_awt.jar;D:\VisualCafe
    EE\Bin\Components\databind.jar;D:\VisualCafeEE\Ja
    VisualCafe (21:54:20):
    va\Lib\Collections.zip;D:\VisualCafeEE\Java\Lib\icebrowserbean.jar;D:\Visual
    CafeEE\Java\Lib\servlet.jar;D:\VisualCafeEE\Java\Lib\webserver.jar;D:\Visual
    CafeEE\Java\Lib\jspengine.jar;D:\VisualCafeEE\Jav
    VisualCafe (21:54:20):
    a\Lib\xml.jar;D:\VisualCafeEE\Java\Lib\symtools.jar;D:\VisualCafeEE\Bin\Comp
    onents\templates.jar;D:\VisualCafeEE\Bin\Components\vcejbwl.jar;D:\VisualCaf
    eEE\Java\Lib\javax_ejb.zip;D:\VisualCafeEE\Java\L
    VisualCafe (21:54:20):
    ib\JNDI.JAR;D:\VisualCafeEE\Java\Lib\jts.zip;D:\VisualCafeEE\Java\Lib\jdbc2_
    0-stdext.jar;D:\VisualCafeEE\Bin\sb\;D:\VisualCafeEE\Bin\sb\classes\sb.jar;D
    :\VisualCafeEE\Bin\Components\DreamweaverPlugin.j
    VisualCafe (21:54:20): ar;C:\Program Files\PhotoDeluxe
    2.0\AdobeConnectables\;d:\weblogic\eval\cloudscape\lib\cloudscape.jar -make
    -cdb BookEnterpriseBean.cdb
    VisualCafe (21:54:20):
    D:\WebGainStudio\Documentation\LibraryExample\BusinessLogic\Book\com\webgain
    \library\book\ejb\BookEJB.java
    VisualCafe (21:54:20):
    D:\WebGainStudio\Documentation\LibraryExample\BusinessLogic\Book\com\webgain
    \library\book\ejb\BookHome.java
    VisualCafe (21:54:20):
    D:\WebGainStudio\Documentation\LibraryExample\BusinessLogic\Book\com\webgain
    \library\book\ejb\Book.java
    VisualCafe (21:54:20):
    D:\WebGainStudio\Documentation\LibraryExample\BusinessLogic\Book\com\webgain
    \library\book\ejb\BookPK.java
    VisualCafe (21:54:23): Build Successful
    Internal VM (21:54:26): Starting deployment to WebLogic Server 5.1 ...
    Internal VM (21:54:26): Building deployment descriptor...Created 4 DD files
    Internal VM (21:54:26): Building generic JAR file...Created file
    D:\WebGainStudio\Documentation\LibraryExample\BusinessLogic\Book\BookEnterpr
    iseBean.jar
    Internal VM (21:54:26): Processing Jar...
    Internal VM (21:54:26): D:\VisualCafeEE\java\bin\..\bin\java.exe -classpath
    Internal VM (21:54:26):
    "d:\weblogic\lib\weblogic511sp.jar;d:\weblogic\lib\weblogic510sp2.jar;d:\web
    logic\lib\weblogic510sp1.jar;d:\weblogic\classes;d:\weblogic\lib\weblogicaux
    .jar;D:\VisualCafeEE\JAVA\LIB\;D:\VisualCafeEE\JA
    Internal VM (21:54:26):
    VA\LIB\SYMCLASS.ZIP;D:\VisualCafeEE\JAVA\LIB\CLASSES.ZIP;D:\VisualCafeEE\JFC
    \SWINGALL.JAR;D:\VisualCafeEE\swing-1.1\SWINGALL.JAR;.\;d:\weblogic\license\
    ;d:\weblogic\mssqlserver4v70\classes\;D:\VisualCa
    Internal VM (21:54:26):
    feEE\Bin\xutil.zip;D:\VisualCafeEE\Bin\Components\sfc.jar;D:\VisualCafeEE\Bi
    n\Components\symbeans.jar;D:\VisualCafeEE\Java\Lib\eradtools.jar;D:\VisualCa
    feEE\Java\Lib\eradpublic.jar;D:\VisualCafeEE\Java
    Internal VM (21:54:26):
    \Lib\dbaw.zip;D:\VisualCafeEE\Bin\Components\dbaw_awt.jar;D:\VisualCafeEE\Bi
    n\Components\databind.jar;D:\VisualCafeEE\Java\Lib\Collections.zip;D:\Visual
    CafeEE\Java\Lib\icebrowserbean.jar;D:\VisualCafeE
    Internal VM (21:54:26):
    E\Java\Lib\servlet.jar;D:\VisualCafeEE\Java\Lib\webserver.jar;D:\VisualCafeE
    E\Java\Lib\jspengine.jar;D:\VisualCafeEE\Java\Lib\xml.jar;D:\VisualCafeEE\Ja
    va\Lib\symtools.jar;D:\VisualCafeEE\Bin\Component
    Internal VM (21:54:26):
    s\templates.jar;D:\VisualCafeEE\Bin\Components\vcejbwl.jar;D:\VisualCafeEE\J
    ava\Lib\javax_ejb.zip;D:\VisualCafeEE\Java\Lib\JNDI.JAR;D:\VisualCafeEE\Java
    \Lib\jts.zip;D:\VisualCafeEE\Java\Lib\jdbc2_0-std
    Internal VM (21:54:26):
    ext.jar;D:\VisualCafeEE\Bin\sb\;D:\VisualCafeEE\Bin\sb\classes\sb.jar;D:\Vis
    ualCafeEE\Bin\Components\DreamweaverPlugin.jar;C:\Program Files\PhotoDeluxe
    Internal VM (21:54:26):
    2.0\AdobeConnectables\;d:\weblogic\eval\cloudscape\lib\cloudscape.jar"
    Internal VM (21:54:26): weblogic.ejbc -compiler
    d:\VisualCafeEE\java2\bin\javac.exe -classpath
    Internal VM (21:54:26):
    d:\weblogic\lib\weblogic511sp.jar;d:\weblogic\lib\weblogic510sp2.jar;d:\webl
    ogic\lib\weblogic510sp1.jar;d:\weblogic\classes;d:\weblogic\lib\weblogicaux.
    jar;d:\weblogic\lib\persistence\WebLogic_RDBMS.ja
    Internal VM (21:54:26): r;ejbcgen;
    D:\WebGainStudio\Documentation\LibraryExample\BusinessLogic\Book\_BookEnterp
    riseBean.jar -d
    D:\WebGainStudio\Documentation\LibraryExample\BusinessLogic\Book\BookEnterpr
    iseBean.jar
    Internal VM (21:55:04): WebGain Java! JustInTime Compiler Version
    4.00.002(i) for JDK 1.1.x
    Internal VM (21:55:04): Copyright (C) 2000 WebGain, Inc.
    Internal VM (21:55:04):
    Internal VM (21:55:04): . Jar Processing complete
    Internal VM (21:55:04): Deploying JAR...Delivering enterprise bean to
    WebLogic Server
    Internal VM (21:55:07): Unable to move jar to WebLogic ServerWebGain Java!
    JustInTime Compiler Version 4.00.002(i) for JDK 1.1.x
    Internal VM (21:55:07): Copyright (C) 2000 WebGain, Inc.
    Internal VM (21:55:07):
    Internal VM (21:55:07): Usage: DeliverJar serverURL systemPassword
    serverHome jarFileName
    Internal VM (21:55:07):
    Internal VM (21:55:07): Delivery Failed : WebGain Java! JustInTime Compiler
    Version 4.00.002(i) for JDK 1.1.x
    Internal VM (21:55:07): Copyright (C) 2000 WebGain, Inc.
    Internal VM (21:55:07):
    Internal VM (21:55:07): Usage: DeliverJar serverURL systemPassword
    serverHome jarFileName
    Internal VM (21:55:07):
    Internal VM (21:55:07): Cleaning up...Completed.

    Yes I checked it.  As far as I can see I did everything Apple said to do.  I took some screen shot so you can see how the screens are connected and what and where the code is, and what it does when I drag the cancel and done bar buttons to the exit

  • My view on EJBs

    http://www.greengiraffesolutions.blogspot.com/

    Elaborate reply: I agree that EJBs are unnecessarily condemned for various reasons which you have cited. They are, in fact, pretty good in a fair number of situations which require a robust and scalable architecture. However, your view on Spring equivalence -
    I can't see a better alternative to J2EE/EJB. People say use Hibernate. The persistence machanism is simpler than EJBs. Fine, but what are you going to use for transactions, security, scalability and directory service (ie. JNDI)? You could cobble together something in Spring and then use "bits" of J2EE like JTA and JMS. But that sounds much messier and harder to maintain than using J2EE/EJB outright.
    is very premature because you don't seem to have researched the other part. The statement is pretty biased. I do agree that I found EJBs simpler than Hibernate but that may be because my EJB book has a good explanation of all the concepts. shrug Well, I recently found a well-written book on Hibernate and the author is a regular on the forum. The book has some good reviews. Let's see if that gives me a better idea of Hibernate and how it could be an alternative to persistence (and also how simple / complex it is).
    Spring as a framework has a neat (not cobbled up) and pretty flexible and it does not attempt to eliminate the place of EJBs. I use EJBs with Spring in my present project and all I could say is that Spring has a good architecture in itself. It saves me the time of writing the framework components and truly reuse other technologies (including EJBs, web services, ...).
    And finally, was the intent of the article to target the millions of developers who could not handle complexity rather than the technology itself? ;)
    I would partially agree that EJB has been mostly discarded because most developers like to get away from complexities and they find EJB complex. Some do find it simple. The future EJB specifications are aiming at reducing complexity and improving the efficiency [I can't comment much because I haven't been into EJB 3 specifications yet].

Maybe you are looking for

  • How to run Excel 2011 from applescript for batch

    Every night at 2:00am, I want to convert an Excel spreadsheet to CSV.  I'm doing this on a Mac, with Excel 2011.  The following Applescript works sometimes: tell application "Microsoft Excel"           open "/Users/siemsen/PetesLookup/BPO.inventory.c

  • Choice displays only the first option.

    hi, I am having problem with the "Choice" menu i created. It is displaying only the first choice option, though i select other choices...Meaning, it's displaying only "23.0" whatever other values i select...any suggetions? Thanks in advance. public c

  • Help with error Netbeans 5.5.1 throws

    Hi all, I'm busy working on a project in J2EE using netbean 5.5.1 (project requirement). The project requires as to use Session, CMP and Message Driven Beans. My problem is with the Message Driven Beans while i know the code i am using is correct net

  • Plz Help...It is URGENT.JTREE

    Hi All: I am developing a Application where I am populating my Jtree from the database.Now the Problem is when I click on one of the Nodes of the Jtree,I am unable to populate the Jtree-window(along with the Jtree) with my JInternalFrame in one the S

  • Anyone notice character count when using foreign letters?

    Character count is typically 160 max when typing SMS, EXCEPT if you use one of the international keyboards (which I use a lot). I was just typing in Portuguese, and the character count dropped to 70 max. I had been writing to a Brazilian friend and s