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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

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

    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..............

  • New bie needs help on how to start...

    Hi there java gurus,
    I am very new to java & I have a little knowledge on the java architechture. I have some experience in web scripting languages like PHP, ASP & javascript/vbscripts etc.
    I want to master java. I want to be able to create java GUI applications that connects to database and do the required stuffs. I have little experience on creating java applets.
    But now I want to start with creating a GUI application to store my personal accounts. Later I want to convert that into a commercial one.
    My questions are:
    What free database I can use for my application?
    Developing GUI application in java is advisable? ie is java GUI faster to develop than developing in MS VB & VB.net?
    Can java code be protected? or it is easy to decompile? A friend of mine told something about decompiling jars.
    I understand that the nice thing about java is, it is multi platform & a well organised programming language.
    Please give me whatever advise is necessary for this new-bie to get going quickly.
    Note: I have just installed netbeans as java development IDE which comes with the latest java. Is this a good choice or there are any other choices?
    Thanks
    Hameed

    What free database I can use for my application?You can use any database which support JDBC. I know Mysql and Postgresql supports it.
    Developing GUI application in java is advisable? ie
    is java GUI faster to develop than developing in MS
    VB & VB.net?I dont think GUI programming is easier than VB in Java although i want to. There are some layouts (gridbaglayout) to specify the positions of your components in a platform independent way but they are not much easy.
    You have two choice (i think) if you dont want to work with those managers:
    1. You can set your layout to null and use absolute positions of the components to layout as in VB. There are some specific layouts in some IDEs to do this too. (AbsoluteLayout in Netbeans)
    2. You can wait for the new layout manager which is very powerfull for designing form like GUIs as far as i see. There is a java.net project for it. Unfortunately i dont remeber its name.
    In fact i am using Matisse(http://www.netbeans.org/kb/articles/matisse.html) in development builds of Netbeans. I reccomend you to use it for just practicing since you will not be able to open the forms designed with experimental Matisse in the stable release!
    >
    Can java code be protected? or it is easy to
    decompile? A friend of mine told something about
    decompiling jars.Yes the pure java classes can be decompiled perfectly. You need to use an obfuscator if you want to protect your code.
    Here is an example: http://www.retrologic.com/
    Note: I have just installed netbeans as java
    development IDE which comes with the latest java. Is
    this a good choice or there are any other choices?I think it is the best choice. But Eclipse and IntelliJ IDEA are also widely used.
    Thanks
    HameedGood luck.

  • 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 bie to JMX

    Hi Folks,
    I am a new bie to JMX , Please suggest me some url's where I can explore it , which provides some sample programs which can clear my understandings quickly..!!

    Hi there,
    start from the official java documentation for JMX here
    http://docs.oracle.com/javase/7/docs/technotes/guides/jmx/index.html
    It contains plenty of examples for you to try on
    Regards

  • 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

  • JPS New Bie

    Hi, I am new in JSP.
    Currently I am a C# programmer (ASP.net) and want to migrate to Java.
    Is there any free tutorial for beginner?
    Oh, one thing in ASP.net, I use Model View Controller as my architecture. But dunno if jsp support this model. Any suggestion what kind of architecture is suitable for JSP?
    Thanks in advance
    Yonscun

    I am sorry there was a typo in my title.
    The right one is
    JSP New Bie
    Sorry for typo :P

  • 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 - Starting with JSP and Servlets

    Hello fellow members,
    It's my pleasure to be a part of such a wonderful forum. Today, I am here to learn JSP, Servlets, and related tech/frameworks.
    I'd be thankful to any member who can guide me in the right direction.
    I have good working knowledge of Core java.
    I have a licensed copy of weblogic 9.2, though I have no idea how it works :).
    Looking forward for some good pointers to start with. If anyone can hand hold me and tell me exercises I should do every day, there is nothing like that. I can dedicate in excess of 6 hrs daily to learn these new technologies.
    Thanks in advance,

    Sonia_31 wrote:
    I planned to start with tomcat. Tomcat is a good choice.
    I am using my cousins laptop which already has BEA weblogic 9.2 installed. He used to work as software engineer. So I thought it was better start with weblogic, than going for something else.Apparently his company is using Weblogic.
    As I am serious about the whole thing weblogic is a better option. You have application servers and application servers. When I say that Weblogic is commonly only used in "real" production environments, I do not mean that "real" production environments only use Weblogic. You can use any self-respected application server to your taste. Either freeware or payware. That you're using a payware one to start with just made my eyebrows raise.
    Looking for some info to get started. I have downloaded the pdf you have mentioned and started studying. I'll post my questions soon.Good luck.

  • 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’.

  • New Bie Question: Emulators and Application Installation on Mobile

    Hello, I am new to J2ME and doing requirement analysis. Client wants that the application should run on following mobile phones:
    Audiovox VI600
    LG 5350
    Samsung VI660
    Samsung A500
    Samsung A600
    Samsung N400
    Samsung VGA1000
    Samsung VI660
    Samsung VM-A680
    Sanyo 4900
    Sanyo 5300
    Sanyo 6400
    Sanyo PM-8100
    Sanyo PM-8200
    Sanyo RL2000
    Sanyo RL2500
    Sanyo VM-4500
    My question is, from where to get emulator for these phones ? Also, when I am done with J2ME application development, how would I get that application installed on the above listed phones ? Do I need to buy any connectors from PC-to-Mobile to transfer the application ?
    Any help would be greately appreciated.
    Thanks,
    Lomesh

    Hi,
    You can try with device manufacturers website, they will provide the emulators. after completing the development process you can upload the application to the device through the following methods.
    1. Infra red
    2. OTA
    3. cable connection.
    Check your device manual to find out the supported feature.

Maybe you are looking for

  • Which Printer Please...

    My HP 5650 died. So I need to get a new printer. Please, could anyone suggest an modestly priced inkjet that will work under 10.4.3 via an APBS? I really do not have any prefs as to brand...it's not my "main" printer...but I would like to get somethi

  • All USB ports are no longer 2.0

    I have been struggling recently with the USB ports on my Intel Mac Mini, circa 2007, OSX 10.5.8. Everything I plug into any of the 4 USB ports in the back will come up as a 12 Mbps port, not a high speed 2.0 port. I don't know how to diagnose the iss

  • Send a mail if no file in Sender File Adapter

    Hello guys, I have one doubt. I have a sender File adapter with FTP transfer protocol. I want to pull the file every 24 hours. If the file does not exist, there is any way to have an error and send a mail to the client? Is a requierement to do one in

  • Adobe service manager keeps crashing

    Hi, always get the same erroe "adobe service manager stopped" working, on startup and every couple of minutes, while working with adobe applications. Problem is connected to ntdll.dll Windows 7 CS6ServiceManager.exe 3.0.1.46 4fe81e0b ntdll.dll 6.1.76

  • Error playing media clip in Adobe Reader X (10.1.0)

    Hi, A pdf, which was sent to me, has embedded media clips. However, when I try to play these clips a JavaScript error message comes up saying 'Acrobat has encountered an error while playing this media clip'. The document was probably created in an ol