Mutilple calls in one transaction - what's the best way?

I need a session bean to perform following functionality (rought each one
corresponds to a method)
- update customer profile (name, address, etc., they are in one table)
- update customer's services
- update customer's phone book (they are in separate table)
The bottom line is, I want to give max flexibility to calling clients so
they can choose to perform any combination of the functionality, yet still
do all that in one transaction.
I could:
a. make the bean a stateful session bean, make 2 methods, one to start
transaction and one to commit/rollback it, and let the servlet call them,
and call any update method in between. (guess i have to use bean-managed
transaction)
b. make the bean stateless and container-managed transaction (marked
required/support), let the servet start userTransaction, and call the bean
methods passing the state (i.e. account#).
I tend to think <b> is the better way, <a> is not recommended according to
WLS documentation.
Any other better way?
thanks

Take a look at the session facade pattern. It is like your b. version but
with an extra class that handles the transaction separated from the servlet.
// Björn Caroll
"Alan Tang" <[email protected]> wrote in message
news:[email protected]..
I need a session bean to perform following functionality (rought each one
corresponds to a method)
- update customer profile (name, address, etc., they are in one table)
- update customer's services
- update customer's phone book (they are in separate table)
The bottom line is, I want to give max flexibility to calling clients so
they can choose to perform any combination of the functionality, yet still
do all that in one transaction.
I could:
a. make the bean a stateful session bean, make 2 methods, one to start
transaction and one to commit/rollback it, and let the servlet call them,
and call any update method in between. (guess i have to use bean-managed
transaction)
b. make the bean stateless and container-managed transaction (marked
required/support), let the servet start userTransaction, and call the bean
methods passing the state (i.e. account#).
I tend to think <b> is the better way, <a> is not recommended according to
WLS documentation.
Any other better way?
thanks

Similar Messages

  • HT5621 My husband and I both have iPhone 5. We currently share the same apple I'd. How do we get separate ones. Him keeping his and me getting a new one? What is the best way to go about doing this?

    My husband and I both have iPhone 5. We currently share the same apple I'd. How do we get separate ones. Him keeping his and me getting a new one? What is the best way to go about doing this?

    FAQ apple id http://support.apple.com/kb/HT5622?viewlocale=en_US

  • Urchased a new desktop pc and I want to move itunes and all files including IPAD apps to my new computer and delete off my old one.  What is the best way to do this?

    I just purchased a new desktop PC and want to move Itunes and all my Ipad Apps to new computer, and delete off my old computer.  What is the best way to do this?

    Hi,
    See Here for Transferring your iTunes Library
    http://support.apple.com/kb/HT4527
    Make sure Everything is working to your satisfaction Before Deleting anything from your old computer...
    Cheers,

  • I photo pics are in album, but need to upload from add item page on etsy.  Cannot find where the pics are in my computer.  I did put a name on each one.  What is the best way to save an individual pic to be able to find it on the computer so as to upload?

    I have an online etsy shop.  There is a page on which to list a new item to be added to one's shop.  When it is time to upload the pic or pics, I cannot find them,eventhough each has a name and all are in an i photo album.  On my old computer I would "save as" and then could find it easily in my computer.  In the new mac I just got, I cannot easily find the pic when trying to upload.  Could you tell me an easy way to save each pic so that I can find it for uploads to that site?  Thanks in advance. OS is Snow Leopard. Whatever i photo came with that would be the product I am using.

    The following is from a post by Terence Devlin on accessing photos for use outside of iPhoto.  It's the definitive treatise on the subject.
    There are many, many ways to access your files in iPhoto:
    You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    There's a similar option in Outlook and many, many other apps.
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    If you want to access the files with iPhoto not running: 
    For users of 10.6 and later:
    You can download a free Services component from MacOSXAutomation   which will give you access to the iPhoto Library from your Services Menu. Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and 10.5
    Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. Drag and Drop: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. File -> Export: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3.Show File:
    a. On iPhoto 09 and earlier:  Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected. 
    b. On iPhoto 11 and later: Select one of the affected photos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder window will pop open with the file already selected. 

  • What is the best way to set up Facetime if using multiple computers with one apple ID?

    I currently have FaceTime setup on my iPad 2 using my normal appleID, but have just recently upgraded our iMac from Leopard to Snow leopard, and have added FaceTime to that computer as well. So my question is this. If I want to avoid confusion with which device is called when someone calls us using FaceTime, what is the best way to distinguish the devices? Should I try to use a different email address to reach the iMac? Is there a best-known-method for this?

    That's a nice system Kevin, and it will work very nicely with Photoshop.  I do take it that you have 16Gb RAM in Total?
    250Gb SSD is a good size, but you can still run short, and that will affect Windows performance.  When you get your system, instal WinDirStat which gives you a graphic display of everything on your drive, like below. Clicking on any of the large areas will tell you what and where they are, so you can think about moving cache folders etc. to one of the HDDs.
    Leave the Pagefile.sys on the boot drive.  Think about disabling Hyphenate as it takes a ton of space, and too often crashes on wake up.
    My Documents
    Desktop
    Downloads
    Look at Bridge cache
    iTunes backup
    Other stuff like that.
    Think about another 500Gb drive just for Photoshop Scratch.  Drives are cheap as chips nowadays
    Do yourself a favour, and invest $100 in Shadow Protect (or similar if there is such a thing) SP saves incremental backups every 15 minutes (you can set the interval, but it has no impact on performance with a system like yours).  If you have a problem you can mount the back up at any of those 15 minute points, and open files from it.  You can also make a bootable DVD image of your C drive, and be back up and running five minutes after disaster strikes.
    Optimize Performance in Photoshop
    Photoshop CC and CC 2014 GPU FAQ
    For more ideas, swing by the Premiere Pro Hardware forum.  Those guys are serious good at this stuff, and you'll find links tips and ideas.
    Happy computing, and have fun with your Creative Cloud® apps.

  • Hi I would like to totally reformat my Macbook Pro. What is the best way to go about it?

    I have a Macbook Pro and would like to do a complete reformat. I installed Moutain Lion when it came out and do not wish to pay again since I've already paid. I have OS 10.6.4 discs with me which didnt come with my MB but with my previous one. What is the best way to go about it? I have bootcamp and wish to get rid of it (one of the many reasons of wanting to reformat)
    Thanks

    You can use the Boot Camp Assistant to remove the Bootcamp Partition  - best way to do it.
    If you use the Recovery Disk Assistant to create a recovery usb thumbdrive you can boot to that and repartition the MacHd and reinstall the OS directly.
    When you purchase the OS you are free to reinstall without repurchasing as long as yo have access tot he Apple Id you used to make the purchase
    DL1433 - & - HT4848

  • What's the best way to transfer (not forward) a call from one iPhone to another?

    What's the best way to transfer (not forward) a call from one iPhone to another? Is there an app available that does this? I'm asking about receiving a call, then transferring that caller to another iPhone on a separate number and then disconnecting while those two users are joined up in a conversation.

    Ask your carrier. This would be a feature provided by them.

  • What is the best way to start SAPGUI in a specific transaction

    Hello,
    What I'm trying to do is to run a Java program that will start SAPGUI (in windows format, not HTML) and present the user with a specific transaction with some data already inserted.
    I already managed to start the SAPGUI and I know how to fill in data using the SapJCo but my question is: what is the best way to navigate to a specific transaction? I can activate an RFC of BAPI_CALL_TRANSACTION but it seems like a big overhead. so, can any of you tell me what is the best way activate a specific transaction in SAPGUI using JCo?
    Thanks,
    Uri Lifshitz.

    Uri
      JCO are mostly used to executed a RFM on the Destination.
      I don't think we could call a Transaction using JCO.
    Thanks
    Jack
    <b>Allot points if my post helps !!!</b>

  • What is the best way to move an iPhoto library from one internal drive to another internal drive?

    the drive where my iPhoto library is store is just about full.  I have a second internal SSD that I'd like to move (not copy) the library to.  What is the best way to do that and still ensure that iPhoto will access the library in its new location?

    Just drag the iPhoto Library package from the one drive to the second disk.  Launch iPhoto with the Option key held down and select the library in it's new location on the second disk.  Once you're satisfied that it is working satisfactorliy you can delete the copy on the first disk.
    OT

  • I would like to use one library but with multiple ipods, but because they are my kids Ipods, and they each have their own gift cards, I'd like to be able to add money to their "profiles" without them having their own account - what is the best way

    So here is my delima - I want one Ipod account - because I only want one library - since we all like the same music - but my kids, who have their own IPODS, have gift cards, who want to be able to keep track of their balance without the other child affecting the balance - meaning - each gift card should be seperate and not totalled to the single account - Beacuse the library is fairly large, having three libraries of large amounts would be a waste.  I would also like to restrict their purchased to the gift cards only and not my credit card on file.  Does this make sense?  Once this is resolved, I'm assuming they would use their own playlists to copy their favorites to each Ipod.  Or would I set up an account for each child - which I dont want to do, because I dont want them having access to my Credit Card, and only gift card balances.  With multiple accounts, I'm assuming that would also build seperate libraries?  We also have multiple computers, but I share the library to those computers -
    What is the best way?  I'd like to be able to add credit to a specific child (birthdays, etc) without the other child being able to access that credit.  For simplicity sake.
    We are new to IPODS and lack any MAC skills.
    Thoughts?

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • We have always used one iTunes account and I want to crate a new account for my daughter.  What is the best way to go about this and will she need to download free apps again?

    We have always used one iTunes account and I want to crate a new account for my daughter.  What is the best way to go about this and will she need to download free apps again?

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

  • Our granddaughter has a ipod. She's getting a iphone and a mini idpad.  what is the best way to set them up. Does she need a new apple id and password or would she use the same one she has for her ipod

    our granddaughter has a ipod. She's getting a iphone and a mini idpad.  what is the best way to set them up. Does she need a new apple id and password or would she use the same one she has for her ipod

    Just use the same one on all devices.

  • I'm buying a new Macbook Pro this week and am wondering what is the best way to copy over the software I have from my existing Macbook Pro to the new one? eg. Photoshop and Office etc. I no longer have the CDs.

    I'm buying a new Macbook Pro this week and am wondering what is the best way to copy over the software I have from my existing Macbook Pro to the new one? eg. Photoshop and Office etc. I no longer have the CDs.

    Ya know what I'm on a brand new MBP just about 24 hours old and you know whats been working amazingly for me. I have a 27inch iMac as well and i've just connected it to my network and been dragging files and apps across the network onto my new MBP. Its really working fast and its flawless. You could always do that option, Just go into sharing options and turn them on for both Macs. Then just click and drag. Of course they have to both be on the same network for this to be possible.
    Look at my network.
    Shared is what your looking at.  I click on there see all my computers files and then drag the ones i want form its folder to my MBP folders.  Hope that helps if your looking for a very simple way on a wireless network.

  • What is the best way to call a report from within a report

    What is the best way to call a report from within a report(master / Detail concept)
    A type of drill down report
    Oracle Database 10g
    Forms 10.1.2.0.2
    Report Builder 10.1.2.0.2

    Hi
    Have a look in this link, certainly you will get fix, if not just post a comment on blog, will get reply soon
    http://windows7bugs.wordpress.com/?s=oracle+10g+bug

  • What is the best way to call a pageflow action from JavaScript?

    What is the best way to call a pageflow action from JavaScript?
    Thanks,
    John

    John,
    How would I do this from a grid??? Unfortunately there are no JavaScript attributes
    on any of the grid tags that I can see.
    Thanks,
    John
    "John H" <[email protected]> wrote:
    >
    Thanks John!
    "John Rohrlich" <[email protected]> wrote:
    John,
    If you want to put up a confirm dialog before calling an action from
    an
    anchor it is done as follows.
    Here is an example from code of mine that deletes a customer order,if
    the
    user confirms the delete. I pass the order id as a parameter.
    - john
    Here is the JavaScript -
    function confirmDelete() {
    if(confirm('Continue with order delete?'))
    return true;
    else
    return false;
    Here is a sample anchor tag -
    <netui:anchor action="requestToDeleteOrder" onClick="return
    confirmDelete(); return false;">
    Delete
    <netui:parameter name="orderId" value="{container.item.orderId}"/>
    </netui:anchor>
    "John H" <[email protected]> wrote in message
    news:402138f5$[email protected]..
    Thanks for the replies. I figured it was going to require buildingmy own
    url
    to call the action. I had hoped there was an easier way to do it.Rich,
    the
    reason I want to do this is because I want to call the JavaScript
    function
    confirm()
    when a user clicks on a link (in a repeater/grid) to drop a record,I only
    want
    to call the drop action if the user confirms the drop. Maybe thereis a
    better
    way to do what I am trying to do??? I really appreciate any help
    you
    guys
    can
    give me on this, I am pretty new to this sort of stuff.
    Thanks,
    John
    "Rich Kucera" <[email protected]> wrote:
    "John H" <[email protected]> wrote:
    What is the best way to call a pageflow action from JavaScript?
    Thanks,
    JohnTry figuring out the URL to the pageflow action, create a hidden
    form
    in the
    page, then use JS to submit the form. Why would you want to though,
    isn't
    the server going to want to send you to the next page?

Maybe you are looking for

  • Premiere CS6 crashing when I move clips in the timeline

    This error box appears when I try to move things around in the timeline. I'm not exactly sure where to start so I don't know what to troubleshoot. Anyone ever get this before?

  • Sounds on an ipod touch

    Is it possible to keep the alarm sounds on but have all emails/imessages, etc. silent?   I am setting my alarm, but every email that comes in wakes me in the middle of the night! 

  • SOlaris 10 install from laptop

    Hi, I was just wondering if there's any way I can make a Solaris installation using a Solaris OS image on my laptop, so i don't have to carry a USB key, or change it everytime I need to install or re-install a server. Basically, I would setup ALOM, a

  • 2TB limit in ASM on ext3

    total newbie question here, so forgive any ignorance I will reveal in the next lines.... What's the best way to get ASM to scale up beyond the 2TB limit on ext3? Start with DATA at 2TB and then when that's full add a DATA1 at 2TB, then DATA2 ... and

  • Unable to create DNS forwarder in my AD integrated DNS

    Hi, I have my mix AD servers (2003 + 2008) and im trying to create DNS forwarder to send requests to outside the Domain over natted IP for the name resolution. However, it works perfectly fine in my test environment. Now, when i try to create on my p