Should we try to access session scope in ADF BC ?

hi
In the blog post "How to Access Session Scope in ADF BC "
at http://andrejusb.blogspot.com/2012/01/how-to-access-session-scope-in-adf-bc.html
Andrejus Baranovskis suggests it is no problem to access session scope in ADF BC using
Map sessionScope = ADFContext.getCurrent().getSessionScope();But I wonder if this is really a good practice, as it looks very much like breaking the MVC pattern.
At the same time I wonder where the Oracle documentation says this would be a good or bad idea.
One starting point could be the ADFContext.getCurrent() method
at http://docs.oracle.com/cd/E24382_01/apirefs.1112/e17486/oracle/adf/share/ADFContext.html#getCurrent%28%29
that starts with saying "Gets the ADF context for the current thread. ..." which in a typical deployment scenario of ADF BC might not cause a problem.
But, I wonder how defensive your programming should be when using the getSessionScope() method in your ADF Business Component code (that implements the Model).
Ideas and feedback welcome.
many thanks
Jan Vervecken

Hi Shay,
Reviewing ADFContex methods it seems that this object shouldn't be accessible from BC. Example:
public static ADFContext initADFContext(java.lang.Object context,
                                        java.lang.Object session,
                                        java.lang.Object request,
                                        java.lang.Object response)
    Initializes the ADFContext for the environment of the specified context.
    Parameters:
        context - the ServletContext or PortletContext of the current execution environment.
        session - the HttpSession or PortletSession of the current execution environment. OPTIONAL.
        request - the HttpServletRequest or PortletRequest of the current execution environment. OPTIONAL.
        response - the HttpServletResponse or PortletResponse of the current execution environment. OPTIONAL.
    Returns:
        the ADFContext that was current when init was invoked. Should be passed back to resetADFContext after the block requiring the ADFContext has completed.Kuba

