Reentrant lock with Orchestra conversation scoped bean on second AJax call

I'm just trying to set us a fairly straightforward JSF 2.0 / Spring / PrimeFaces application. Since backing bean expiry has been such a nuisance I thought I'd give Orchestra's conversation scope mechaniism a go.
the problem I'm getting seems to occur on the second Ajax transaction for the page.
WARNING: Waited for longer than 30000 milliseconds for access to lock org.apache.myfaces.orchestra.lib._ReentrantLock@2e8da6a9 which is locked by thread http-8084-5
22-Mar-2011 11:16:13 org.apache.myfaces.orchestra.lib._ReentrantLock lockInterruptiblyThis message repeats, and the Ajax transaction never returns.
I know that Orchestra locks the coversation scoped beans during the processing of a transaction to avoid threading issues (since they may contain non-reentrant objects like EntityMangers etc.) I'm assuming that, somehow, the backing bean is not unlocked at the end of the first Ajax transaction. But the configuration of listeners etc. should be being done automatically.
Anyone tried a combination like this?

never even heard of it. If I'd need a conversation scope (and I rarely do), I'd go for Seam 3 in stead even if it is not final yet.

Similar Messages

  • Oracle-ADF inlineFrame initializing view scoped bean twice

    I am facing strange issue related with af:inlineFrame component. Trying to display/render ADF page inside of af:popup within af:inlineFrame component. The weird thing is when the popup displayed; view scoped bean's @PostConstruct method called twice. That means bean is initialized twice. However it needed to be initialized once since bean is referenced from the page that is going to be displayed inside af:inlineFrame.
    Correct flow gotta be:
    Click to button openPopup() method called.
    openPopup() sets URI then opens popup.
    inlineFrame source property set as it's going to display framePage.jspx.
    JSF scans framePage.jspx code finds out there is a reference to FrameBean inside af:outputLabel
    Construct FrameBean then call @PostConstruct method.
    Call appropriate getter and render page.
    What happens in my case:
    Click to button openPopup() method called.
    openPopup() sets URI opens popup.
    inlineFrame source property set as it's going to display framePage.jspx.
    JSF scans framePage.jspx code finds out there is a reference to FrameBean inside af:outputLabel
    Construct FrameBean then call @PostConstruct method.
    Call appropriate getter and render page.
    Construct FrameBean then call @PostConstruct method.
    Call appropriate getter and render page.
    Popup located like:
    <af:popup id="mainPopup" binding="#{mainBean.mainPopup}">
    <af:dialog id="mainDialog">
      <af:inlineFrame source="#{mainBean.URI}"> </af:inlineFrame>
      </af:dialog>
    </af:popup>
    Showing popup via af:button action="#{mainBean.openPopup}":
    public void openPopup() {
    this.setURI("http://localhost:7001/app/framePage.jspx");
      RichPopup.PopupHints hints = new RichPopup.PopupHints();
    this.getMainPopup().show(hints);
    framePage.jspx:
    <?xml version='1.0' encoding='UTF-8'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <jsp:directive.page contentType="text/html;charset=UTF-8" />
    <f:view>
    <af:document title="Frame Demo" id="demoDocument">
      <af:form id="demoForm">
    <af:outputLabel value="#{frameBean.commonId}">   </af:outputLabel>
      </af:form>
      </af:document>
    </f:view>
    </jsp:root>
    FrameBean:
    @ManagedBean
    @ViewScoped
    public class FrameBean {
    private String commonId;
      @PostConstruct
      public void afterInit() {  } 
      public String getCommonId() {
    return commonId;
    public void setCommonId(String commonId) {
    this.commonId = commonId;
    Making FrameBean @SessionScoped solves this issue since bean is kept with session but I don't want to keep it within session. Also setting source property of af:inlineFrame in jspx as hardcoded not fixing the problem.

    im using ADF Essential on Glassfish 3.1 with no problem, but glassfish is heavyweight. I think Oracle ADF is not dependent to Application Server , then i tried to use my project with Tomcat 7. I deployed my application on Tomcat 7 , but im getting some exceptions.
    Not all application servers support Oracle ADF.
    Refer the certification matrix, Tomcat 7 is not listed as being supported.
    http://www.oracle.com/technetwork/developer-tools/jdev/index-091111.html

  • Pageflow-scoped bean "disappearing" during postbacks

    Hello,
    I'm getting crazy with an error with a pageflow-scoped bean which suddenly "disappers"...
    What I need to do is to use a bean to mantain the visibility status of 2 components (one is visible while the other isn't), an edit form and a warning message:
      <af:outputText value="some warning text"
                     visible="#{!pageFlowScope.untitled1.editFormViewable}"/>
      <af:panelFormLayout visible="#{pageFlowScope.untitled1.editFormViewable}">
      </af:panelFormLayout>the editFormViewable boolean variable is updated within the selectionListener of a tree (which also resides in the same bean), according to the node
    selected by the user:
    public class Untitled1Bean implements Serializable {
      private Boolean editFormViewable;
      public Untitled1Bean() { }
      public void treeSelectionListener(SelectionEvent event) {
        // manipulates editFormViewable
    }so I either show the form or the warning message. I need to retain editFormViewable across requests so backingBean scope isn't fully appropriate, but I'm also in a bounded taskflow so according to the guide viewscope is not supported. So I went for pageFlow scope.
    Here's the definition for the managed bean in my bounded taskflow:
        <managed-bean>
          <managed-bean-name>untitled1</managed-bean-name>
          <managed-bean-class>test.view.backing.Untitled1Bean</managed-bean-class>
          <managed-bean-scope>pageFlow</managed-bean-scope>
          <managed-property>
            <property-name>editFormViewable</property-name>
            <property-class>java.lang.Boolean</property-class>
            <value>false</value>
          </managed-property>
        </managed-bean>Now, when I enter the taskflow and load the page everything is fine, editFormViewable is correctly initialized to false (same if I set it to true) and the page displays correctly.
    However, as soon as I expand a node of the tree to access its children, my app dies with the following exception:
    javax.el.PropertyNotFoundException: Target Unreachable, 'untitled1' returned null
         at com.sun.el.parser.AstValue.getTarget(AstValue.java:88)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:153)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1264)
         at org.apache.myfaces.trinidad.component.HierarchyUtils.__handleBroadcast(HierarchyUtils.java:81)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:227)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:220)
         at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:153)
         at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:231)
         at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:220)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:754)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:282)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         ...So it seems that during postbacks on that page the managed bean is no longer accessibile? How can a pageFlow bean disappear at that point? The bounded taskflow only has a view activity with my page, I'm in, why is the bean getting instanced correctly and then lost?
    Can someone please shed some light on this? I've used beans with scope longer than backing bean before, but never encountered such a problem.

    Sorry but that can't be right, probably just a leftover from previous versions or a mistake in the doc.
    JDeveloper itself on the "Managed Beans" tab of any taskflow, when registering a managed bean, presents you with a combobox offering 7 choices including pageFlow scope.
    Why would JDeveloper offer a non-existant feature in its UI?
    Also, I've used and seen them before. Check custRegBasicInformationBean, custRegDefineAddressesBean and welcomeUserRegistrationBean in FOD, they're pageflow-scoped beans and they do work.
    Mine works too, except that it breaks completely on postbacks from a tree.

  • Any help regarding iphone 4 and locks with o2

    any help regarding iphone 4 and locks with o2
    i just got my second hand iphone4
    and a friend of a friend said it was factory unlocked
    and received txt from o2 saying it was unlocked
    however when i got home i put my micro sim into it
    and
    itunes said
    "this sim card appears to be unsupported" or something similer
    it is factory unlocked because the model number in the settings is
    MC603B
    i rang o2 to ask for unlock. gave them the imei code and they said they have to send the request off to apple for a code

    i rang o2 to ask for unlock. gave them the imei code and they said they have to send the request off to apple for a code
    Obviously the iPhone was/is not unlocked or this would not be required, and there is your answer, which can take up to two weeks.

  • Using Query String Parameters with Session Scoped bean

    I would like to pass query string parameters from a product page (user clicks on a specific product commandLink) that is request scope to a details page that is session scoped.
    The problem is that the session scoped page only handles the first request. If you view the details of a product and then navigate back to the product page and choose another product ... the details page will not handle the new query string parameters and display the details for the first product chosen.
    Is there a way to make the session scoped bean recognize the query string parameters past the first request?

    I was able to replicate this problem with a very simple app that performs a redirection... just like the real app. Here's the simple app that I put together:
    From request scope page:
    <f:view>
             <h:form>
               <h:commandButton value="Link 1" action="#{reqbean.Link1}"/>
               <br/><br/>
              <h:commandButton value="Link 2" action="#{reqbean.Link2}"/>
            </h:form>
           </f:view>
    From request scope bean:
    public String Link1() throws IOException
        // Add event code here...
        //redirect the user
        FacesContext.getCurrentInstance().getExternalContext().redirect("untitled2.jspx?p=1");
        return null;
      public String Link2() throws IOException
        // Add event code here...
        //redirect the user
        FacesContext.getCurrentInstance().getExternalContext().redirect("untitled2.jspx?p=2");
        return null;
      }At this point... I put a println in the constructor of the session scoped bean because this is where I want to get the query string params. The constructor only gets called the first time a redirect is performed.

  • File sender with content conversion and ignoreRecordsetName

    Him,
    I have an scenario with a compressed file sender with content conversion.
    In my sender cc i have:
    1     AF_Modules/PayloadZipBean     Local Enterprise Bean     unzip
    2     AF_Modules/MessageTransformBean     Local Enterprise Bean     transform
    3     CallSapAdapter     Local Enterprise Bean     2
    In module configuration, I have also added:
    xml.ignoreRecordsetName  --> true
    But RecordsetName is not removed from XML
    Why?
    thanks, in advance
    Carme

    Hi,
    No need to enter anything in module configuration. Just specify following Name-Value pair in the table provided on the Content Conversion tab of your file adapter.
    Add a row with Name = ignoreRecordsetName and Value = true (Both case-sensitive)
    For details, see [this link|http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm].
    [some more here|http://www.riyaz.net/blog/index.php/2008/02/20/xipi-file-content-conversion-for-complex-structures/]
    Regards,
    Riyaz

  • My phone is carrier locked with telenor sweden and telenor is ready to unlock but payment must be paid through swedish credit card , that i dont have so what i can do  to unlock , i m ready to pay for carrier unlock what can i do?

    My phone is carrier locked with telenor sweden and telenor is ready to unlock but payment must be paid through swedish credit card , that i dont have so what i can do  to unlock , i m ready to pay for carrier unlock what can i do? I had a conversation through mail to telnor support , i got reply that only swedish credit card, no abroad credit card.

    yes, when you bought the code, telenor tell you wait a few days, they offer to apple and unlock for your iphone, after a few days, you can check in the web, your imei Unlocked and you must restore your iphone with iturn, and conratulation your phone has been unlocked...

  • Are session-scoped beans singleton

    Hi all, I miss something in the bean lifecycle within JSF. Assume that a page action navigates toward another page, linked to a session-scoped bean: this is created for the duration of this session. Then a button leads back to the original page, so that another action will lead to another page with its associated bean. Is this a new bean or the previous one ?
    This question is linked to the topic of bean dependencies through managed properties: it works fine, but since a bean is declared per class and not per instance, I miss the overall instantiation philosophy.

    Once the bean is created the first time in session, it will not be created again (until the session dies and you attempt to access the bean again of course).
    So in your scenario, the first time you access the page the bean gets created. When you go back and then go forward to the page again, a new bean is not created. The originally created one is re-used. Which means the constructor is not called again.
    CowKing

  • Non-reentrant locking

    Hi,
    I am trying to prevent someone from submitting the same information twice in quick succession on my Tomcat web application before the first submit action has completed.
    Here is basically what my code looks like now:
    String email = getEmailAddressOfSubmitter();
    synchronized (email) {
    // Process data that has been submitted
    // This processing needs to finish completely before
    // this block is executed again for this same email
    This is preventing other threads from entering this synchronized block until it has completed, but it looks to me like the same thread entering this method again with another request is allowed to go through, because the thread already has the lock on this email address object.
    This is causing data to be saved twice because in the short time between when I check if a record already exists in the database and when a new one has been saved another request sneeks in and also saves a record.
    How can I prevent the same thread from entering this block again with another request until processing has finished for this email?
    I suspect it has something to do with non-reentrant locking, but I don't understand a word of what I've read about it so far.
    Thanks in advance,
    Evert

    I don't know if this is the problem with your
    program, but what you describe is possible: in Java
    (differing from POSIX threads) a thread can access a
    single lock (a synchronized method) more than once.
    It's called reentrant locking.I assume that in practice this can really just happen if I have a method that calls itself. In my case with a web application, I assume the thread would complete one request completely before starting with the next http request. Other threads might interject, but the same thread should finish one request before starting the next.
    I've done what BinaryDigit suggested and synchronized on email.intern() instead of just on email, and it looks like that did the trick. After 6 years of Java programming, I've forgotten that two strings are not necessarily == when they are equal. It's time for me to grab my beginner Java books again!

  • Trouble exporting with QT conversion

    Hey all-
    When I export using QT conversion, choosing the LAN/Intranet option, the export takes a couple hours and the product is, for lack of better a explination, "herky-jerky." Like there are frames dropped in it.
    Most of the media in the original project suddenly went offline, and I can't find or reconnect it. Thankfully, I was able to export a full quality version just prior to this happening. So I'm just taking that file, importing it into FCE, and exporting it with the conversion. Which is assume is a fine solution. All rendered and mixed-down. Any suggestions?
    I have FCE 4.0 and QT 7.6.

    You should have edited your video in a Timeline that reflects the codec used in the original material.
    Export a QuickTime movie using "Current Settings". No recompression or conversion.
    The movie can be Self Contained or a Reference Movie.
    Bring that file into Compressor. Choose a DVD Preset that fits your movie. For instance, Best Quality 90 Minutes if your movie is less than 90 minutes long. Click on "All" and delete the AIFF audio file from Compressor. Click on Submit. Wait.
    Bring the m2v and ac3 files into DVD Studio Pro. Author and burn your DVD.
    Alternative: Bring the exported movie from FCP into DVD SP and let the encoding take place there instead of in Compressor. Or as David suggests above, Export Using Compressor. Note that this will lock up FCP for the duration of the encoding.

  • Passing values between views in View Scoped Bean

    I have a form page that uses a view scoped backing. This page forwards to a confirmation page that uses the same backing bean. I would like to redisplay the information to the user that they entered in the form and then process these values when they hit submit on the confirmation page. However, when on the confirmation page, all of the values from the bean are null. I understand that view scoped beans are destroyed when you go to a new view, but when this bean was request scoped I could see the values on this page and save them in hidden inputs to process in the backing bean. I can still see the form values in the request parameters. Also, I cannot use a request scoped bean due to multiple ajax requests that are on the form. How can I propagate the values from the first form page to the second confirmation page?
    I am using Mojarra JSF 2.0
    Edited by: edenbaptiste on Apr 22, 2010 4:25 PM

    Here is some Sample code.
    The Payment Page:
    <ui:composition>
        <form jsfc="h:form" id="form">
            <h:messages/>
            <select id="paymentMethod" jsfc="h:selectOneRadio" value="#{testPaymentBean.paymentMethod}" immediate="true">
                <option jsfc="f:selectItem" itemValue="first" itemLabel="Pay with First Type"/>
                <option jsfc="f:selectItem" itemValue="second" itemLabel="Pay with Second Type"/>
                <f:ajax render="paymentPanel"/>
            </select>
            <h:panelGroup id="paymentPanel">
                <ui:include src="#{testPaymentBean.paymentPanel}"/>
            </h:panelGroup>
            <h:commandButton action="#{testPaymentBean.handlePayment}" value="Submit"/>
        </form>
    </ui:composition>The First Payment Type Form Fragment:
    <ui:composition>
        <h:panelGroup layout="block">
            <h:outputLabel for="amount" value="Enter Payment Amount: " />
            <h:inputText value="#{testPaymentBean.amount}">
                <f:validateLongRange minimum="0" />
            </h:inputText>
            <h:message for="amount"/>
            <br />
            <h:outputLabel for="holderName" value="Enter Account Holder Name: " />
            <h:inputText value="#{testPaymentBean.name}" />
            <h:message for="holderName"/>
            <br />
            <h:outputLabel for="accountNumber" value="Enter Account Number" />
            <h:inputText value="#{testPaymentBean.accountNumber}">
                <f:validateLongRange minimum="0" />
            </h:inputText>
            <h:message for="accountNumber"/>
        </h:panelGroup>
    </ui:composition>The Second Payment Type Form Fragment:
    <ui:composition>
        <h:panelGroup layout="block">
            <h:outputLabel for="amount" value="Enter Payment Amount: " />
            <h:inputText value="#{testPaymentBean.amount}">
                <f:validateLongRange minimum="0" />
            </h:inputText>
            <h:message for="amount"/>
            <br />
            <h:outputLabel for="holderName" value="Enter Account Holder Name: " />
            <h:inputText value="#{testPaymentBean.name}" />
            <h:message for="holderName"/>
            <br />
            <h:outputLabel for="accountNumber" value="Enter Account Number" />
            <h:inputText value="#{testPaymentBean.accountNumber}">
                <f:validateLongRange minimum="0" />
            </h:inputText>
            <h:panelGroup id="physicalAddrPanel" layout="block"
                          style="display: #{testPaymentBean.physicalAddressDisplayStyle}">
                <h:outputLabel for="addrFirstLine" value="Address Line 1: " />
                <h:inputText value="#{testPaymentBean.streetLineOne}" />
                <h:commandLink value="Use PO Box" immediate="true">
                    <f:ajax render="poBoxPanel physicalAddrPanel" />
                    <f:setPropertyActionListener value="display" target="#{testPaymentBean.poBoxDisplayStyle}"/>
                    <f:setPropertyActionListener value="none" target="#{testPaymentBean.physicalAddressDisplayStyle}"/>
                </h:commandLink>
                <h:message for="addrFirstLine"/>
                <br />
                <h:outputLabel for="addrSecondLine" value="Address Line 2: " />
                <h:inputText value="#{testPaymentBean.streetLineTwo}" />
                <h:message for="addrSecondLine"/>
                <br />
                <h:outputLabel for="addrThirdLine" value="Address Line 3: " />
                <h:inputText value="#{testPaymentBean.streetLineThree}" />
                <h:message for="addrThirdLine"/>
            </h:panelGroup>
            <h:panelGroup id="poBoxPanel" layout="block"
                          style="display: #{testPaymentBean.poBoxDisplayStyle}">
                <h:outputLabel for="poBox" value="PO Box Number: " />
                <h:inputText value="#{testPaymentBean.poBoxNumber}">
                    <f:validateLongRange minimum="0" />
                </h:inputText>
                <h:commandLink value="Use Physical Address" immediate="true">
                    <f:ajax render="poBoxPanel physicalAddrPanel" />
                    <f:setPropertyActionListener value="none" target="#{testPaymentBean.poBoxDisplayStyle}"/>
                    <f:setPropertyActionListener value="display" target="#{testPaymentBean.physicalAddressDisplayStyle}"/>
                </h:commandLink>
                <h:message for="poBox"/>
                <br />
                <h:outputLabel for="zipCode" value="Zip Code: " />
                <h:inputText maxlength="5" size="5" value="#{testPaymentBean.zipCode}">
                    <f:validateLongRange minimum="0" />
                    <f:validateLength minimum="5" />
                </h:inputText>
                <h:message for="zipCode"/>
            </h:panelGroup>
        </h:panelGroup>
    </ui:composition>The Backing Bean:
    import java.io.Serializable;
    import javax.faces.bean.ManagedBean;
    @ManagedBean()
    public class TestPaymentBean implements Serializable{
        private String paymentMethod;
        private String name;
        private double amount;
        private String accountNumber;
        private int poBoxNumber;
        private String streetLineOne;
        private String streetLineTwo;
        private String streetLineThree;
        private String zipCode;
        private String poBoxDisplayStyle;
        private String physicalAddressDisplayStyle;
        private boolean poBoxUsed;
        public TestPaymentBean(){
            paymentMethod = "first";
            poBoxDisplayStyle = "none";
            physicalAddressDisplayStyle = "display";
        public String getPaymentPanel() {
            if(paymentMethod.equalsIgnoreCase("second")){
                return "/sections/formfragments/testSecondPaymentContentPanel.xhtml";
            } else if(paymentMethod.equalsIgnoreCase("first")){
                return "/sections/formfragments/testFirstPaymentContentPanel.xhtml";
            return null;
        public String handlePayment(){
            if(paymentMethod.equalsIgnoreCase("second")){
                return handleSecondPayment();
            } else if(paymentMethod.equalsIgnoreCase("first")){
                return handleFirstPayment();
            return null;
        private String handleSecondPayment() {
            poBoxUsed = poBoxDisplayStyle.equalsIgnoreCase("display");
            return "testpaymentconfirmation";
        private String handleFirstPayment() {
            return "testpaymentconfirmation";
        public String handleSecondConfirm() {
            return "testpaymentsuccess";
        public String handleFirstConfirm() {
            return "testpaymentsuccess";
        //Getters and Setters
    }The Confirmation Page:
    <ui:composition>
        <form jsfc="h:form" id="form">
            <c:choose>
                <c:when test="#{fn:containsIgnoreCase(testPaymentBean.paymentMethod, 'first')}">
                    <ui:include src="/sections/formfragments/testFirstPaymentConfirmationContentPanel.xhtml"/>
                </c:when>
                <c:when test="#{fn:containsIgnoreCase(testPaymentBean.paymentMethod, 'second')}">
                    <ui:include src="/sections/formfragments/testSecondPaymentConfirmationContentPanel.xhtml"/>
                </c:when>
            </c:choose>
        </form>
    </ui:composition>

  • When exactly are request-scoped beans evicted from memory?

    Hi,
    I have a question about request-scoped JSF-managed beans and request-scoped HibernateFilter. It seems to me that request-scoped JSF beans actually outlive an HTTP request. Here's what I mean. Let's say I have a page backed by a request-scoped bean #{myBean} which displays a dataTable. a user can click on a row to perform some operation on row data.
    I always thought the following to be true about lifecycle of JSF request-scoped bean:
    1.User makes initial page request
    -HTTP Request 1 (R1) comes in
         1. RestoreView encounters #{myBean} in page and constructs MyBean
         2. RenderResponse renders the page
    -R1 is terminated, page is displayed, myBean is evicted from memory
    2.User looks at the dataTable and clicks on a specific row (via commandLink). Now MyBean.action() is supposed to be
    executed and perform some operation on row data:
    -HTTP R2 comes in
         1.MyBean is constructed again (e.g. not using same instance as in R1). (THIS IS KEY!)
         2.myBean.action() is executed
    -R2 is terminated, myBean is again evicted from memory
    Is the above understanding correct?
    Or does myBean instance (and its' properties) remain in appserver memory between R1 and R2 and R2 actually uses the
    same instance of myBean?
    If scenario above is correct, then I have a strange problem:
    -when performing myBean.action() during R2 on rowData (which is instance of MyHibernateBean) I get a
    HibernateException stating that bean isn't associated with a Hibernate Session. This can only happen if the lifecycle of the object and its' parent myBean exceeded that of R1. That is because I have a Hibernate Servlet
    Filter that a) start a Hibernate Transaction on incoming request and b) commits it on the way out.
    Here's pseudo-code for myBean:
    public class MyBean {
        public static String HANDLE = "#{myBean}";
        //getters setters omitted
        //used as 'value' in dataTable
        private List<MyHibernateBean> dataBeans;
        //dataTable binding
        private UIData tableData;
        public MyBean() {
        public String action() {
            //read children & modify state of a hibernate bean
            MyHibernateBean dataBean = (MyHibernateBean) this.tableData.getRowData();
            HibernateUtil.getCurrentSession().refresh(dataBean); //seems necessary as dataBean instance deemed 'stale'
            dataBean.getChildCollection(); //will fail without line above
            return "toSomewhereElse";
    }

    By the way, I have an hypothesis why this does not work...
    The datatable values MUST be specified using a value binding expression. When the restoreState method for the component is called, JSF attempts to use the VB expression to get the table values. When the managed bean is not found, it creates a new (empty) one and the world ends (actually it just returns back to the original page because it cannot figure out what to do)

  • Reentrant locks and exec()

    I'm trying to run Linux system commands on locked resources in the context of a p2p distributed system. As persons in this forum probably know probably better than I do, this is remarkably difficult. I've tried a variety of different approaches and languages. My latest stab is doing it with Java and the Hazelcast system as the distributed lock manager. Supposedly Hazelcast's distributed locks work the same way as Java's "regular" reentrant locks and so I'm trying to understand exactly what will happen with those under different failure modes. For example, say I have some code that roughly looks like this:
    private final ReentrantLock lock = new ReentrantLock();
    public void m() {
         lock.lock();  // block until condition holds
         try {
                   Process p = Runtime.getRuntime().exec("some system command that will take a long time");
        } finally {
           lock.unlock()
    }Am I correct that the parent process could lose the lock or otherwise fail while the process that runs the system command is oblivious and keeps happily running anyway? Is there some easy way to guard against that? Thanks for any insight!

    Runtime.exec() returns immediately and the lock will be released right after exec(), so yes, the system command will keep running anyway. Probably what you need to to is to wait until the spawned process finishes ( Process.waitFor() )

  • HT201328 Hi there, I purchased an Iphone 4S, it is currently locked with one carrier, I am in a contract with another carrier. I am trying to unlock the phone, but the Carrier says I have to activate it through them to unlock it. I so not want to do that,

    Hi there, my daughter purchased a used iPhone 4S from a local newspaper who has had it in the lost and found for nearly a year, and no one ever claimed it. It is locked with Telus, my daughter is a Virgin Mobile customer. Telus told me they will only unlock it if she activates it with them, she cannot do that as she is in a contract with Virgin. Is there anything I can do to get around this problem?

    Only the carrier to which the iPhone is locked can unlock it. In
    this case, you must work with Telus. If they have a pay as you go
    plan, activate the iPhone on Telus that way and then after
    you meet whatever requirements Telus has, stop using Telus
    and move the iPhone to Virgin. Or sell the iPhone to someone
    who can use it on Telus.
    Telus is the only one who can unlock that iPhone.

  • 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

Maybe you are looking for

  • How do I BACK UP my emails ?

    What I mean by back up in this instance is, I am wiping my OS and starting clean... and this time is the first time I have some emails that I have in my mailbox(s) sent, personal, business, etc... that I want/need. So how do I find the file(s) that a

  • How do i check the number of licenses remaining from the volume license of Acrobat XI

    We have purchased 8 licenses of Acrobat XI pro, and there is only one key associated with it. Can anyone let me know, where can i get information regarding the number of licenses already in use, and MAC addresses associated to the PC in which its act

  • Rogue Ap' s and clean air

    Hi  Is there a relation between rogue access point detection and clean air , Rogue access point detection is based on the clean air technology  ?

  • CFFTP Usage

    I am trying to utlitize cfftp in the following scenario: 1. user logs into our website. 2. user clicks link to .cfm template which uses cfftp to display contents of their personal directory (located on our ftp server, which is a different physical ma

  • Error message on searching for system updates and news feeds

    I always get an error message when I attempt System Updates and when I attempt to subscribe to news feeds through the app that is pre-loaded on my phone.  Any help is greatly appreciated.