MDB gets Destroyed

Hi,
          I am using 9.2 with clustering environment. I am using UOO hence I am initialising my pooled beans with 5 beans.
          Due to exceptions in the transaction these beans are getting destroyed while new beans are not getting initialised by App.Server even though messages are pending on the queue. Some times the bean stops operating and one has to manual start resuming. How can we automate this operation?
          Is this expected behavior or I have to do certain configurations to achieve this?
          Thanks,
          Alan
          Edited by alan78 at 05/17/2007 7:17 AM

Hi Alan,
          You appear to have hit the stalling bug I mentioned previously. One possible work-around is to use a container managed transaction and force redelivery by rolling back the EJB transaction.
          (The "transaction.rollback()" isn't related to the stall, as its for the bean managed transaction and so is unrelated to the container state of your non-transactional MDB.)
          Tom
          PS. Just in case your unaware, there's a not all that uncommon problem with MDBs that use bean managed transactions (BMTs): They can yield unintended "non-ACID" results without careful design to handle the potential for message redelivery when the BMT for the first delivery committed. If performance is a consideration, container managed transactions can often yield much higher throughput than BMTs...

Similar Messages

  • JSP session getting destroyed when second user logs in

    Hi,
    I am facing a session related problem in a small login program in jsp. I am using three jsp pages, login.jsp (user logs in), page1.jsp (creates a session and stores username) and page2.jsp (accesses session).
    Login.jsp:
    No jsp actually. Just a simple html form.
    Page1.jsp:
    String name=request.getParameter("Name");
    session=request.getSession(true);
    session.setAttribute("Name",name);
    Page2.jsp:
    session=request.getSession(false);
    if(session.isNew())
    System.out.println("new session created");
    String name=session.getAttribute("Name").toString();
    As expected, it works like session getting set at page1 and used at page2. It works good if users log in one by one. The problem arises when 2 (or more users with different logins) try to access the page at same time. When a new user logs in, the previous user session gets destroyed (session.isNew() becomes true and session Id changes).
    Is it the way I am using sessions (missing something), or there is some setting in tomcat server to specify maximum number of logins (sessions that can be handled).
    Regards
    Kamal

    Hi,
    Thanks for reply, but I guess the problem is not clear. Let me explain..
    A user logs in, he reaches first page (page1.jsp), here session is getting set. Then user goes to page2.jsp where application retrieves the information from session and uses it. It works all well.
    When two (or more) user logs in.. First user logs in, he reaches page 1, session is set. But then another user logs in (different id) and a session is set for him as well. Now the problem here is that session for first user gets destroyed at this point, which is unexpected (two sessions should not conflict, on different machines).
    Additionally, the problem does not happen necessarily at second login. eg. sometimes 4 users log in and when fifth one logs in, fourth gets logged out (session gets destroyed).
    I am not able to figure out, whether the problem is in code (given in first post) or there is some tomcat setting responsible for this behavior.
    Regards
    Kamal

  • Illustrator CS3: perfectly fine pdf gets destroyed when placing in Illustrator

    Hi!
    I am new to Illustrator, but I just dont get the problem. A perfectly looking pdf comes out looking all wrong when it is placed in Illustrator.
    This is how the diagram looks in pdf. Perfectly scalable.
    This is how it looks after beeing imported in Illustrator.
    Everything else that was imported form the pdf looks fine. Only this diagramm gets destroyed!
    Why does this happen?

    How was the PDF created? Printed, Exported? Some other method?
    If nothing else helps, you could do the following: it looks like the problems are only in drop shadows and text. You could delete both from the Power Point file, export, save or print the PDF. Then import into Illustrator and recreate shadows and text there.
    I don't think you could transfer the complete graohic from PP to Illy as vector anyway. So rather get away with as much as you can and then complete it.

  • ServletContext is getting destroyed for unknown reasons with WL 8.1.4

    Our application is working fine untill we used WL 8.1.3. Recently we moved to WL 8.1.4. We have an issue with ServletContext as it is getting destroyed in one particular usecase. ServletContext is getting destroyed and reinitiated, which is causing nonSerializable exception.There is nothing obvious in our code which is causing servletContext to get destroyed.
              Is there any way to know the reason/how servletContext is getting destroyed.

    It might be helpful to use a ServletContextListener and print the stack trace from the destroy callback.
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • MDB gets disconnected at random when the ear is undelpoyed and reployed

    I have the following scenario:
              1. I create a domain
              2. I copy my application ear file to the following location
              ..\user_projects\domains\mydomain\app\myapp.ear
              3. I start the weblogic server
              4. Deploy myapp.ear
              5. By the nature of our application, based on the client's needs, we make a copy of myapp.ear under ..\user_projects\domains\mydomain\app\myclient\ear\myapp.ear and update the ear with new jars and connectors
              6. Without shutting down the server we undeploy the myapp.ear under ..\user_projects\domains\mydomain\app\myapp.ear and deploy the myapp.ear under ..\user_projects\domains\mydomain\app\myclient\ear\myapp.ear
              I run my tests everything works except the tests involving my MDB. When I run the tests the first time, the onMessage() of the MDB gets invoked and the test passes. But on subsequent re-runs of the same test, the MDB fails to respond at some point (it could be the 2nd or the 3rd ..). The onMessage is never invoked. The messages are being pushed on the queue but for some reason, the MDB is loosing its connection. The MDB is a myapp.ear which is deployed first. So when we undeploy the first myapp.ear the MDB gets deactivated and then gets redeployed when the second myapp.ear is deployed. The weird thing is if I restart the server, everything works fine but our clients want this to work without having to restart the server. Any help on this issue is much appreciated.
              Thanks
              Prashanth.

    Hi Prashanth,
              There are a couple of things that you should check:
              1. When you deploy the new version, make sure the server log prints the message that the MDB has been deployed.
              2.Make sure the messages are being sent correctly. If the MDB is not working fine, the messages should still be sitting on the destination.
              Check what is the status of these messages....are they pending messages?
              Hope it helps!
              -Rais

  • Applet is getting destroy in frames

    I am displaying JavaFX chart in one of my frame and I have an option to hide/unhide the frame. When I hide the frame applet, is getting destroyed. The moment when I unhide my frame, iam getting empty screen in that frame. Is there any way to get the control on applet for not to destroy and to destroy when required?

    How do you "hide" the frame?
    Do you use real frames (not a good idea, IMHO) or iframes?

  • Does the sharedObject get destroyed when the browser is closed?

    hey guys, so i just wanted to make sure that when my internet browser is closed it destroys or clears my sharedObject??
    right now i wasnt sure so im doing somehting like the following
    public var sharedObj:SharedObject;
    if(sharedObj != null){
         sharedObj.clear();
    sharedObj = SharedObject.getLocal(...);
    i just wnated to make sure that this is the most effective way to destory the sharedObject just in case there is one left in the browser...
    is there another way to make sure i clear the sharedObjects??

    hello cyber0897,
    No sharedObjects are stored in a cookielike textfile on the clients harddrive, As far as I know there is not an option like with cookies to be destroyed after the browser closes.
    The reset you wrote should be in another order:
    var mySharedObject:SharedObject = SharedObject.getLocal....
    //the above will never give null, because it is created when it doesnt exist.
    //the if (object != null) is useless because of the above, in your post it will be always null, since it is not instantiated...
    mySharedObject.clear();
    mySharedObject.flush(); //not sure if this is neccesary
    You could reset the sharedObject when initializing your application, but if you just want to store variables and get them wherever you need them in your app you could use the singleton class below
    Usage:
    <s:TextInput id="text1" text="@{PrefObj.instance.myString} />
    <s:TextInput id="text2" text="@{PrefObj.instance.myString} />
    (the @ only works in flex 4)
    PrefObj.as
    package
        import flash.events.EventDispatcher;
        [Bindable]
        public final dynamic class PrefObj extends EventDispatcher {
            private static var _instance:PrefObj = new PrefObj();
            public function PrefObj(){
                if (_instance != null){
                    throw new Error("PreferencesManager can only be accessed through PreferencesManager.instance");
            public static function get instance():PrefObj {
                return _instance;
            //add your variables here:
            public var myString:String = "";  

  • PSD files get destroyed

    Hi, I'm using Aperture 2.1.2 for only a few days now, and Photoshop CS4. When I bought Aperture, it said that it was able to handle PSD files. Now, here's my problem:
    1. I drag (or import, no difference) a PSD file (made with Photoshop CS3) with all kinds of layers into a project.
    2. Everything looks fine in Aperture.
    3. I rightclick the image and use the "edit with" command, selecting Photoshop CS4.
    4. The image is opened in Photoshop - and all layers are gone, and it's color inverted. As all the layers are gone (including the color correcting ones), I can't simply hit "invert colors".
    So I tried to rescue at least some important pictures and dragged them out of the Aperture window onto my desktop. They are not PSD files anymore, but JPEG files - at the exact same resolution and much smaller dimensions than the original PSD.
    Is there a solution to this?
    Cheers,
    Gero

    geropf wrote:
    Hi, I'm using Aperture 2.1.2 for only a few days now, and Photoshop CS4. When I bought Aperture, it said that it was able to handle PSD files. Now, here's my problem:
    1. I drag (or import, no difference) a PSD file (made with Photoshop CS3) with all kinds of layers into a project.
    2. Everything looks fine in Aperture.
    3. I rightclick the image and use the "edit with" command, selecting Photoshop CS4.
    Aperture never sends the original file to an external editor - instead, it makes flattened TIFF or PSD copy and sends that out instead.
    4. The image is opened in Photoshop - and all layers are gone, and it's color inverted. As all the layers are gone (including the color correcting ones), I can't simply hit "invert colors".
    I've no idea why the colours are inverted if it looks OK in Aperture, but you will lose all the layers automatically.
    So I tried to rescue at least some important pictures and dragged them out of the Aperture window onto my desktop. They are not PSD files anymore, but JPEG files - at the exact same resolution and much smaller dimensions than the original PSD.
    If you just drag an image out of the Aperture window all you'll get will be a 'Preview' - a JPEG copy of the file. To get the original file out try Export>Export Master...
    Is there a solution to this?
    If you want to edit you original PSD in Photoshop, you'll need to use referenced Masters (read the fine manual, one of the Aperture books or do a search). You will then be able to right-click, choose 'Reveaql in Finder', open the file in Photoshop and edit it. After you save the file (not save as, but a regular save) you should see it's thumbnail in Aperture update.
    Ian
    P.S. At all times, if you want to work with layered files in Aperture you need to make sure that Photoshop is set to save a composite preview in it's files, or you won't see the image accurately in Aperture.

  • Dreamweaver FluidGrid code gets destroyed by BC editor.

    I'm trying to move a website over to HTML5, so I created a new template in Dreamweaver New > Fluid Grid Layout
    The resulting html5 code is below, however when I paste it into a blank template in BC, the conditional statements (lines 2-7):
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    get deleted by the editor. I know I could directly upload the template from Dreamweaver but if the BC editor is going to mess with it or any other HTML5 code then it's going to be a real headache. Any suggestions? Does BC not handle HTML5 or conditional statements?
    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Untitled Document</title>
    <link href="boilerplate.css" rel="stylesheet" type="text/css">
    <link href="css/fluidgridlayout.css" rel="stylesheet" type="text/css">
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="respond.min.js"></script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="div1" class="fluid">Use Insert Panel for additional Fluid Grid Layout Elements. Note: All Fluid Layout tags must be contained within the "gridContainer" div tag.</div>
    </div>
    </body>
    </html>

    None, You should not be having those when you go into editors.
    Your not coding your site through the admin WYSIYG are you?
    IF you are a partner at the top there is the "Developer" tab but if your not then you just get your prefered coding application, code your site and FTP your templates and layouts.
    If your in a blog post and you got html head and body etc in there your not implenting your BC site correctly. You should have that in your template and apply the template to the blog itself and modify your layouts to get the layouts you want.

  • JOptionPane does not get destroyed

    hi everyone,
    i am using jdk1.4.1
    i am using a JOptionPane to show a confirm dialog and then depending on the response i am sending a response to servlet, which processes correctly , then i am redirecting to home page, but at this juncture the dialog box is not destroyed and IE stops responding. Any clue about the problem, please let me know quickly.
    thanks in anticipation,
    ranajit

    I've just read the follow below. Maybe it might remotely concern your problem.
    http://java.sun.com/j2se/1.4.2/changes.html:
    Bug 4672707 fixed: In 1.4.1, invoking modal popup dialogs from an applet's stop or destroy methods is not recommended. Using modal popup dialogs inside these methods could result in problematic behavior, including NullPointerException, the dialog box not being displayed, the dialog box remaining alive even after the applet was destroyed, or in the worst case, browser hang. This problem has been fixed in 1.4.2.

  • MDB gets cannot find recently created Entity Bean

    I have a session bean that creates several entities beans, and puts a message onto
    JMS queue. A MDB is configured to read the queue, and in onMessage(), it calls
    findByPrimaryKey() for one of the newly created EntityBeans. However, the entity
    bean cannot be found.
    All of the beans in question are using container managed transactions, and all
    have transaction required. The entity bean that I'm looking for is using optimistic
    concurrency. I cannot change it to exclusive without redesigning a major part
    of the system, which have solved a similar problem that I encounted earlier that
    did not involve any message driven beans.
    The only way that I got it to work is put in Thread.sleep(5000) right before calling
    the finder. Does anyone know of any alternatives besides having the MDB sleep?

    No, this will work fine with the existing server. If the publish is
    part of the JTA transaction, then no one can consume the message until
    the original JTA transaction has committed.
    -- Rob
    Rajesh Mirchandani wrote:
    XA defines that a transaction's individual operations will either fail or
    succeed atomically. XA can not, and does not define that a transaction's
    individual operations occur exactly simultaneously.
    The WL transaction monitor does not currently provide a way to serialize a
    transactions commit operations on its component resource managers.
    There is an enhancement filed for this, I guess. Follow up with BEA support.
    Rob Woollen wrote:
    Vina Wang wrote:
    The JMS send is part of the transaction, sort of. The call is within
    the session
    bean transaction, but I'm not using transacted session for
    JMSPulisher. Would
    that fix the problem?Sadly this is a confusing aspect of JMS. You want a non-transacted
    session because you want it to participate in the global transaction
    that the EJB started. Also, make sure that you've enabled user
    transactions on your connection factory.
    There's more info here:
    http://edocs.bea.com/wls/docs70/faq/jms.html#252635
    Let us know if you're still having problems.
    -- Rob
    I know that the transaction hasn't been commited, but I was monitoring
    database
    via SQL call when I tried this. There was about 2 second delay on my
    development
    machine.
    Rob Woollen wrote:
    My guess is the MDB is receiving the message before your "create entity
    bean" transaction has committed. Is the JMS send part of the "create
    entity bean" transaction? It probably should be.
    You can easily prove this by writing a few lines of JDBC to hit the
    database and check for your primary key.
    I would not recommend changing to exclusive or using the Thread.sleep.
    -- Rob
    Vina Wang wrote:
    I have a session bean that creates several entities beans, and putsa
    message onto
    JMS queue. A MDB is configured to read the queue, and in onMessage(),
    it calls
    findByPrimaryKey() for one of the newly created EntityBeans. However,
    the entity
    bean cannot be found.
    All of the beans in question are using container managed transactions,
    and all
    have transaction required. The entity bean that I'm looking for is
    using optimistic
    concurrency. I cannot change it to exclusive without redesigning a
    major part
    of the system, which have solved a similar problem that I encounted
    earlier that
    did not involve any message driven beans.
    The only way that I got it to work is put in Thread.sleep(5000) right
    before calling
    the finder. Does anyone know of any alternatives besides having the
    MDB sleep?
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • IOS4 - Folders get destroyed as soon as you SYNC

    Just upgraded my 3GS to iOS4 and created some folders to store various apps. All created lovely, and then I made the mistake of SYNCing to iTunes. Immediately all of the folders that I'd created were destroyed, putting all of the apps back over multiple screens again. So I disconnected from iTunes, and tried again... recreated all the folders, and re-SYNC to iTunes... exactly the same thing happened!
    Great I can create folders, but as soon as I sync the iPhone, they're deleted!
    What is the point of that Apple???
    Message was edited by: FreakyBeanz
    Message was edited by: FreakyBeanz

    Sorry to be dense but I haven't figured out how to do the folders yet. Anyone want >to tell me the process since Apple didn't provide directions with the update?
    There are lots of resources online, such as:
    http://gizmodo.com/5568954/the-complete-guide-to-using-ios-4?utmsource=feedburner&utm_medium=feed&utmcampaign=Feed:gizmodo/full(Gizmodo)

  • Does the restore previous session call get destroyed too with the new forget button in firefox

    I have checked under startup to restore previous session ... Can it still if I use the new forget button since it states all tabs are closed ... so that would be last session to my thinking Rick Carter

    I think there is a serious risk that your session history will be cleared, too. However, I haven't tested it yet. If you want to preserve a copy of your session history files while you experiment, you can back them up as follows:
    Open your current Firefox settings (AKA Firefox profile) folder using either
    * "3-bar" menu button > "?" button > Troubleshooting Information
    * (menu bar) Help > Troubleshooting Information
    * type or paste about:support in the address bar and press Enter
    In the first table on the page, click the "Show Folder" button. This should launch a list of your settings files.
    Look for a folder named '''sessionstore-backups''' and copy it in its entirely to a safe location such as your Documents folder.
    You also should find a file named sessionstore.js which contains your current session windows and tabs. You could back that one up, too, but the recovery.js file in the sessionstore-backups folder should be identical or virtually identical (it may lag a little, but should be updated to be the same fairly quickly).

  • What to do if Ipod get destroyed or damaged and where can I take it for repairation?

    Where can I take my ipod so it can be repaired?

    Your local apple store. You will probably want to call and make an appointment first.

  • MDB Maximum concurrent beans for Weblogic on Linux

    Has anyone noticed that the formula for determining maximum concurrent beans in use for MDBs for WL/Linux platform does not work. However, it does work for WL/Windows. The number of bean in use keeps growing (not bounded by either the number of worker threads or <max-beans-in-free-pool> settings. I have noticed the number crossing 1000 when <max-beans-in-free-pool> is set to only 40 and ThreadCount on the default execute Queue is only 100.

    if your MDB is using the default Execute Queue with 100 threads, the max instances of the mdb should be 51.
    I am surprised that this should be different on Win and Linux.
    Are your beans getting destroyed due to exceptions being thrown from the onMessage method ? this would be reflected in the DestroyedBeansCount.
    which version are you using ?
    cheers,
    Mihir

Maybe you are looking for