Do we need ejb for persistance of obects

hai ,
I heard that hibernate can be used for persiatance of object .
Which method is more efficient.
regards

Hi,
Entity beans provide a lot of services for ex.
1. Authentication & Authorization
2. TX Management
3. Resource management.
4. Lifecycle managment by container
5. Distributed computing environment etc. to name a few.
There are advantages of using EJB as well as some disadvantages. However use of a particular technology such as EJB or Spring should be very carefully decided based purely on business needs.
HTH
VJ

Similar Messages

  • Servlets or EJB for Persistent external socket connections

    We have a Servlet that establishes a socket connection to another
    external server and sends and receives messages. We have the Servlet defined as pre-loaded when JRun starts.
    When JRun is started, the Servlet is started and connection is
    established with the external server. The problem is when a new message is being sent, the Servlet is instantiate again and the connection is stopped and restarted. We do a forward request from another Servlet to this.
    Am I totally misunderstanding Servlets because reading articles
    and books seems to indicate that I should create an EJB instead of a
    Servlet if you want a persistent connection.
    Thanks in advance for your help.

    I assume then that your connection to the external server is achieved in the "init" method of your servlet. Therefore every time the servlet container is called upon to accesss your servlet, it instantiates it - thus a new connection will be being made each time.
    I would take out the connection properties from the init method. I.e. you only want it to happen once.
    T

  • CAn EJB do persistance without hibernate?

    Hai All.....
    My doubt is that 'Can EJB do persistance without hibernate or any other tools'?
    Can EJB do persistance alone??
    Please Help

    EJB 3, and JPA are just specification, not implementation. EJB 3 alone cannot do anything, it is just interfaces. Any product that implements the EJB 3 spec will support EJB SessionBeans and JPA and persistence.
    Any JEE 5 server will support EJB 3 and JPA persistence (WebLogic, OC4J, Glassfish, JBoss, WebSphere, etc...). Each server uses a different product to support JPA, (Glassfish v2 uses TopLink Essentials, OC4J 11g uses TopLink, WebLogic uses Kodo, JBoss uses Hibernate, Glassfish v3 uses EclipseLink, etc.). Technically if you are using JEE 5, you don't need to worry about what JPA product you are using and can consider that EJB supports persistence, but more than likely you will need to know you JPA provider in more intimacy.
    You will also need a database to persist to. Again most JEE server bundle a database, but most production applications prefer to choose their own database.
    The JPA part of EJB also works outside of JEE, in this case you will need to choose one of the many JPA products.
    see,
    [http://en.wikibooks.org/wiki/Java_Persistence/What_is_JPA%3F|http://en.wikibooks.org/wiki/Java_Persistence/What_is_JPA%3F]
    -- James : [http://www.eclipselink.org|http://www.eclipselink.org]

  • Do you still need EJB when you can do it all with JSF/JSC?

    I think EJBs make J2EE unnecessarily complex for 80% of small to mid or even some large scale applications. When you can separate the logic and view using JSF and Servlets, and still do transactions (using JSC DataProviders), why do you still need EJBs? I have heard nightmares with EJBs deployment and how its complex to move them over from test to production servers.
    Are EJBs getting obsolete and not worth learning? Afterall, in the Microsoft world, there is nothing like EJB and all they got is ASP.NET (similar to JSF) -- along with its associated data classes and .NEt framework. I am sure they also promote separating logic from presentation.
    I think JSF is the best thing Java world has got to compete with Microsoft on developer productivity for small to medium size applications.
    Message was edited by:
    Sabir

    J2EE EJB's are far from being a holy grial capable of solving any situation. They are complex, difficult to learn and code, but we need to be fair and tell the whole story.
    EJB's are part of the J2EE technology and offer infrastructure needed in complex applications. I.E., you mention
    "When you can separate the logic and view using JSF and Servlets, and still do transactions (using JSC DataProviders)"
    but these are only database level transactions. The J2EE app servers can handle global (and distributed) transactions involving different operations over different databases and transactions ruled by non-database software. Just imagine the complexity of handling a "rollback" of this kind. Put that in .NET pipe and try to smoke it.
    J2EE EJB Entity Beans were the black sheep of the family. They were oriented to easily handle fine operations (i.e. update a specific record of information) but on the other hand present a poor performance in operations over large sets of data. You can do some optimizations but..... Now the story is a bit different with JavaEE 5 and the Java Persistence API -inspired on Hibernate-.
    The bottom line is (as you mention in your post): J2EE/JavaEE are not needed by most of small or mid sized apps. However, I would strongly encourage you to have a look at the JavaEE 5 technology. The fact that portions of the JavaEE technology do not have a counterpart in .NET does not mean that they are not worth to (at least) have a look at them.
    Best regards
    Antonio

  • Need EJB architecture diagram

    dear friends,
    I need EJB architectural diagram and if possible give me explanation also.
    thanks & regards,
    siva

    hi JavaDammGud,
    Thanks for ur help. i am new to EJB's . Now i found the way to move on EJB's. I searched with some key words. but i didnt understood the topics they given.
    thanking you,
    bye,....
    regards,
    siva

  • Need Suggestion for Archival of a Table Data

    Hi guys,
    I want to archive one of my large table. the structure of table is as below.
    Daily there will be around 40000 rows inserted into the table.
    Need suggestion for the same. will the partitioning help and on what basis?
    CREATE TABLE IM_JMS_MESSAGES_CLOB_IN
    LOAN_NUMBER VARCHAR2(10 BYTE),
    LOAN_XML CLOB,
    LOAN_UPDATE_DT TIMESTAMP(6),
    JMS_TIMESTAMP TIMESTAMP(6),
    INSERT_DT TIMESTAMP(6)
    TABLESPACE DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    LOB (LOAN_XML) STORE AS
    ( TABLESPACE DATA
    ENABLE STORAGE IN ROW
    CHUNK 8192
    PCTVERSION 10
    NOCACHE
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOCACHE
    NOPARALLEL;
    do the needful.
    regards,
    Sandeep

    There will not be any updates /deletes on the table.
    I have created a partitioned table with same struture and i am inserting the records from my original table to this partitioned table where i will maintain data for 6 months.
    After loading the data from original table to archived table i will truncating the original table.
    If my original table is partitioned then what about the restoring of the data??? how will restore the data of last month???

  • I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    http://www.apple.com/support/itunes/contact/

  • I am locked out of my iPad, I can't back it up because it won't connect to iTunes (because it's locked with a password) and I need it for school, it has all of my school work on it and the school doesn't have or passwords. PLEASE HELP ME!!!

    I am locked out of my iPad 2, I can't back it up because it won't connect to iTunes (because it's locked with a password) and I need it for school, it has all of my school work on it and the school doesn't have or passwords. I can't loose all of my work. PLEASE HELP ME!!!

    Hi ebby,
    Here are the instructions for a disabled device - hopefully you have sync'd with your computer before now?
    http://support.apple.com/kb/HT1212
    Good luck!
    Cheers,
    GB

  • Can anyone recommend a portable USB 3.0 drive with hardware encryption, compatible with OSX and Windows 7.  I need it for my MacBook Pro 13", 2012, running Mountain Lion

    Can anyone recommend a portable USB 3.0 drive with hardware encryption, compatible with OSX Mountain Lion and Windows 7.  I need it for my MacBook Pro 13”, 2012, running Mountain Lion & Windows 7 Ultimate - BootCamp.  I’ve heard that the Buffalo MiniStation Encryption does not work with OSX, is that true..?  I'd like it to work with both operating systems, using the built in hardware encryption.  Thanks

    This article may help: A flashing question mark appears when you start your Mac.

  • I have a mixer which i was using with my pc and now i bought a new macbook and it have only one jack for headphones and to use mixers i need jack for microphone too so what should i do

    i have a mixer which i was using with my pc and now i bought a new macbook and it have only one jack for headphones and to use mixers i need jack for microphone too so what should i do

    You need to get headset splitter adapter.
    http://www.startech.com/Cables/Audio-Video/Audio-Cables/35mm-4-Position-to-2x-3- Position-35mm-Headset-Splitter-Adapter-Male-to-Female~MUYHSMFF

  • I just purchased Time Capsule today.  I ONLY want to use it as an external drive.  I do not need it for Time Machine. I can see the TC in my finder, but when I click on a file or video to drag and drop, I get message that TC can't be modified. Help please

    I just purchased Time Capsule today.  I ONLY want to use it as an external drive.  I do not need it for Time Machine. I need to free up room on my computer. As of now, I can't even load updates. I can see the TC in my finder, but when I click on a file or video to drag and drop, I get message that TC can't be modified. Help please!

    I agree with Kappy.. passing files and especially via wireless is slow as slow.
    Just need to be sure your TC is the new AC model??
    And the OS on the computer is Lion?
    Have you completed the setup of the TC via the utility? You do still need to get internet via the TC so it has to be plugged into the main router..
    Give us the full picture of the network.
    Then we can help you get into it.. whether you should put your files on it is another question.

  • I need driver for ati switchable graphics 4250/6370 on windows 8

    The video driver in HP is only for windows 7, and in the Ati webpage is only for one graphics card and not for switchable mode  under windows 8, please i need drivers for the hp dv7 4267cl model.
    i have three notebook of this model for software developers, i need update. any suggestion?
    Graphics card: ATI 4250 / 6370 switchable
    Notebook model: DV7 4267cl

    Hello HK_Ariel,
    Thank you for posting on the HP Forums!
    I understand you are looking for a WIndows 8 ATI driver for your computer. This driver does not exist, as you indicated. You would need to return the computer to Windows 7 to use the switchable graphics.
    Mario
    I worked on behalf of HP.

  • *UPDATED 7/15/04* Complete guide to bioses, drivers, and needed files for the MSI K8N Neo Platinum

    Complete newbie's guide to bioses, drivers, and needed files for the MSI K8N Neo Platinum:
    Last Updated: Thursday July 15th, 2004
    Bioses:
    (In order of date released.)
    1.1b3 - (Download)
    - Pre-1.1, given to reviewers to use in their reviews and benchmarks.
    - Less stable, but supposedly you get slightly better overclocks.
    1.1 Official - (Download)
    1. This is AWARD BIOS release
    2. This BIOS fixes the following problems of the previous version:
    - Memory always run DDR 200 when install single side DDR on DIMM2 & DIMM3.
    - Windows 2000 can't format the RAID IDE HDD when plug in Promise 378 controller.
    1.2b5 - (Download)
    1.2b7 - (No Download Yet)
    1.2b10 - (Download)
    - First attempt to fix false temperature readings. Fixes it for some people with Newcastle cores and doesn't fix it for anybody with Clawhammer cores.
    1.2b12 - (Download)
    - Second attempt to fix false temperature readings. Fixes it for some people with Newcastle cores and some people with Clawhammer cores.
    1.3b1 - (Download)
    - Another attempt to fix temperature problems?
    - Possibly fixes cold boot/power light issues?
    1.2 Official - (Download)
    1. This is AWARD BIOS release
    2. This BIOS fixes the following problems of the previous version:
    - System can't resume from S3 sometimes when install USB device.
    - Support K8 Sempron CPU.
    - Turn off keyboard LED in S3.
    --Quick Guide for flashing BIOS, provided by MSI--
    1. Create a MS-DOS boot diskette, then copy the the .exe and the bios file to the floppy disk. Both of these files can be found in the package you downloaded.
    2. Press "Delete" and go to BIOS setup while computer bootup.
    Check BIOS advanced features and see if BIOS flash write control is enabled
    (This option must be enabled. If you can not find this setting, it means the BIOS can be
    flashed.)
    3. Boot from MS-DOS boot diskette and get a:\> prompt.
    4. Type "", then press ENTER
    5. The flash program will then ask "Do you want to save BIOS?", please press "N" for no. The when you see Press 'Y' to program or 'N' to Exit, please press "Y" to continue.
    6. After flashing complete, remove floppy and reset the system .
    7. Press DELETE or F1 when prompted at first reboot after flashing.
    8. Load BIOS optimized defaults, then save settings and exits.
    Drivers & Needed Files:
    (Note: All these drivers are for Windows XP.)
    Leaked Nvidia nForce3 Chipset Drivers Version 4.40
    (Please use at your own risk, these are LEAKED drivers. Password for the .zip file is "ocworkbench rules". Also, you will need to rename the WinXP_2K folder in IDE to either WinXP or Win2K else the installer doesn't pick it up.) Thanks for the link Wonkanoby!
    *NEW* Leaked Nvidia nForce3 Chipset Drivers Version 5.03
    More leaked drivers? Seems some parts of the drivers are older and some are newer.
    1. Windows XP Service Pack 1A (Web Install) -or- Windows XP Service Pack 1A (Full Install)
    2. Microsoft DirectX 9.0b (Web Install) -or- Microsoft DirectX 9.0b (Full Install)
    3. Nvidia nForce3 Chipset Drivers Version 4.24
    4. AMD Athlon 64 Processor Driver Version 1.1.0.14
    5. Nvidia Video Card Driver Version 56.72 -or- Omega Nvidia Video Card Driver Version v1.5303
    (The Omega drivers are third party drivers optimized for gaming, most prefer these over the standard Nvidia drivers.)
    5. ATI Video Card Driver Version 4.7 -or- Omega ATI Video Card Driver Version 2.5.51
    (The Omega drivers are third party drivers optimized for gaming, most prefer these over the standard ATI drivers.)
    6. Onboard Sound Driver (Realtek AC'97 Audio Codec) Version A3.61
    It is HIGHLY reccomended that you install the drivers/needed files in the order listed above. Please note that there are two #5's because you either install one or the other depending on your video card, do not install both of them.
    You will come across a problem here though. You can't install the chipset drivers without installing the Windows service pack and DirectX first, but the Windows service pack and DirectX installs need the internet to download files and you won't have working internet until you install the chipset drivers. Here's what I did to get around this. Instead of downloading the web install versions of Windows service pack and DirectX, download the full version and and put them along with all the other drivers on a backup hard drive or burn them to a CD, this way you will have all the drivers you need when it's time to install them and none of them will require the internet to download files.
    Another note when installing drivers. Apparently the Nvidia chipset drivers also come with drivers for the onboard sound, but people seem to agree that the Realtek onboard sound drivers are better. When you are installing the Nvidia chipset drivers, just be sure to uncheck the box for sound drivers when it asks you which drivers you would like to install. Now you can safely install the Realtek drivers without any chance of conflicting sound drivers. Thanks for the tip Wonkanoby!

    Quote
    Originally posted by RLiu818
    Quote
    Originally posted by Deviation56
    Quote
    Originally posted by RLiu818
    You CAN install the nforce drivers BEFORE installing SP1.  The only requirement to install the nforce drivers is DX9.
    So is SP1 still recommended to install before the nforce drivers?
    The installer still reccomends to install it beforehand for full USB 2.0 functionality... I would have put what you said in there but I wanted to keep it as simple as possible.  
    oh.  IIRC the installer just says USB 2.0 will be fully functional after SP1 is installed.  So after you install SP1 you go into device manager and u click update driver and it will auto search and update the driver.
    Simplicity-wise, i guess its pretty much equal.  It might take less preparation to just copy DX9 full onto a CD and install that first, then nforce driver, then right away you have yoru internet connection.
    but i dunno.. i guess i will try it your way this time when my RMA"d board comes.
    i will be fomratting and doing a fresh install later on today and will let you know if i come across any problems

  • Need driver for canon mg 5250 as scanner is not working with version 10.7. Can you please help me to find the driver so scanner works with WIFI?

    need driver for canon mg 5250 as scanner is not working with version 10.7. Lion. Can you please help me to find the driver so scanner works with WIFI?

    Try with the latest Apple driver package for Canon (released 15th Feb):
    http://support.apple.com/kb/DL899
    This solved my problem with the printing.

  • If I want to put windows7 on my Mac,do I need software for a new comp. or a refurbished?

    If I want to put windows7 on my Mac,do I need software for a new comp. or a refurbished one?

    Mikestoyzz wrote:
    Looking on eBay,the software is labeled for new or refurbished.i'm putting it on through boot camp.
    With my limited knowledge, I don't think that it matters.

Maybe you are looking for

  • Help! My computer is being annoying!

    So today, Easter, I got Sims 3 games and stuff. Well when I tried to put in the disk it didn't catch. I had this problem before but now what I used last time, pressuried air, isn't working. I tried to reset my PRAM and stuff but it still doesn't work

  • Acrobat Pro 9 added text to headers

    Creating a PDF from a Word 2007 file. Acrobat prepended text in one cell of a table in the head. The text added is not in the Word doc anywhere.

  • Is it possible to use AAE in Enterprise Service to File Scenario?

    Hi, Gurus, I distribute master data asynchronously from SAP ERP to other application within an A2A scenario using Enterprise Services. In PI i get XML messages directly, then mapping, converting them into files and put them in a foler via ftp communi

  • Installing two different webgates

    Hi, I have to install two different webgates for two applications. What would be the way to do that? Should I install the webgates in two different instances as I am unable to figure out a how to put these two different generated ObAccessClient.xml a

  • In place rendering problem

    I am displaying a folder as a portlet. I dont want inplace rendering of parent folders. I just wanted inplace rendering of sub folders. Inplace rendering of parent parents defeats the name i give for this folder portlet.I t also defeats the tab page