[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Application and Session Variables and Locking

Asked by queet in ColdFusion Application Server, ColdFusion Studio, Cold Fusion Markup Language

Tags: Coldfusion MX 7, 500 Null Null

I have four CFCs that I would like to be available to all pages.  Initially, I was storing the CFCs in a session variable, but one of the exchange experts recommended that I store the cfcs in an application variable, partly to deal with my JRun (out of memory) situation.  I have made the changes, but now I am receiving a 500 null null error.  While trying to search for solutions on resolving the 500 null null error. I came across a couple of posts that say you should lock application and session variables.  I sort of understand the logic behind the locking, but I am not really clear whether it is an absolute must and when and how to use them.  The bloggers even said you should lock application/session variables even during reads.  I was locking my session variables but then I notice a drop in the performance of my application so I removed them.  So, I have the following questions:

1. How do you store a CFC in an application and reference (and or call) the methods stored in the CFC?  I think I am doing something wrong which is why I am receiving the 500 null null error message.  Please see code snippet to see my attempts.

2. If I need to modify a method in the CFC or add any new methods, will the changes be reflected in the application variable since the state of the lasts for as long as the application or would I need to restart the coldfusion server for the cfc to be updated with the new changes?

3.  Do I need to lock all session and application variables even when calling the CFC application variable to invoke (call) a function and even when passing session variables to a CFC function as arguments or querying the database?  Also what about outputting information stored in a session variable (ex. <cfoutput>Logged in #session.user_firstname# #session.user_lastname#</cfoutput>)
1:
2:
3:
4:
5:
6:
7:
8:
9:
Code for instanting cfc and storing it into application variable:
if(not isdefined("application.objSystem")){
  application.objSystem = createobject("component","System");
}
 
Code for calling method inside CFC application variable:
if(application.objSystem.listValuesFound(session.usergroup, "Instructor,System_Administrator")){
				menu = menu & '<li><a href="ViewCourses.cfm?#session.URLToken#">Create, View or Edit Courses</a></li> <br /><br /> #chr(10)##chr(13)#';
}
[+][-]09/27/08 08:18 PM, ID: 22589601Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: ColdFusion Application Server, ColdFusion Studio, Cold Fusion Markup Language
Tags: Coldfusion MX 7, 500 Null Null
Sign Up Now!
Solution Provided By: gdemaria
Participating Experts: 2
Solution Grade: B
 
[+][-]09/27/08 07:48 PM, ID: 22589533Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09/27/08 07:50 PM, ID: 22589537Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/01/08 07:26 AM, ID: 22614623Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/01/08 07:29 AM, ID: 22614656Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/01/08 10:12 AM, ID: 22616610Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/01/08 10:12 AM, ID: 22616614Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/07/08 08:13 AM, ID: 22660155Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/07/08 08:24 AM, ID: 22660258Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/08/08 10:21 AM, ID: 22671037Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_2_20070628