How drive ejb beans from such as COMPANY with..

I am very new to EJBs but would like to give a try and dooooooooooooo it of course. Now, I understnad how to write jave(ejb interfaces and classes) but makes me small is how define ejb beans from my bosses speach. He says we need to ....... so for example COMPANY(company name, contact, references + more) could be our business objects. HAH!
So pmy roblem is what should be an ejb bean and what should be ejb bean fields.
Thanks a lot in advance.
gapter

Its really not that difficult really. First - if you decide that your business object is going to be a Bean - Determine if it should be an EJB or just a regular Java Object bean in which case you'll probaly just use a Java Bean. The two are very similar with the exception that JB's are not Distributed but can do most of the grunge work that an EJB is suppose to do.
Next, determine what business methods or transactions are most likely to be done to your Business Object. This should determines the interface. So far that's all routine.
If you are decide that an EJB is what your problem demands (after much research into your problem) - then ask if your business object will be persistent (exist for a long time and will need storage (say on a persistent storage media like in a database) Or whether it will just require session scope (or just to be present the duration of a transaction/session - like say a shopping cart). The former requires a Entity Bean, the latter a Session Bean.
You then create your implementation code in a NameOfClassEJB class. A Container Management class NameOfClassHOME, and of course your Business Method Interface called NameOfClass.
The BMI (business method Interface class) is trivial. Your EJB class however will contain all the implementation required to get work done depending on the choice of Implementation - that is, whether you wish to handle all transactions (Bean Managed) or if you would rather delegate to the Container to handle Storage Issues (Container Managed). With Container Management - You get a lot for free - like concurrency control, database connectivity is trivial, distributed transaction management is trivial, field updates in your database is totally out of your hands. etc ...
For a beginner - its better if you take time to study the ejb lifecycle, the J2EE Business Architecture, then the solution that they proposed for application development. This is not trivial and has a steep learning curve.
Have fun.
Next determine if you want to handle all of the transactions between the properties (or fields) in the bean or you'd like the Application Server's Container to do this for you. (Most EJB's at least the simple ones are better off being handled by the Container).
going to be an employee: say with name, address, tel, email: Y

Similar Messages

  • How  to get  response from such a  function

    How  to get  response from such a  function (in MODULE USER_COMMAND_0010 INPUT I get "ODGOVOR" 'X'
    FUNCTION Z_SEENKRAT.
    ""Local Interface:
    *"  EXPORTING
    *"     REFERENCE(ODGOVOR) TYPE  MSEG-KZEAR
    DATA ok_code LIKE sy-ucomm.
    DATA: test like mseg-kzear.
    BREAK-POINT.
    call screen 10.
    test = ODGOVOR.
    ENDFUNCTION.
    *&      Module  CLEAR_OK_CODE  OUTPUT
          text
    MODULE clear_ok_code OUTPUT.
      CLEAR ok_code.
    ENDMODULE.                 " CLEAR_OK_CODE  OUTPUT
    *&      Module  USER_COMMAND_0010  INPUT
          text
    MODULE USER_COMMAND_0010 INPUT.
    DATA odgovor LIKE mseg-KZEAR.
    CASE ok_code.
        WHEN 'DA'.
        ODGOVOR = 'X'.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0010  INPUT

    Hi,
    You need to declare the ODGOVOR variable in the TOP include, then you will get the value
    Regards
    Sudheer

  • How can you save from photoshop to pdf with intact formlayers?

    How can you save from photoshop to pdf with intact formlayers?

    No, it is form layers for a cutting machine, when you save to pdf from ill or indesign you can select make acrobat layers but not in photoshop.
    Do anyone have a sullotion?

  • How do I print from my mac mini with system 10.5.8

    How do I print from my mac mini with system 10.5.8? do tell...

    Rjanyk, welcome to the forum.
    What is the make/model of the printer that you are using?  I presume that it is an HP printer.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • How to prevent B1 from populating the grid with components?

    Hello group,
    We have customized a form that pops up when user enters a parent item (of a template-type BOM) in the quotation grid.  The form displays the component items and lets the user mark which items to "paste" onto the quotation.  However, B1 automatically populates the grid with the component items once focus moves away from the item code column. 
    <b>How to prevent B1 from populating the grid with components <i>while</i> retaining the parent item in the item code column?</b>  I've tried trapping the Validate event, etc. with no success.

    Instead of setting the parent item up as a template type BOM, you could set up the list of parent/child items on a user table and use this user table to display the items in your pop-up screen.  As the parent item would no longer be a template BOM, Business One would no longer automatically popuplate the grid, and you could write your own code to add only the items selected in your pop-up screen into the grid.
    John.

  • How to export MPEG2 from DVD Studio Pro with subtitles?

    Does anyone know how to export MPEG2 from DVD Studio Pro with subtitles?

    You cant do that...
    We might be able to help you more if you are trying to do something specific,
    -Jake

  • How call session bean from Client side

    Hi
    calling session bean from client side it gives Lookup erroe, it gives JNDI error
    how we know session bean is working. in Admin tree bean statis is reb Flaf, and ID is "Down" how we activate it..
    null

    If you can make a connection using sess_sh, then you know that you have configured your database and listener properly. If it is not working, read the manuals that you can download from technet. They are pretty good, and if you follow the directions, you should see success.
    Good Luck!
    Brad

  • How to remove Bean from session upon leaving the web page?

    Hi...
    I got the following problem
    I promote a user with a Datatable filled with data, each time the user enters the webpage with the table I go the DB and retrieve all relevant data again (so each time the user gets an OnLine representation of the DB)
    to archive that I defined the bean that pulls data from DB in Request scope. and it worked well... but now i added an option to export the table into Pdf made by a servlet.... now to be able to get the bean from the servlet i had to change the scope of the Bean to Session Scope... and all works fine.. BUT... now the page not showing OnLine representation of the DB.. cause its only created once , cause its inside Session Scope...
    My question is how can I remove the Bean from Session scope upon the user leaving the page (I don't want to remove the bean from session scope on the next called bean of the other page) i want to remove the Bean upon leaving the current web page... Or maybe force the constructor to be executed each time the Page is loaded (as if it was a Request scope bean)....
    Any ideas?
    Thanks ahead!
    Daniel.

    Hi,
    When you are moving to another page, you are performing an action right ?
    (i mean the request moving to Server side), if you do so, then clear the bean object values list.
    for example :
        private List<Integer> intList = new ArrayList<Integer>();
      public void clear()
       intList.clear();
    or
    store a new object in session, when ever u moved to the second page, so that the old object will be no longer
    in use, so it will be garbage collected.Regards,
    Sathya.

  • Asset transfer from an affiliated company with depreciation

    Hello - Can you tell me how I can translate the following business scenario in SAP ?
    1) An asset is purchased from an affiliated company. This company is represented as an inter-company vendor in our company code.
    2) The initial value of the asset in affiliated company is 100 EUR. And it is depreciated with an amount of 30 EUR in the affiliated company.
    3) In our books we would like to show the depreciation in the legacy system and continue depreciating the asset with NBV 70 EUR.

    hi
    post an FI Document with transaction type 145 or 146 and check

  • How to load data from a virtual cube with services

    Hello all,
    we have set up a virtual cube with service and create a BEx report to get the data from an external database. That works fine. The question is now:
    Is it some how possible to "load" the data from this virtual cube with service (I know that there are not really data...) into an other InfoCube?
    If that is possible, can you please give my some guidance how to set up this scenario.
    Thanks in advance
    Jürgen

    Hi:
    I don't have system before me, so try this.
    I know it works for Remote Cube.
    Right Click on the Cube and Select Generate Export Data Source.
    If you can do this successfully, then go to Source Systems tab and select the BW. Here, Right CLick on select Replicate DataSources.
    Next, go to InfoSOurces, click on Refresh. Copy the name of Virtual Cube and add 8 as a prefix and search for the infosource.
    If you can see it, that means, you can load data from this cube to anywhere you want, just like you do to ODS.
    ELSE.
    Try and see if you can create an InfoSpoke in Virtual Cube. Tran - RSBO.
    Here, you can load to a database table and then, from this table, you can create datasource, etc.
    ELSE.
    Create query and save it as CSV file and load it anywhere you want. This is more difficult.
    Good luck
    Ram Chamarthy

  • How to rerieve records from the table starting with character 'D'

    Hi Folks,
    How to get the records from the table starting with character 'D'.
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    last record in the table starting with character 'D'
    How can i do that??
    Pl explain.
    Thanks,
    Matt

    Hi,
    Select Max (fld1) fron tab1 into tab1-fld1 where fld 2 = l_fld2 and starting character of fld(1) is 'D'.
    Select MAX (fld1)
       From  tab1
    into table itab
    where fld 2 = l_fld2
       and fld1 like 'D%'.

  • How to open mapquest from a jsp page with address loaded in struts?

    Can someone plz tell me about how to open mapquest from a jsp with address preloaded (i.e taken from jsp fields)? I am using struts.

    http://maps.google.com/maps?q=
    add the query to the end of it. Makes simple.

  • HT1688 How do I print from iPhone 4 g with epson iprint

    How do I print from iPhone 4g with epson iprint

    You would have to find an app in the app store that provides this feature.

  • How to move songs from iphone to computer with itunes?To a new computer which are free not purchased

    hello ppl....well i wanted to ask that how to transfer music from iphone 4 to computer using a itunes..and one thing more to tell that I want to transfer music to a new computer...Hope for a soon reply...Thanks in advance...\
    Regards,

    Welcome to the Apple Community.
    The following User Tip may help you.
    Recover your iTunes library from your iPod or iOS device.

  • How can i transfer from windows to mac with my catalogue ?

    hello, how is the best way to transfer my catalogue from windows (8.1) to mac (yosemite) ?
    thx for your help.
    best regards from germany
    oliver

    Is Apple compatible with Microsoft Office?
    Any computer is compatible as long as it can read and write Office files. But for perfect (or at least near perfect) compatibility, you would want to purchase Office 2011 for Mac.
    How can I transport from Windows to Mac?
    You can't directly transport any installation of Windows. All PC's come with a machine specific version of Windows intended for that PC. They don't have all of the hardware drivers the retail disks cover.
    If you want Windows on your Mac, you would first purchase a full version copy (NOT an upgrade disk) of Windows 7 or 8. Those are the only supported versions on newer Macs. You install it through the supplied Boot Camp utility that comes with the Mac to create a new partition for Windows, and then install the retail copy of Windows you purchased.
    The reason only these versions of Windows are supported is the same basic reason as a machine specific version of Windows for a PC. Apple only includes the necessary Mac hardware drivers for Win 7 or 8 on new Macs.
    Once Windows is installed, you could then install the version of Office for Windows you already own. The nuisance of a Boot Camp partition is that you have to physically boot to either Windows or OS X, so you can only use the apps of the OS you're in at the time. To use both at once, you'd have to use virtual machine software (Parallels, VMware, VirtualBox) and then install Windows within that. Then you'd be able to run Windows inside of OS X and have access to both at the same time.

Maybe you are looking for