Help: PhaseListener -session or Application scoped?

Hi.,
I am using default PhaseListener in my backing bean's (for 2 beans) constructor with a method as shown below:
public void beforePhase(PhaseEvent event) {
               resetValues();
       }So whenever a page reloads then this method gets invoked. Its working pretty fine.
The problem is when I open a new browser and open the application's index page then resetValues() method got invoked.
I saw with debug that the PhaseListener array inside the lifecycle was having the old one's backing bean (PhaseListener).
I do I restrict the PhaseListener to session scope?
Any help is highly appreciated.

see the Javadocs of PhaseListener:
An interface implemented by objects that wish to be notified at the beginning and ending of processing for each standard phase of the request processing lifecycle.
http://java.sun.com/javaee/javaserverfaces/1.1/docs/api/javax/faces/event/PhaseListener.html

Similar Messages

  • Application scoped objects in a cluster

    Hi -
              Will weblogic clustering provide failover for Application scoped
              objects (in the ServletContext)? I've read through most of the
              documentation, and it doesn't mention anything. Also, the servlet 2.3
              spec says
              "Context attributes are local to the VM in which they were created.
              This prevents
              ServletContext attributes from being a shared memory store in a
              distributed
              container. When information needs to be shared between servlets
              running in a
              distributed environment, the information should be placed into a
              session (See
              Chapter SRV.7, “Sessions”), stored in a database, or set
              in an Enterprise
              JavaBeans TM component." (Section 3.4)
              However, it doesn't mention anything about failover.
              We have lots of application scoped objects that will need to failover
              somehow - anyone have experience with this?
              Thanks,
              Scott
              

    Hi Scott,
              The application scoped objects (ServletContext) are per Web Container as
              explained in the spec. When the server hosting that Web Container dies, so
              too do the objects in the ServletContext.
              If you are looking something like ServletContext that is replicated across
              the cluster and supports failover, you should check out our Coherence
              product at http://www.tangosol.com/ -- that is exactly what it does.
              Peace,
              Cameron Purdy
              Tangosol Inc.
              Tangosol Coherence: Clustered Coherent Cache for J2EE
              Information at http://www.tangosol.com/
              "Scott Gilpin" <[email protected]> wrote in message
              news:[email protected]...
              > Hi -
              >
              > Will weblogic clustering provide failover for Application scoped
              > objects (in the ServletContext)? I've read through most of the
              > documentation, and it doesn't mention anything. Also, the servlet 2.3
              > spec says
              >
              > "Context attributes are local to the VM in which they were created.
              > This prevents
              > ServletContext attributes from being a shared memory store in a
              > distributed
              > container. When information needs to be shared between servlets
              > running in a
              > distributed environment, the information should be placed into a
              > session (See
              > Chapter SRV.7, &#8220;Sessions&#8221;), stored in a database, or set
              > in an Enterprise
              > JavaBeans TM component." (Section 3.4)
              >
              > However, it doesn't mention anything about failover.
              >
              > We have lots of application scoped objects that will need to failover
              > somehow - anyone have experience with this?
              >
              > Thanks,
              > Scott
              

  • Help! Captive Runtime application folder disappears after publishing.

    I'm using windows 7 and flash cs6.
    I've successfully created Applications with runtime embedded before, but now with the same source files when I publish it takes ages (as normal), but when it finishes the temp files that were being created dissappear and there's no application folder.
    While it's publishing three temp files are created and increase in size, but then dissappear.
    I've no idea what is going on, has anyone else experiences this?
    Cheers
    Chris

    This is turning into a bit of a self help therapy session.  Anyway now I've got it working again in any folder.  The only thing I think I'm doing differently is pressing publish from the main publish settings panel rather than pressin publish from the AIR settings panel...
    .. Yes I've just checked and if I publish from the publish settings panel all works as it should, but if I press publish in the AIR settings panel it has this weird problem.
    Thanks Chris that's helped.
    No worries Chris.  By the way do you realise you are talking to yourself.
    Don't worry, I don't think anyone has noticed, but perhaps ease up on the coffee.
    Phew! Bye
    See ya

  • Can we create a session from application(Servlet Context)

    hi i m newbie in J2ee ,
    we can easilly create session from request object ,so can we create a
    session from application object(Servlet context),
    by which objects we can create a session.? plz help me

    hi i m newbie in J2ee ,
    we can easilly create session from request object ,so can we create a
    session from application object(Servlet context),
    by which objects we can create a session.? plz help me

  • Scopes: session vs. application

    I'm a bit confised. What exactly is the difference between the scopes "session" and "application"?
    If "Session information is scoped only to the current web application (ServletContext)", then what is the difference? I get that application is suppose to be a bigger scope than session. But how so?
    Before, when I couldn't access the session attributes from a JSP in a different directory, I was able to access the application attributes from that same JSP. So, I guess they (the two JSPs in different directories) are in the same application but somehow do not share session. But this then invalidates the API spec "Session information is scoped only to the current web application (ServletContext)". It seems that Session info is scoped to less than the current web application. But again, how much less?
    Much thanks.

    Wonderful reply. Thank you. That does clear up some things for me.
    The thing is though, why is it that when I have two JSPs residing in different folders and I go from one JSP to the other and all of the sudden am dealing with two sessions?
    To give you a very simple example:
    The output of one run of /OneTwo/One/sessionTest.jsp is:
    Hello This is a session test. Setting session variable hello....
    This is the session attribute hello now: hello
    session id = ds816a11190050i1h1aq
    Go to this other page to check session: /OneTwo/Two/sessionTest.jsp
    When I clicked on the link and went to /OneTwo/Two/sessionTest.jsp, I got:
    Hello This is a session test. Getting session variable hello....
    This is the session attribute hello now: null
    session id = ds816a11190050j1h40g
    Go to this other page to check session: /OneTwo/One/sessionTest.jsp
    --------------------------------------------/OneTwo/One/sessionTest.jsp--------------------------------------------
    <HTML>
    <HEAD><TITLE>Session Test</TITLE></HEAD>
    <BODY >
    <pre>
    Hello This is a session test. Setting session variable hello....
    <% session.setAttribute("hello", "hello"); %>
    This is the session attribute hello now: <%= (String) session.getAttribute("hello") %>
    session id = <%= session.getId() %>
    Go to this other page to check session: /OneTwo/Two/sessionTest.jsp
    </pre>
    </BODY>
    </HTML>
    --------------------------------------------/OneTwo/Two/sessionTest.jsp--------------------------------------------
    <HTML>
    <HEAD><TITLE>Session Test</TITLE></HEAD>
    <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#800000" ALINK="#FF00FF">
    <pre>
    Hello This is a session test. Getting session variable hello....
    <% String hello = (String) session.getAttribute("hello"); %>
    This is the session attribute hello now: <%= hello %>
    session id = <%= session.getId() %>
    Go to this other page to check session: /OneTwo/One/sessionTest.jsp
    </pre>
    </BODY>
    </HTML>

  • Custom F4 help in a BSP application working in Mozilla but not in IE

    Hi,
    I have created a custom F4 help in a BSP application.
    It is working in Mozilla but not in IE. I tried enabling javascript as well but still it is not working.
    Can someone please suggest a possible solution for this?

    Hi,
    See simmilar discussion in thread /thread/1883519 [original link is broken]
    I think this may be helpful for you.
    Thanks,
    Chandra

  • I need help with a VB Application

    I need help with building an application and I am on a tight deadline.  Below I have included the specifics for what I need the application to do as well as the code that I have completed so far.  I am having trouble getting the data input into
    the text fields to save to a .txt file.  Also, I need validation to ensure that the values entered into the text fields coincide with the field type.  I am new to VB so please be gentle.  Any help would be appreciated.  Thanx
    •I need to use the OpenFileDialog and SaveFileDialog in my application.
    •Also, I need to use a structure.
    1. The application needs to prompt the user to enter the file name on Form_Load.
    2. Also, the app needs to use the AppendText method to write the Employee Data to the text file. My project should allow me to write multiple Employee Data to the same text file.  The data should be written to the text file in the following format (comma
    delimited)
    FirstName, MiddleName, LastName, EmployeeNumber, Department, Telephone, Extension, Email
    3. The Department dropdown menu DropDownStyle property should be set so that the user cannot enter inputs that are not in the menu.
    Public Class Form1
    Dim filename As String
    Dim oFile As System.IO.File
    Dim oWrite As System.IO.StreamWriter
    Dim openFileDialog1 As New OpenFileDialog()
    Dim fileLocation As String
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    openFileDialog1.InitialDirectory = "c:\"
    openFileDialog1.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
    openFileDialog1.FilterIndex = 1
    openFileDialog1.RestoreDirectory = True
    If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
    fileLocation = openFileDialog1.FileName
    End If
    'filename = InputBox("Enter output file name")
    'oWrite = oFile.CreateText(filename)
    cobDepartment.Items.Add("Accounting")
    cobDepartment.Items.Add("Administration")
    cobDepartment.Items.Add("Marketing")
    cobDepartment.Items.Add("MIS")
    cobDepartment.Items.Add("Sales")
    End Sub
    Private Sub btnSave_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
    'oWrite.WriteLine("Write e file")
    oWrite.WriteLine("{0,10}{1,10}{2,10}{3,10}{4,10}{5,10}{6,10}{7,10}", txtFirstname.Text, txtMiddlename.Text, txtLastname.Text, txtEmployee.Text, cobDepartment.SelectedText, txtTelephone.Text, txtExtension.Text, txtEmail.Text)
    oWrite.WriteLine()
    End Sub
    Private Sub btnExit_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    oWrite.Close()
    End
    End Sub
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    txtFirstname.Text = ""
    txtMiddlename.Text = ""
    txtLastname.Text = ""
    txtEmployee.Text = ""
    txtTelephone.Text = ""
    txtExtension.Text = ""
    txtEmail.Text = ""
    cobDepartment.SelectedText = ""
    End Sub
    End Class

    Hi Mikey81,
    Your issue is about VB programming, so Visual Basic forum is a better forum for your case. I moved this thread there,
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create a help page in my application like the one in HTMLDB ?

    Hi,
    What's the best way to create a help file for my application and link it like the help link at the top right of HTMLDB ?
    Thank you.

    That's what I did, but I have a lot of screen captures. Where would be the best place to save those gif, server or in the database by loading them via the images tab in HTMLDB ?
    Thank you.

  • The Help Link from the Application Pages Does not Work for Peoplesoft Campus Solutions 9.0

    Hi everyone.
    I have a problem, I have been trying to set up the Help Link from the Application Pages for Peoplesoft Campus Solutions 9.0 according to the instructions given in the Document: http://docs.oracle.com/cd/E17566_01/epm91pbr0/eng/psbooks/EnablingtheHelpLinkfromApplicationPages.pdf ,  (referenced in the Doc ID 1289101.1, E-PB: How to Set Up the Context Sensitive Help with Hosted PeopleBooks using Universal Linking).
    I follow the instructions of that document carefully:
    I go to: PeopleTools -> Web Profile -> Web Profile Configuration
        2. Then I choose the Web Profile: "Development".
        3. Then Change the value for the Help URL field by entering the following URL format: http://www.oracle.com/pls/topic/lookup?id=%CONTEXT_ID%&ctx=hrcs90r5 , the ctx parameter selected is the one that correspond to  the Campus Solutions (hrcs90r5) according to the Product Line Code Table (ULinkID) especified in the mentioned document.
        4. Stop the Web Domain and Clear cache.
        5. Start the Web Domain again.
    After setting up the Web Profile Configuration I test the help links, thas is why I click in the Help link in any Peoplesoft CS 9.0 Application Page (modify a person), but the next error message appears: "We're sorry, the topic you requested was not found.".
    I tried many combinations with the ctx parameters URL but it does not work yet. 
    I did the same test, but this time using the Help URL field with a HRMS ctx parameter by entering the following URL format: http://www.oracle.com/pls/topic/lookup?id=%CONTEXT_ID%&ctx=hcm92pbr5 , and It works fine !!!
    According to the previous test you realize that It works with HRMS ctx parameter but not with Campus Solutions 9.0 ctx parameter,  Does anybody know what else can I do ? Am I doing anything wrong or missing? or maybe the Oracle's ctx parameter for Campus Solutions URL It is broken simply.
    Thanks for you help and feedback.

    2799444 - The page you are testing with appears to be a Workforce Administration page. Is that correct?
    The CS PeopleBooks would only work for CS pages, e.g.: try navigating to Main Menu > Campus Community > Personal Information > Add/Update a Person
    Also, you can use multiple ctx parameters:
    E.g.: http://www.oracle.com/pls/topic/lookup?id=%CONTEXT_ID%&ctx=hrcs90r5&ctx=hcm92pbr5&ctx=pt852pbh2
    This way the help would work for the HR related pages like Workforce Administration, Campus Solutions pages like Campus Community and also PeopleTools pages like Web Profile Configuration. Hope this clarifies your question. Thanks!

  • Need help with a small application

    Hi all, I please need help with a small application that I need to do for a homework assignment.
    Here is what I need to do:
    "Write an application that creates a frame with one button.
    Every time the button is clicked, the button must be changed
    to a random color."
    I already coded a part of the application, but I don't know what to do further.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ColourButton extends JFrame {
         JButton button = new JButton("Change Colour");
         public ColourButton() {
              super ("Colour Button");
              setSize(250, 150);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel panel = new JPanel();
              panel.add(button);
              add(panel);
              setVisible(true);
         public static void main(String[] args) {
              ColourButton cb = new ColourButton();
    }The thing is I'm not sure what Event Listener I have to implement and use as well as how to get the button to change to a random color everytime the button is clicked.
    Can anyone please help me with this.
    Thanks.

    The listener:
    Read this: [http://java.sun.com/docs/books/tutorial/uiswing/components/button.html]
    The random color:
    [Google this|http://www.google.com/search?q=color+random+java]

  • Defining application-scoped work manager in Plan.xml

    I am having trouble getting my MDBs to recognize work managers that I have defined in my deployment plan using the admin console.
    The work managers show up properly when I click the deployed application and go to the Deployments->myapp.ear->Configuration->Workload tab. They do not show up, however on the Deployments->myapp.ear->Monitoring->Workload tab.
    Also, when the server boots, I get a log message like this:
    <BEA-002919> <Unable to find a WorkManager with name FaxErrorQueue. Dispatch policy FaxErrorQueue will map to the default WorkManager for the application care360-backend-app-2008>even though FaxErrorQueue shows up under Configuration->Workload.
    BACKGROUND
    I am upgrading an 8.1 wls to 10MP1. Our MDBs are deployed as a single jar, included in 2 separate ears, which are deployed to 2 separate clusters. So, if we have 2 clusters with 2 managed servers in each cluster, we deploy each MDB to all 4 servers. We control the Execute Queues for each server in 8.1 with different values so that MDB#1 might have a single thread in one managed server and zero execute threads on another. Using the deployment plan is the only way I can think of to implement this. We would prefer not to use the 8.1 emulation, as the deprecated execution queues will have to be dealt with eventually. I am open to any other approaches to accomplish this as well.
    Thanks,
    Joe

    Hello Fred,
    Thank you very much for reply.
    I totally agree with you but in my scenario, I have multiple domains on a single box.
    and I am afraid that there could be a situation where one bad application of a particular domain may take most of the CPU usages.
    What I can do is: I can define max thread constrain to all the applications of all the domains but it is not acceptable bcz we have hundreds of applications per domain.
    So what I want is: to define some kind of thread constrain at the domain level [so that I can have CPU usages allocated to every domain] as well as some kind of thread constrain to few applications [non prioritize].
    I tried this by defining Global Work Managers & Application-scoped Work Managers but I found that applications only respect to Application-scoped Work Managers.
    or if I have some kind of way that make sure certain percentage of CPU usages is allocated to a particular domain?
    hope I have made my self clear.
    Thanks,
    Qumar

  • Help me connect my application

    hello,
    I try to connect to my database from an application. do somebody have a sample settings file to give to me? what I mean is: how can i fell the following statement:
    string
    ' designate the following (in this order):
    ' DB Index, DB Name, DB Type, DB Filepath, Server Name, Username, Password
    I think that my "DB Type,DB Filepath,server name" are wrong so could you give me your DB Type,DB Type,Server Name as an example?
    thanks

    Wow! A quintuple posting. Are you going for a record?
    settings file
    help me connect my application
    help me connect my application
    help me connect my application
    help me connect my application
    This may actually constitute spam.

  • HTML Help in a JAVA Application?

    Hope someone can answer this question. I thought that there
    was a way to use HTML Help with a JAVA application, but I am being
    advised by my programmer that I must use JAVA Help. I don't have a
    problem with using RoboHelp to convert my HTML Help file to JAVA
    Help but I do have very serious concerns about the finished output.
    In a word, it is "ugly." Numbers do not align properly with text,
    bullets are huge, bolded words do not come over bolded, text only
    popups appear as huge windows and the list goes on... Any help will
    be greatly appreciated!
    Regarads,
    Fran

    Our Java applications work just fine with webhelp. See the
    topic on my site.

  • Application scoped WorkManager

    We have an application (.ear) which has two web apps (war's). We want to setup workmanager with max-threads-constraint for both the application. I was able to create application scoped workmanager through deployment descriptors However, I was not able to set the thread count other than the default (-1).
    Note: The application (.ear) is targeted to a cluster.
    Here is the snippet of the workmanager that I created in the weblogic.xml
    <wl-dispatch-policy>workmanager-app1</wl-dispatch-policy>
    <work-manager>
    <name>workmanager-app1</name>
    <max-threads-constraint>
    <name>max-app1-threads</name>
    <count>30</count>
    </max-threads-constraint>
    </work-manager>
    Please let me know if any thing is wrong in the work-manager configuration. Any pointers on this is highly appreciated.

    I need a mechanism to limit one of the webapp to use not more than 30 threads and the second webapp not more than 10 threads while targetting to the same cluster.

  • Work Manager both Global Work Managers & Application-scoped Work Managers

    Hi all,
    I want to use both Global Work Managers & Application-scoped Work Managers in my domain [single], is it possible?
    Basically I want to make sure my domain have fix number of thread.
    In my environment, I have multiple domains on a single machine, so I want to make sure every domain has fix number of threads to maintain the whole system integrity.
    if I won't make sure this, there could be scenario that one particular domain is taking much of the CPU usages than others.
    Thanks,
    Qumar

    Hello Fred,
    Thank you very much for reply.
    I totally agree with you but in my scenario, I have multiple domains on a single box.
    and I am afraid that there could be a situation where one bad application of a particular domain may take most of the CPU usages.
    What I can do is: I can define max thread constrain to all the applications of all the domains but it is not acceptable bcz we have hundreds of applications per domain.
    So what I want is: to define some kind of thread constrain at the domain level [so that I can have CPU usages allocated to every domain] as well as some kind of thread constrain to few applications [non prioritize].
    I tried this by defining Global Work Managers & Application-scoped Work Managers but I found that applications only respect to Application-scoped Work Managers.
    or if I have some kind of way that make sure certain percentage of CPU usages is allocated to a particular domain?
    hope I have made my self clear.
    Thanks,
    Qumar

Maybe you are looking for

  • File renaming in Sender file adapter usins OS command

    Hi Guys , Can anyone explain on how to use the rename command in Sender file adapter using OS command parameter. Thanks, KC.

  • Maximum file size for email iCloud, maximum file size for email iCloud

    Where can I find the maximum file /photo att. size in my icloud email

  • How to add Web Gallery in Bridge CS5

    Hi there, I am creating a photo album with web gallery in Bridge CS5. I find out that Is it possible to enable vertical scroll in to the portrait pictures? Usually portrait pictures  are too small when they are diminish to the screen. Here is an exam

  • MacOS 10.7.3 preview reinstall

    The version of Preview on our MacOS 10.7.3 machine will not run.  The error message says that 10.7.4 or higher is required. Somehow, Preview must have upgraded.   How do I reinstall a compatible version?

  • Where does the iPad store passwords?

    If I need to log into a site on my Mac I can find the password in keychain access. I need to know how to access stored passwords on my iPad. My iPad is currently connected to my daughter's wifi but I need to go online with my laptop. She is not avail