Getting deep on Entities EJBs life-cicle... need some undertanding!

Hi,
i got a question over an Entity EJB (BMP or CMP as they life-cicle is pretty much the same) life-cicle.
I've search over some books and there's a step that all of them seem to miss (or just don't be to explicit).
There are 3 stages for an entity EJB.
- no state
- pool
- ready
The transition i'd like some help is the pool -> ready transition.
When i use ejbCreate() is pretty simple, that's not the case.
Then, there're only left one more way, through the ejbActivate() -> ejbLoad() methods.
Here's my point...
All the books i read describe the ejbFind() methods being on the pool stage (an arrow coming from it and going to it). This is exactly where i disagree!
Suppose i have a CMPon pool rigth now and i also have a SessionBean holding a reference to that CMPLocalHome interface. Note that at this point, the CMP is still on pool.
Then, from my client, i call a method on SessionBean that does something like the following.
          try {
               CMPLocal cmpLocal = cmpLocalHome.findByPrimaryKey(addressID);
               if (cmpLocal != null){
                    String data = cmpLocal.getMyDataString();
          } catch (FinderException e) {
               System.out.println("Error: " + e);
               e.printStackTrace();
                                          }As u can see, i just obtained a Local interface from the LocalHome interface i had before.
After that, i called a getter method of the CMP bean, by that its pretty obvious that my CMP bean has got to be transitioned to the ready state, as it was associated with database data.
Here goes my question,
When exactly did the container called ejbActivate() -> ejbLoad()??? In other words, how exactly did my CMP bean get to the ready stage?
Thank you so much,
ltcmelo

First of all, what an example! Great!
But ... i still miss one little part of the process, actually the one i`m really interested to know!
Follow my thougths.
When i call the ejbFind() method, i call it on a bean that is on the pool. All the entities EJB life-cicle diagrams i`ve seen, show the bean still on the pool after the ejbFind() method, wich means that just AFTER the ejbFind() the beans is NOT yet associated to any database data. That`s what the literature says.
The point is... i got returned from ejbFind() method a LocalInterface for a Bean, wich means that the bean is NOW associated with database data, as i have NOW a local interfaces that i can call any business (or setter and getter ) method of that bean.
As you all said, the bean must have passed through the ejbActivate() -> ejbLoad() methods (supposing there was no other bean in the ready state).
One way i can think of that is that the container invoked ejbActivate() -> ejbLoad() just AFTER any invokation of any finder method. I cannot view it in other way ( is ther any other way??? ) ! So, why is it not part of the j2ee specification ( i mean, something that specifies to "always call ejbActivate() -> ejbLoad after any finder method"????
Thanks,
ltcmelo

Similar Messages

  • I am using a MacBook Pro with 16GB ram.  PS opens but I cannot get any files to open.  I need some h

    I am using a MacBook Pro with 16GB ram.  PS CS6 opens but I cannot get any files to open.  I need some help please

    What files? How do you try to open them? From where? What else can yyou tell us? You need to provide more info.
    Mylenium

  • Getting a new touch nokia , please i need some adv...

    ok , now i have an e75 nice phone , but i want a touch nokia , ok so there is the 5800 xpress music , 5530 xm , n97 , and n900 , n900 nice phone , but i am not going to use all these specifications and i am more of a media man and the n900 looks like a black laptop , so it is of the list , now we have the 5800 and the 5530 xm , 5800 and n97 i need some advice , does the contacts in the home screen on the 5800 xm have facebook ?or does it even have facebook in the home screen ? anddoes it have an email applicatiopn like the e75 , e71 n97... and can i get e-mail notifications in the home screen ? and wich one is better e75 or 5800 xpress music ?
    Reality is wrong....dreams are for real... 2pac .
    don't forget to hit that green kudos
    Solved!
    Go to Solution.

    Hi, of the phones you mentioned the N97 will give the best media experience. Now as to the previous post , it is somewhat incorrect. The phones specs are virtually Identical, but run on entirely different operating systems N97 Symbian 60 V5 and N900 Maemo a brand new Linux based operating system, probably much better for web browsing, and superior for flash content. As your interest is in music/video, and you don't want a 'black computer' probably the N97 is still your best bet of the phones you've mentioned. The N900 is as yet not fully tried and tested, but in theory with it's larger phone memory should be better for web browsing and running multiple apps, we'll see. But with v2.0 software my N97 is now running smoothly and working well as a phone and media player, and initial complaints have reduced in number and most problems seem to have been solved. Untill the N900 is truly on-line in numbers it will be hard to judge, and there are already a few problems turning up on this site. Most complex 'smartphones' have faults, check the web, people have problems with iPhone, Sony Erickson just withdrew their latest offering,Samsung has it's critics. It all boils down to personal choice. I think the N97 is now a good phone, plenty of help and advice on trouble shooting, and will improve more with future firmware updates(maybe it should have been launched 'perfect' but it wasn't,neither are other makes) Choose the one you fancy, stick with it and almost any problem you find can usually be solved by researching forums like this.
    Enjoy whatever you choose.
    Good Luck
    PS if you want to compare specific phones specification many web sites will give you side by side comparisons !
    If I have helped at all, a click on the White Star is always appreciated :
    you can also help others by marking 'accept as solution' 

  • The backup disk image "/Volumes/Data/David Witkowski's Mac Pro.sparsebundle" is already in use.  Whenever Time Machine starts to backup to Time Capsuel I get the previous error message. I need some help to fix this.

    The backup disk image “/Volumes/Data/David Witkowski’s Mac Pro.sparsebundle” is already in use.  Whenever Time Machine starts to backup to Time Capsuel I get the previous error message Where can I find this disk image?. I need some help to fix this.
    Thanks,
    David W

    There are multiple answers and solutions if you look just to the right under the heading of More Like This.

  • Getting ready for a video capture project, need some guidance

    Hi, I'm getting ready to hold an xbox LAN tournament and I would like to capture the game to my computer so I can give people DVDs of it afterwards. The G5 i my first tower and I've had no experience in PCI cards and capturing A/V and all that jazz.
    Basically I'm going to be having an input of component cables (though its only going to be 480p, no HD) and possibly optical audio, though more likely analog because I'm going to try to borrow a mixer and run everyone's headsets into the G5.
    What am I going to need as far as a video capture card? Will it work in the PCI-X slot or am I going to have to swap it with my 9650 XT?
    Also, I'm guessing I'm going to have to buy final cut express to do the software capturing (Seriously, if you couldn't tell already, I really have no idea what I'm doing )
    I'm willing to buy the hardware and software required and get some books to figure out the process, but if anyone could point me in the right direction, that would be awesome.
    Thanks a bunch,
    Sean

    I use a Canopus DV converter to capture analog video/audio to my computer. I've got the ADVC-100 which has been updated to ADVC-110 and costs about $250. It connects via firewire and works like a charm. I capture using iMovie HD which more than meets my needs for now. I burn dvd's using iDVD which also meets my current needs. My setup is audio-video source, usually a vcr, to the ADVC-100, to the G5 via firewire. Make sure you've got plenty of dick space available to capture. I use aa 320 gb external SATA RAID set. It's really an easy setup and capturing and buring using Apple's software is a snap. Not a steep learning curve. I would suggest if your going to use more advanced software to get a few projects under your belt before the tournament, if you're going to use the iApps you'll find them much easier to learn and will be up and running sooner.

  • Am going to get a new iPhone, my first and need some advice...

    Hello-
    I have been looking at getting an iPhone 4. I currently am with Verizon but both contracts (cell and data) are up so I was thinking about their iPhone 4. I have no idea if there is a difference between the way ATT deals with the calls, texts, internet and a carrier like Verizon. I am assuming the phone is the same and the OS will be the latest and the same. I did read that Verizon uses the CDMA network not the network 4GLTE. I guess when the 4G network is more of a network they might offer the option to choose.
    Does anybody know if tethering is available with any of the carriers yet or is that what either 3G or 4G should help with? If so, since 3G has been a network for sometime, and a darn good one at Verizon, what is the deal with tethering. I remember going with my friend when the iPhone first came out and ATT told them that a "concept" called tethering will be out in about a few months. I do not think after 5 years it has been out.
    I am open to all kinds of advice, cautions, suggestions, etc. as I embark on this new endeavor. being a tech nerd (in a negative way) I am nervous about how to deal with all of the functions without ruining the p[hone, which is what I usually do to the computers. I would like a super heavy duty case with a covering for the display (that allows the touch function to work). If there are choices with the iPhone 4, I would like to hear people's opinion of certain ones. Even apps. is it OK to get them on the apple website or iTunes or both? Are there apps that have been checked by Apple and are like Apple certified?
    I would like (but not sure if it is possible) to be able to travel and use the internet out in the desert, for example. I have a Verizon MiFi2200 and I use that for my MacBook and it works great. Do they have something like that for the iPhone.
    OK, that should be enough for now. OH, one more thing. Does it matter if I get applecare right of or wait until the initial warranty is about to expire before I purchase Applecare. I realize the phone sup[port will not be available to me if I wait but the genius bar and sending the camera in will be.
    Thanks a lot!

    Read here: http://support.apple.com/kb/HT2109.

  • If I have installed jdk1.3 and want use ejb do I need some more to download

    I am trying to run some ejb classes using jboss but it complains EJBOBJECt not found. What does this mean?
    Please help

    Have you downloaded J2ee?

  • HT1414 Is iOS 6.0.1 Killing anyone's battery life.  No change other than installing iOS 6.1 today...now I cannot get 5 hours of battery life with everything disabled!!!

    Is iOS 6.0.1 Killing anyone's battery life.  No change other than installing iOS 6.1 today...now I cannot get 5 hours of battery life with everything disabled!!!

    This isn't an issue. Notice the screen prior to the one that shows usage has an iCloud section and a Manage Storage button. For this button to activate ios needs to download a few kb from icloud. Switching back to this screen forces ios to download those few kb.

  • How we can get Uppercase Macron entities in XML...

    Hi good morning to everybody,
    We are currently working in XML job in InDesignCS2 MAC. In the job Times postscript font is the base font. And we need macron entities for this job. In this Times Postscript font special entity characters are not available. But we have only Macron symbol (Over bar) as individual character in this font. So here we get those macron entities by Tracking two characters.
    After we have choose Otf font which is named "TimesLTStd Phonetic" for the special entities. In this the Otf font have only the Smaller case macron entities but not Uppercase macron entities. We need both Upper & smaller case macron entities.
    If anyone have ideas about this, please suggest & help me too.
    Thiyagu

    Hi good morning to everybody,
    We are currently working in XML job in InDesignCS2 MAC. In the job Times postscript font is the base font. And we need macron entities for this job. In this Times Postscript font special entity characters are not available. But we have only Macron symbol (Over bar) as individual character in this font. So here we get those macron entities by Tracking two characters.
    After we have choose Otf font which is named "TimesLTStd Phonetic" for the special entities. In this the Otf font have only the Smaller case macron entities but not Uppercase macron entities. We need both Upper & smaller case macron entities.
    If anyone have ideas about this, please suggest & help me too.
    Thiyagu

  • HT4910 i save my photos to camera roll. then back up but can't see it on icloud. why? we just lost 300 photos on my other iphone because we do not get proper help. that's why i need to learn now.

    i save my photos to camera roll. then back up but can't see it on icloud. why? we just lost 300 photos on my other iphone because we do not get proper help. that's why i need to learn now.

    You can't view your back up files at icloud.com.
    You can't view your camera roll and you can't view your Photo Stream files at icloud.com.
    The icloud back up plan allows you to "restore" your iOS device from the files you backed up at icloud.com.

  • I need to connect my iPad to a projector and USB ports. What do I need to do this and where can I get the suitable fittings? I really need to have more than one USB connection port. Help

    I need to connect my iPad to a projector and have USB ports. What do I need to do this and where can I get the suitable fittings? I really need to have more than one USB connection port. Help

    You can connect via a cable or wireless using an Apple TV.
    http://ipad.about.com/od/iPad_Guide/a/How-To-Connect-Your-Ipad-To-Your-Tv.htm
    Connect an iPad to a Television or Projector
    http://www.everymac.com/systems/apple/ipad/ipad-faq/how-to-connect-ipad-to-tv-te levision-projector.html
    Connecting iPad iPhone or iPod to TV or Projector
    http://www.disabled-world.com/assistivedevices/computer/ipad-tv.php
    iPad Accessories: Connections for a TV or Projector
    http://www.dummies.com/how-to/content/ipad-accessories-connections-for-a-tv-or-p rojector.html
    You may be interested in AirPlay on the Apple TV:
    http://www.apple.com/airplay/
    Alternately, there are Apple Digital AV Adapters for hardwired connections:
    http://support.apple.com/kb/ht4108
    If your location does’t have wifi to use with the Apple TV, use a portable router.
    Portable routers http://compnetworking.about.com/od/routers/tp/travel_routers.htm
     Cheers, Tom

  • I am trying to restore an older iPod Touch, but do not have the passcode.  I am getting an error message saying that I need to free up some space, but I cannot because I don't have the passcode and have never synced this device to my account.  Help..

    I am trying to restore an older iPod Touch, but do not have the passcode.  I am getting an error message saying that I need to free up some space, but I cannot because I don't have the passcode and have never synced this device to my account.  Help..

    If it is asking for the screen-lock passcode then:
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.
    Otherwise follow varjak paw recommendation

  • My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    Connect the iPod to your syncing computer and restore it via iTunes.  However, if iTunes asks for the unknown passcode you need to place the iPod in recovery mode and then restore the iPod from backup.  For recovey mode see:
    iPhone and iPod touch: Unable to update or restore
    "If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone and iPod touch software."
    Above is from:
    http://support.apple.com/kb/ht1212

  • I keep getting an error message that Apple TV needs authorization

    I have two 2nd generation apple tv units. The second one I installed does everything fine, streams from my Mac, pulls down itunes store for trailers and logs on to itunes store, but when I try to buy or rent I get an error message that the unit needs to be authorized. As a result I can only see previews and cannot rent or buy anything.
    I give up... what is the solution?

    FOr some now, my ATV 2 does not show in my devices list on iTunes. Now, as of today, I keep getting an error message when trying to rent a movie through iTunes that I need to contact iTunes support to complete the transaction. Also, the ATV 2 does not show on my MacBook Air iTunes app. The ATV 2 will stream netflix and play movie trailers so I know it's on my wireless network---but for some reason, I can't see it on my iTunes. Does anyone have any idea why this is happening and what to do about it?
    THANKS!!
    PDUB OKC

  • My computer crashed and I have to get my data from my old drive to another computer, to ensure I get all my data what do I need to get.  I have and ipad and an iphone.  I need to get apps, contacts, pictures, etc.  Is there a way to do this?

    My computer crashed and I have to get my data from my old drive to another computer, to ensure I get all my data what do I need to get.  I have and ipad and an iphone.  I need to get apps, contacts, pictures, etc.  Is there a way to do this? It was a vista pc and the new is win 7. I can grab the backup files, and music, but what about my apps? I do not want to sync on the new pc since the apps aren't there.  Were are the app files located in itunes? Can I just copy them to the new computer?

    You can transfer itunes purchases:  File>Devices>Transfer Purchases
    The iphone is not a storage/backup device.  The sync is one way - computer to iphone.  The exception is itunes purchases.
    It has always been very basic to always maintain a backup copy of your computer.  Use your backup copy to put everything back.

Maybe you are looking for