Similar Messages

  • Accessing Session scope attributes in ADF BC

    Is there any groovy script for accessing session scope variables in ADF BC?

    Let me put forward my use case:
    My VO's in my application has a bind variable which is bound to currently logged in user (adf.context.securityContext.userName). Also my application has couple of AM's
    But now i'm adding complexity to my application where i'm implementing super user concept, a super user can login to the application, select a username (say 'user1'), and see the application as if 'user1' is logged in.
    So i'm trying to solve the problem by setting a session attribute for the user ('user1') and make it use in VO's
    Do you guys have any better solution to this problem?

  • Access session scope variables from a filter

    I have a filter I am using to check if 2 people are loged in with the same user name.
    When my web app loads I store the user name in a class that has session scope.
    Is there a way for me to access this class from the Filter class?
    How do I access the session instance from this class?
    How do I pass parameters to the Filter class?
    Thank you,
    Al

    http://forum.java.sun.com/thread.jspa?threadID=5122925&tstart=0

  • How can a session scope bean access an application scope bean - help

    Hello,
    I have a JSP page that has references to an Application Scope and a Session Scope bean...
    <jsp:useBean id="myWebApp" scope="application" class="com.my.web.WebApplication" />
    <jsp:useBean id="myWebSession" scope="session" class="com.my.web.WebSession" />
    I would like the WebSession access methods in the WebApplication ... Can/ How does the WebSession object lookup the reference to WebApplication object?

    I don't think you should make the WebSession implement the session listener.
    The session listener will be created once, at the start of the servlet context and would be listening to all sessions. So you would have one instance of the WebSession belonging to the context (though not as an attribute), and others belonging to each session. This will be confusing in your code, I think.
    I would suggest having a different class act as the HttpSessionListener. Perhaps do something like this:
    public class WebSessionInjector implements HttpSessionListener {
      public void  sessionCreated(HttpSessionEvent e) {
        WebApplication webApp = (WebApplication)(e.getSession().getServletContext().getAttribute("webapp"));
        WebSession mySession = new WebSession();
        mySession.setWebApplication(webApp);
        e.getSession().setAttribute("mySession", mySession);
      public void sessionDestroyed(HttpSessionEvent e) { ... }
    }You may be able to use the WebApplication object itself as the listener ...
    Or, you could make the WebSession implement the HttpSessionBindingListener and use the valueBound event much like the sessionCreated event above, but from inside the WebSession object:
    public class WebSession implements HttpSessionBindingListener {
      public void  valueBound(HttpSessionBindingEvent e) {
        WebApplication webApp = (WebApplication)(e.getSession().getServletContext().getAttribute("webapp"));
        this.setWebApplication(webApp);
      public void valueUnbound(HttpSessionBindingEvent e) { ... }
    }

  • I can not get my Adobe Photoshop Elements 8 organize to open. The edit option comes up with no problem, but will crash when I try to access organize. What should I do to fix this problem?I can not get my Adobe Photoshop Elements 8 organize to open. The ed

    I can not get my Adobe Photoshop Elements 8 organize to open. The edit option comes up with no problem, but will crash when I try to access organize. What should I do to fix this problem?

    Hi,
    Which operating system are you running on?
    Try starting the organizer while holding down the shift key.  Hopefully, it should load the Catalog Manager.
    Select your current catalog and click on the Repair button. Once it has finished, click on the Open button to see if the catalog opens.
    Good luck,
    Brian

  • When I try to access my online bank account thru Firefox, the session times out. This is on a new Macbook Pro. On my old Macbook Pro I can access the site.

    When I try to access my online bank account thru Firefox, the session times out. This is on a new Macbook Pro. On my old Macbook Pro I can access the site. I know it is probably something in settings but cannot figure it out.

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
    '''If Firefox is open,''' you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    '''If Firefox is not running,''' you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".
    ;[[Image:SafeMode-Fx35]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • What do I do to straighten out this problem... When I try to access Firefox after having logged out of a previous session I get a msg that Firefox is still running and I have to restart the computer in order to access internet.

    What do I do to straighten out this problem: When I try to access Firefox after I've logged out of a previous session I get a msg that Firefox is still running and I have to restart the computer in order to access internet...

    All you need to do is wait. While Firefox appears closed, it's not. It doing house cleaning. Cleaning out cookies and cache. How long it takes depends upon how much garbage you have collected.
    If you start the Task Manager and open the Process window, you will be able to see when Firefox has finished up and closed down.
    If you forced Firefox to close using the task manager, then the house keeping process seems to freeze up.
    Also, as you've already found out from the above link, some programs and plugins will prevent Firefox from closing properly. I've found this less common then simply being in a hurry. But you need to also consider it.

  • My internet session terminates when I try to access a PDF file. I have uninstaled and reinstalled Ad

    My internet explorer session terminates when I try to access a PDF file (eg my XCapitolOne bank statement or nist time request). I have uninstalled and reinstalled Adobe Reader with no change.

    What is your Reader version?
    Can you try to disable Protected Mode (Edit | Preferences | Security (Enhanced)).

  • How to setup session scope in servlet?

    bean tag can be used in jsp to setup its scop, like
    <jsp:usebean id="abc" class="def" scope="session"/>
    but is it possible to setup session scope to divide two users in order not to use the same bean? becuase i encounter a problem that, when using bean in servlet, seemly A user would access the data that B user just store in; at first, i try to compare if session == null or session.isNew(), but finally find out that their session.getId() is difference, thus i suppose that if i am able to decide via users' session id to limit their access to the bean just as jsp:usebean does!
    is that right? or in what way is better?(i am now to rewrite my original code, it's a little bit complicate for some reasons, so i think, if possible, that via compare session id, that i do not know how, would be a better way!)
    thanks in advice,

    If each user has a separate session, then each one
    should get their own instance of the bean. Is it
    possible that that you store and retrieve a reference
    to the bean in a servlet instance variable? That
    would cause the problem you describe.do you mean by putting variable in situation like A) ; yes i did, but if i put bean in the body of doPost method, each time when bean are "new"ed, there may be error occurred, accounting for i hope to instantize with default value, but default constructor do nothing; thus if by only construct with default constructor, error would occurred and so a new constructor with parameters i put in the position you refferred to! would you like to tell me what's the right way for i am not so familiar with servlet.
    thanks in advice,
    A)
    public class MyClassName extends HttpServlet {
    BeanClass myBean = new BeanClass();
    ... doGet(...){}
    ... doPost(...){...}

  • Session scope variables and weird behaviour of AdfContext()

    Hello,
    what is the best method and correct API to create a session scope variable?
    I am currently using ADFContext().getCurrent().getSessionScope().get()/put(), but it looks like it has some problems: for some unkown reasons I loose the variable, that is get() returns null when called from a method of a (overridden)ViewRowImpl. Why does this happen?
    Thanks you in advance

    There are a couple of ways you can set values on a sessions scope but I would have to question if you really need a scope as high as session to accomplish what you want to do. At any rate, you should be able to store the value using the method you described but you could also try setting it using EL by using the setExpressionValue and resolveExpression methods in JSFUtils.java (you can find this in the latest fusion demo application). JSFUtils also has a getFromSession and storeOnSession that you could try.
    With all that said I don't think it is good practice to access scope variables from your model layer. You should write your method in the ViewRowImpl class to accept the value as a method parameter and then pass the value in through the binding layer or when invoking the method from your bean class.

  • How do I access session data through an EJB?

    Hi
    How do I access session data through an EJB?
    I am currantly developing a Web service (using ejb's, JBoss.net and Apache Axis). A client making a call to this Web service, is expecting a bussiness-object in return. My problem is that this bussiness-object i stored in a users session data. How do I retrieve this bussiness-object from the users session.
    I have read that this does not work with httpsessions, is this true? If this is true, is it possible to store the bussiness object in a JavaBean e.g:
    <jsp:useBean id="userContextWebImpl" scope="session" class="com.ac.march.client.UserContextWebImpl">
    <%
    String key = "test";
    String value = "This is the value";
    userContextWebImpl.setValue( key, value1 );
    %>
    </jsp:useBean>
    and then retrieve this information through the EJB? Or is it possible to do this by using Statfull JavaBeans? Or can this be done through a nother solution?
    Please help!

    I have created a JavaBean with scope="application" to store some data. The data is stored when a user prefomes a spesific task.
    A different person then makes a call to a Web-Service on the server. The Web-Service then asks an EJB to retrieve the data stored in the JavaBean (servlet cotext). In other words: How do I retrieve this data from the EJB?
    I have tried with this code, but with no luck.
    (ApplicationContextWebImpl is the JavaBean)
    public static String getBookingResult( String key )
         String myResult = null;
         String myKey = key;
         ApplicationContextWebImpl applicationContextWebImpl = null;
         try
              applicationContextWebImpl = new ApplicationContextWebImpl();
              myResult = (String)applicationContextWebImpl.getValue( key );
         catch ( java.rmi.RemoteException e )
         return myResult;
    }

  • TopLink Essentials: Using spring session scope on the EntityManagerFactory

    Hi,
    In one of our projects we are trying to utilize the 2nd level cache of TopLink Essentials. The server code is using the Spring (2.0.7) and is deployed to a web container. We are using a Java client and serializes every object between the client and the server.
    When a client is started a lot of "static/common" data is read from the server. The first client started will therefor pay some extra performance cost, but additional clients should hopefully be able to perform better due to the cache. Most of the static data is accessed not using JPQL and should therefor not bypass the cache.
    If we configure the EntityManagerFactory using default Spring scoping (singleton) it seems like we are not able to utilize the cache. We can see from the log files that each time a client is started a lot of SQL is executed towards the database (Oracle).
      <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="jpaVendorAdapter">
          <bean class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
            <property name="showSql" value="false" />
            <property name="generateDdl" value="$repository{toplink.generateDdl}" />
            <property name="database" value="$repository{toplink.database}" />
          </bean>
        </property>
        <property name="jpaProperties">
          <props>
            <prop key="toplink.weaving">static</prop>
            <prop key="toplink.logging.level">FINEST</prop>
          </props>
        </property>
      </bean>When we changes the scoping to spring session the behavior is very different. Then we can see that the first client generates a lot of SQL towards the database and pays a startup cost, while subsequently clients seems to be able to utilize the cache.
      <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" scope="session">
        <aop:scoped-proxy />
        <property name="dataSource" ref="dataSource" />
        <property name="jpaVendorAdapter">
          <bean class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
            <property name="showSql" value="false" />
            <property name="generateDdl" value="$repository{toplink.generateDdl}" />
            <property name="database" value="$repository{toplink.database}" />
          </bean>
        </property>
        <property name="jpaProperties">
          <props>
            <prop key="toplink.weaving">static</prop>
            <prop key="toplink.logging.level">FINEST</prop>
          </props>
        </property>
      </bean>Having read the documentation of the spring session scope I'm having a hard time explaining this behavior. As I understand it the EntityManagerFactory will be stored in the HTTP session resulting in a new EntityManagerFactory for each session. I cannot understand how this may result in that we are able to utilize the 2nd level cache? What are the relationship between the EntityManagerFactory and the 2nd level cache?
    Is this an accepted way of configuring the EntityManagerFactory or will there be a downside?
    I hope someone are able to explain this behavior for me:-)
    Best regards,
    Rune

    Hi Rune,
    To understand the shared cache behavior you actually need to understand more about what TopLink Essentials does than what Spring does. When a new factory is created, TopLink Essentials actually just proxies the server session with a factory instance, so the same server session is used. This is why you are seeing the same cache used across multiple factories of the same session.
    In the first case, if you are not using JPQL then what are you using to load the data and why are you thinking that it will not bypass the cache?
    Using a factory instance for each session is not what I would recommend doing as there are some additional costs associated with establishing a factory (even though the session already exists). The first way should be the correct way, I am just not sure what the circumstances are that are causing your cache to not be warmed. You may want to post more details about that so people can better help you out with that angle.
    -Mike

  • Synchronizing session-scope objects?

              Hi,
              I have this problem, using Weblogic 5.1 SP8:
              In a JSP-file I use a java-object with the useBean-directive and
              session-scope.
              The problem occur when a user (for some strange reason) decides
              to double-click in his browser on a link pointing to this
              JSP-page.
              This makes the weblogic server start two separate request-threads to the same page
              in the same session. This will sometimes screw up tha data that the java-object holds
              since both threads at the same time uses the same object.
              The only solution that I have found is to put synchronized blocks in the JSP-file
              either synchronizing the java-object or the session-object.
              Does anyone have any similar problems or perhaps any opinions?
              regards/
              H Waller
              

              The problem we discussed (and fixed)was specifically in
              WLCS 3.2.
              If you are not using WLCS, you will not experience THAT problem.
              If you are using member servlet, member JSP variables or static
              variables, you will see a similar problem - don't.
              If it is data in the httpSession - you have to rethink your
              design.
              Mike
              "Ashutosh Khandelwal" <[email protected]> wrote:
              >
              >Hello Ture and Mike,
              >
              >I have been experiencing problems when a user decides to double-click
              >in the browser
              >pointing to a servlet. This makes the weblogic server start two seperate
              >request-thread
              >to the same page in the same session. This always screws up the data.
              >I am using
              >WLS 5.1 with SP8.
              >
              >According to your previous emails, this was only a problem with WLCS3.2,
              >which
              >uses PipelineSession. You have also indicated that this should not be
              >happening
              >with WLS 5.1 or 6.0 with SP8 or above.
              >
              >Well, I continue to have this problem with WLS5.1. Do you have any suggestions/opinion,
              >etc.
              >
              >regards,
              >
              >Ashu
              >
              >
              >
              >"Mike Reiche" <[email protected]> wrote:
              >>
              >>Thanks for the fast turn-around.
              >>
              >>- Mike
              >>
              >>Ture Hoefner <[email protected]> wrote:
              >>>Hello Mike,
              >>> As you know, a WLCS 3.2 (Commerce Server)
              >>>patch now exists for this problem. I thought
              >>>that I should post the details here to clear
              >>>up any confusion in the WebLogic user
              >>>community.
              >>> The problem that Mike experienced was that
              >>>the WLCS PipelineSession was keeping all
              >>>request-scoped attributes in a single bucket,
              >>>so concurrent requests from a single session
              >>>were experiencing naming collisions. Also,
              >>>one pipeline would empty the bucket when
              >>>finished, but other concurrent piplines may
              >>>have been using the bucket. This was not a
              >>>problem with WLS. It was a limitation of the
              >>>design of WLCS 3.2 PipelineSession, which is
              >>>not used in WLS 5.1 or 6.0.
              >>> Our engineering team has quickly responded:
              >>> they have designed and implemented a
              >>>PipelineSessionExtended that uses multiple buckets.
              >>> Each bucket is associated with a
              >>>request using a unique requestId.
              >>> A patch and details of the design fix and
              >>>use of the patch are available from support.
              >>>Please reference CR043462 when requesting the
              >>>patch.
              >>>
              >>>Mike Reiche wrote:
              >>>
              >>>> I don't mind that the HttpSession is shared,
              >>>my problem
              >>>> is that the PipelineSession is shared - because
              >>>that
              >>>> breaks <pipeline:getProperty > tags. When
              >>>I save a Pipeline
              >>>> propert as REQUEST_SCOPE, that's exactly what
              >>>I expect. But
              >>>> apparently, it's scope is beyond a request.
              >>>>
              >>>> What about a PageContext? That's not shared
              >>>between requests,
              >>>> is it? Maybe that's where REQUEST_SCOPE variables
              >>>should be
              >>>> stored.
              >>>>
              >>>> Mike
              >>>>
              >>>> Robert Patrick <[email protected]>
              >>>wrote:
              >>>> >Hmm...
              >>>> >
              >>>> >I always thought that it was browser specific
              >>>whether
              >>>> >the multiple browser windows
              >>>> >shared or did not share the same session
              >>>(and the Netscape
              >>>> >and IE do exactly the
              >>>> >opposite thing here). Regardless of the
              >>>multiple window
              >>>> >scenario, this can and will
              >>>> >happen if you have multiple frames in the
              >>>same window
              >>>> >making requests concurrently (or
              >>>> >possibly if you double-click on a link causing
              >>>the browser
              >>>> >to generate two requests to
              >>>> >WebLogic).
              >>>> >
              >>>> >Anyway, the crux of the matter is that your
              >>>servlets/JSPs
              >>>> >must be prepared to deal with
              >>>> >multiple requests from the same user accessing
              >>>the same
              >>>> >session. The servlet/JSP spec
              >>>> >doesn't, to my knowledge, address this issue.
              >>> You will
              >>>> >probably need to add
              >>>> >synchronization code somewhere, I would just
              >>>make sure
              >>>> >that you are synchronizing on an
              >>>> >object that is only used by one user (e.g.,
              >>>session) and
              >>>> >keep the synchronization
              >>>> >blocks as short as possible...
              >>>> >
              >>>> >Hope this helps,
              >>>> >Robert
              >>>> >
              >>>> >Michael Reiche wrote:
              >>>> >
              >>>> >> BEA says that's just your imagination....
              >>>> >>
              >>>> >> FR: nelson
              >>>> >>
              >>>> >> CASE_ID_NUM: 222714
              >>>> >> MESSAGE:
              >>>> >> Hi Michael,
              >>>> >>
              >>>> >> The Commerce Server is nothing more then
              >>>an application
              >>>> >riding
              >>>> >> on top of WebLogic Server.
              >>>> >> The HTTPSession is still being managed
              >>>by the WebLogic
              >>>> >Server,
              >>>> >> and not the Commerce Server.
              >>>> >> As I mentioned on my previous email, prior
              >>>to and including
              >>>> >SP6
              >>>> >> for WLS 5.1, the spawning of a child browser
              >>>window,
              >>>> >does create
              >>>> >> a shared HTTPSession, thus creating a shared
              >>>PipelineSession.
              >>>> >>
              >>>> >> If you have indeed upgraded to SP8 for
              >>>WLS 5.1, then
              >>>> >this should
              >>>> >> not be happening.
              >>>> >> Can you tell us exactly how you are spawning
              >>>the new
              >>>> >browser window,
              >>>> >> such that both requests are being sent
              >>>almost concurrently.
              >>>> >> Also, can you send us a copy of your "weblogic.log"
              >>>> >file from the
              >>>> >> Commerce Server as an attachment. If it
              >>>is large, please
              >>>> >zip it.
              >>>> >>
              >>>> >> Regards,
              >>>> >> Nelson Paiva
              >>>> >> WLCS DRE
              >>>> >>
              >>>> >> **********
              >>>> >> If you are replying to this email, please
              >>>DO NOT modify
              >>>> >the subject
              >>>> >> of
              >>>> >> this email in order to ensure that your
              >>>reply is processed
              >>>> >automatically.
              >>>> >>
              >>>> >> You can now "AskBEA" Customer Support questions
              >>>on the
              >>>> >web and
              >>>> >> get
              >>>> >> immediate responses. "AskBEA" is available
              >>>on http://www.bea.com/support/index.html
              >>>> >> **********
              >>>> >>
              >>>> >> "H Waller" <[email protected]>
              >>>wrote:
              >>>> >> >
              >>>> >> >Hi,
              >>>> >> >
              >>>> >> >I have this problem, using Weblogic 5.1
              >>>SP8:
              >>>> >> >
              >>>> >> >In a JSP-file I use a java-object with
              >>>the useBean-directive
              >>>> >> >and
              >>>> >> >session-scope.
              >>>> >> >The problem occur when a user (for some
              >>>strange reason)
              >>>> >> >decides
              >>>> >> >to double-click in his browser on a link
              >>>pointing to
              >>>> >this
              >>>> >> >
              >>>> >> >JSP-page.
              >>>> >> >This makes the weblogic server start two
              >>>separate request-threads
              >>>> >> >to the same page
              >>>> >> >in the same session. This will sometimes
              >>>screw up tha
              >>>> >> >data that the java-object holds
              >>>> >> >since both threads at the same time uses
              >>>the same object.
              >>>> >> >
              >>>> >> >The only solution that I have found is
              >>>to put synchronized
              >>>> >> >blocks in the JSP-file
              >>>> >> >either synchronizing the java-object or
              >>>the session-object.
              >>>> >> >
              >>>> >> >Does anyone have any similar problems
              >>>or perhaps any
              >>>> >opinions?
              >>>> >> >
              >>>> >> >regards/
              >>>> >> >H Waller
              >>>> >
              >>>
              >>>--
              >>>Ture Hoefner
              >>>BEA Systems, Inc.
              >>>2590 Pearl St.
              >>>Suite 110
              >>>Boulder, CO 80302
              >>>www.bea.com
              >>>
              >>>
              >>
              >
              

  • Session scope quary

    hi friends,
    i have a requrement to store FileItem(uploaded file using apache fileupload classes) objects in session scope using setAttrubute method.
    would it be reliable to store these objects in session scope, so that further i can retrieve it again without having any problem?
    is there any other solution?

    The HTTP session is visible within the context scope of an individual user. This means that the only time that an object wouldn�t be simultaneously accessed would be if the user opens a couple browser windows using the same encode session id in the URL�s and uses\submits them simultaneously.
    I guess that you could have the same distributed object EJB cache in session scope for two users but that should be handled for you by the EJB container.
    I suppose the WebSphere session management in the web container has an option to maintain a common session across applications based on the users authentication. I can�t see how this could be a good thing....
    You will want to cache objects in request scope when you don�t need to maintain state passed the request response lifecycle assuming that you are not using a heavy client caching system.
    Objects in session scope will persist until the session is invalidated or the browser session is terminated.

  • Cannot lock session scope

    Coldfusion 6.1, Dreamweaver 8.0, access 2003
    All code is being written by Dreamweaver in this discussion.
    I am not writing this code on my own.
    I am new to both Dreamweaver and Coldfusion. I am setting up
    the company intranet site. I want some parts restricted. I started
    by creating a login page by using dreamweaver. My first problem was
    when i was being directed towards the page for unsuccessful login
    even though I know I typed in the correct username and password. I
    have an access database holding this information. I am not using
    security level. While researching this with another forum, I
    decided to go to the next step and start putting the Restricted
    Page code. This is when I discovered my second problem. When I
    render the page, I get
    CANNOT LOCK SESSION SCOPE - CFLock cannot be used to lock the
    application or sessions shared scopes without these scopes being
    established through the use of the CFAPplication tag. ....
    My research tells me my problems are the result of same
    problem.
    In coldfusion Administrator, under Memory variables, I have
    check marks for Enable Application Variables and Enable Session
    Variables.
    Then I found this article
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16564&sliceId=2.
    I did what it said and it still does not work.
    I have the file in two places
    One at the root: C:\Inetpub\wwwroot\_mmServerScripts
    One within the site:
    C:\Inetpub\wwwroot\GIInet\_mmServerScripts
    Do you know which one should have this tag? Should I have
    both folders?
    <CFAPPLICATION NAME="Name" SESSIONMANAGEMENT="Yes" >
    Where it says "Name", do I leave Name there or do I put in a
    name that is relative to my site and what is this .. the root
    folder name?
    Why do I have to pay for support for something that is not
    obviously working?!?!

    "Do you know which one should have this tag? Should I have
    both folders?
    <CFAPPLICATION NAME="Name" SESSIONMANAGEMENT="Yes" >"
    Neither. It should be in the root folder of YOUR web
    application.
    'C:\\Inetpub\wwwroot' is a common web root for beginners. It
    must be
    included in every file that will be part of the same
    application as
    defined by the 'Name' parameter. The easiest way to do this
    is the use
    the Application.cfm|Application.cfc files that are
    automatically part of
    every file in the same and all sub directories.
    "Where it says "Name", do I leave Name there or do I put in a
    name that
    is relative to my site and what is this .. the root folder
    name?"
    It is whatever string you want to use to define an
    "Application" that
    all files that share it will belong to. All files that have
    the same
    "Name" will share Application, Session and other common scope
    variables
    and other functionality. Again this must be included in every
    file that
    you want to be part of the same "Application". That is what
    the
    Application.cfm and|or Application.cfc files are for, so one
    does not
    have to hard code this line in every file, thought that would
    be a
    functional, if impractical, option.
    "Why do I have to pay for support for something that is not
    obviously
    working?!?!"
    Well, this is all explained in quite some detail in the
    documentation
    included with Dreamweaver and|or ColdFusion as well as online
    at Adobe
    and many other sites. The details and ins and outs are also
    well
    discussed on numerous blogs, forums and discussion lists. And
    all those
    resources are free.
    But if one wants someone else to do the work for them, they
    generally
    need to pay for that help.

Maybe you are looking for

  • Windows 7, Time is continuously being reset, and network getting disconnected.

    Hello, I have Windows 7 64-bit Pro. I have noticed over the last few days, the clock has been switching to a wrong time constantly. All attempts to resolve have failed (such as w32tm /register.. etc). Here is a log after a finally enabled the log to

  • Why can't I find a Lion download??

    Why can't I find a Lion download anywhere?  My Macbook is not compatible with Mountain Lion (it's old).  And all I want is iCloud.   Very frustrating!

  • I want to buy a 13"macbook air

    I want to buy a 13"macbook air. I live in mississauga canada, I would like to know an estimate of an end price after taxes and the warranty

  • Vintage tv disappeared.

    Anyone else lost vintage tv channel? Was on last night, but just tried to watch it,and there's nothing. It's still in the on screen guide,but won't show listing or load up. All my other Internet channels are fine,so wondered if it's been taken off ai

  • How to reset monitor without a monitor?

    I just installed a new LG 23-inch LED monitor on my G5. The display defaulted to 1600x1200 which doesn't work well because the monitor only supports up to 1080 height. So I selected 1600x1080 but it pushed the image about 500 pixels to the right for