RE: Excel and Coldfusion and Javascript
If you're going to the Excel manipulation server-side then this is probably a good bet: http://jexcelapi.sourceforge.net/ You will need to install the relevant jars on to your server, update your java classpath in cfadminstrator and then call with cfobject. After that it should be a simple case of accessing the methods as per the jexcelapi docs. I have a good look at this for copying some data into an Excel template (preconfigured with macros, cell protection etc and some formulas for assisting data manipulation) and it seems just the job, but I haven't done any actual coding yet. Regards, Matt -Original Message- From: Mike Chabot [mailto:[EMAIL PROTECTED] Sent: 28 October 2007 20:48 To: CF-Talk Subject: Re: Excel and Coldfusion and Javascript Are you thinking client-side or server-side? You seem to be asking about client-side interaction, but it helps to confirm because the solutions are different. -Mike Chabot On 10/28/07, Richard White [EMAIL PROTECTED] wrote: Hi, we noticed that Mozilla Firefox doesnt allow vbscript to run due to the security issues. However, we need to be able to interact with an excel document in our code. Is there anyway to do this through javascript or coldfusion or any other means without using vbscript Thanks for your help Richard ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292220 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
CFmenu submenu icons
Does anyone know how/if you can change the icon indicating a cfmenu has a submenu. The default seems to be a small grey arrow. Even being able to change the colour/size of the arrow would be useful. Cheers ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292221 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Inserting a record into CFGRID
Not sure, but does it need Format=Applet? ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292224 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting a record into CFGRID
Not sure but does format need to be Applet - Original Message - From: Anthony Doherty [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, October 29, 2007 11:44 AM Subject: Inserting a record into CFGRID Im trying to insert a record into my employees table in coldfusion but i have the update working fine and the delete is also working fine, however i have added the tags insert and insertbutton but they wont display on my grid. I have posted my grids code below if someone could help that would be great Thanks cfgrid format=html name=employeeGrid pagesize=11 stripeRows=true stripeRowColor=brown bind=cfc:employeeService.getData({cfgridpage},{cfgridpagesize}, {cfgridsortcolumn},{cfgridsortdirection}) selectmode=edit insert=yes insertbutton=add delete=yes deletebutton=remove record onchange=cfc:employeeService.editData({cfgridaction},{cfgridrow},{cfgridchanged}) cfgridcolumn name=ID display=true header=Employee ID/ cfgridcolumn name=FORENAME display=true header=First Name/ cfgridcolumn name=SURNAME display=true header=Last Name/ cfgridcolumn name=ROLE display=true header=Role select=yes values=Manager, Development, Engineer/ /cfgrid ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292223 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Inserting a record into CFGRID
Not sure, but does it need Format=Applet? No the problem i think has something to do with BIND statement - when i remove this the add button appears fine but i take it you can have an add button when you are using cfc to bind and change the data within a cfgrid ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292225 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Inserting a record into CFGRID
Im trying to insert a record into my employees table in coldfusion but i have the update working fine and the delete is also working fine, however i have added the tags insert and insertbutton but they wont display on my grid. I have posted my grids code below if someone could help that would be great Thanks cfgrid format=html name=employeeGrid pagesize=11 stripeRows=true stripeRowColor=brown bind=cfc:employeeService.getData({cfgridpage},{cfgridpagesize}, {cfgridsortcolumn},{cfgridsortdirection}) selectmode=edit insert=yes insertbutton=add delete=yes deletebutton=remove record onchange=cfc:employeeService.editData({cfgridaction},{cfgridrow},{cfgridchanged}) cfgridcolumn name=ID display=true header=Employee ID/ cfgridcolumn name=FORENAME display=true header=First Name/ cfgridcolumn name=SURNAME display=true header=Last Name/ cfgridcolumn name=ROLE display=true header=Role select=yes values=Manager, Development, Engineer/ /cfgrid ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:29 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting a record into CFGRID
Anthony, I am pretty sure that the insertbutton and deletebutton attributes are for applet only, additionally the insert attribute is for applet only, which means you can't insert a row into a cfgrid only update or delete. -- Gary Gilbert http://www.garyrgilbert.com/blog ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292227 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Configuring CF Datasources
Can CF use datasources that have been manually created using the Windows ODBC Admin program? Or does CF require all datasources be created through the CF Admin screen? Thanks, Dave Bosky | Information Services | HTC | direct: 843-369-8613 | fax: 843-369-7178 | [EMAIL PROTECTED] ** HTC Disclaimer: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. ** ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292228 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Query of Queries causing server to hang
Over the last few weeks we have noticed our servers starting to queue up and often not recover; upon inspecting the stack trace, we invariably see lines like the following; Thread jrpp-485: - waiting to lock 0x60597d10 (a java.lang.Class) Runing a CFQUERY at D:\Live\wwwroot\admin\blah.cfm:109 Thread jrpp-484: - waiting to lock 0x60597d10 (a java.lang.Class) Runing a CFQUERY at D:\Live\wwwroot\admin\data\blah2.cfm:104 Thread jrpp-483: - waiting to lock 0x60597d10 (a java.lang.Class) Runing a CFQUERY at D:\Live\cfc\outsource\blah3.cfc:53 What is interesting, is that when these line numbers are followed, they are always pointing to **Query of Queries**. Has anyone come across this kind of thing before, my searches on these and other forums reveal nothing. Many Thanks ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292226 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Excel and Coldfusion and Javascript
Hi Thanks for your replies, Yes i think server side would be easiest. I would ask the user to browse for the excel document they want them upload it to the server then manipulate there with server side script. Thanks for the link i will take a look at it thanks again for your help ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292229 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFmenu submenu icons
Brian, Use firebug to inspect the element which should let you know what the style class for that element is. Then all you have to do is override the element in your page or include your own style sheet. The class is located in the inetpub\wwwroot\CFIDE\scripts\ajax\resources\yui\yui.css. The class is called submenuindicator and uses an image called map.gif to provide the icon. Cheers, -- Gary Gilbert http://www.garyrgilbert.com/blog ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292230 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Configuring CF Datasources
I think years ago (CF4) you could just set up a system DSN in the ODBCAD32, but these days I think you need both. What I do (CF8) is set up the system DSN first using ODBCAD32, then set the same dsn in the CF Administrator ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292231 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Datasource question
I have a brand new intranet server with Blue Dragon and SQL Server 2005 Express. I need it to connect to a Pervasive SQL database on another server so I can put this thing to work. I have configured an ODBC datasource for the Pervasive SQL connection. Is it better or even possible to configure the connection using a linked server in SQL 2005 instead? The Pervasive connection is critical since it contains reporting data. Thanks, Billy Cox Old World Spices [EMAIL PROTECTED] ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292232 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfx_payflowpro
Sean, Thanks for the response. I just took a look and here is the java version diff current 1.6.0_03 mx6 1.6.0_02 On 10/28/07, Sean Corfield [EMAIL PROTECTED] wrote: On 10/28/07, Dan Vega [EMAIL PROTECTED] wrote: I have done some searching around and have yet to find an answer. I upgraded a server to CF7 and our cfx_payflowpro tag no longer works. Could it be a Java version compatibilty issue? What JVM were you running on before CF7 and what JVM are you running now? Are you using certificate security or signature security? -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292233 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: PDF from other document format: sever side processing
I'm tracking down my options for converting an uploaded document (variety of document formats or images) to PDF. Need to do this automatically, server side. As we're running CF8 - we can do lots of stuff to the PDF afterwards, but it's the conversion into PDF that's getting to me at the moment. What sort of options do I have? You probably want to look at something like activepdf... http://www.activepdf.com/products/serverproducts/docconverter/ ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292234 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Combining Verity searches and SQL Searches
Our jobbank program needs an upgrade. Currently, the resumes are pasted into FCKeditor and stored in a database in HTML format. However, this doesn't seem to be getting the job done, and we've received a deluge of complaints and demands for the ability to just upload a pdf/word document. Here's how the search results work now: http://www.producejobsource.com/index.cfm?event=SearchUsersquery=salesx=0y=0submit=location=jobtype=radius=school= I've made collections before and its no big deal, but I've never had to combine it with a SQL search too. Basically, I need to upgrade my resume search program from a strict SQL search based on like'%string% to one that combines SQL searchs with searches on a directory full of word and PDF documents and is somehow able to link those documents back to a user, and then display the search results in exactly the same way it currently does. Has anyone done this before and can you give me some pointers or some code to look at ? ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292235 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Combining Verity searches and SQL Searches
You could do this two (at minimum) ways. One is to add the db content to your Verity collection. Then you can just search the Verity collection. Another option would be to perform both searches and join them using QofQ. The main problem you would have (I think) is sorting, as Verity returns a score. Although I believe if you use full text searching in SQL Server (or MySQL) you can get a score value as well. How well it meshes w/ Verity's score is another matter. On 10/29/07, Jeff Gladnick [EMAIL PROTECTED] wrote: Our jobbank program needs an upgrade. Currently, the resumes are pasted into FCKeditor and stored in a database in HTML format. However, this doesn't seem to be getting the job done, and we've received a deluge of complaints and demands for the ability to just upload a pdf/word document. Here's how the search results work now: http://www.producejobsource.com/index.cfm?event=SearchUsersquery=salesx=0y=0submit=location=jobtype=radius=school= I've made collections before and its no big deal, but I've never had to combine it with a SQL search too. Basically, I need to upgrade my resume search program from a strict SQL search based on like'%string% to one that combines SQL searchs with searches on a directory full of word and PDF documents and is somehow able to link those documents back to a user, and then display the search results in exactly the same way it currently does. Has anyone done this before and can you give me some pointers or some code to look at ? ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292236 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Sessions and SubApplications
I'm trying to integrate Ray Camden's CanvasWiki into my main site. The easiest thing would be to plop it down in a subdirectory and let it fly with it's own application name. However, I'd like the session information from the main application available to the sub-application, specifically, whether or not the user is logged in. This way, I don't have to annoy my admins with multiple places to login. I've already customized canvaswiki to prevent any possible anonymous editing and changed the security CFC to align with my existing system. How is it possible, in a highly secure manner, to maintain session information across applications and sub-applications with different application names? Or is there a bigger picture I'm missing? ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292237 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFmenu submenu icons
Thanks Gary - that's done it for me ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292238 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Sessions and SubApplications
There are a lot if issues to work out and understand well but it is entirely possible to combine Application.cfm / Application.cfc functionality. You can have a lower level Application.cfm include a higher level Applicaiton.cfm template. You can get also have a lower level Application.cfc extend a higher level Application.cfc. With these effects it may be possible to combine applications. I once saw this trick. cfapplication name=one cfdump var=#application# cfapplication name=two ... cfdump var=#application# This template has accessed two application scopes. I presume a combination of this effect and the use of variable or request scopes it would be possible to pass date from one application scope to another. ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292239 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Sessions and SubApplications
There are a lot if issues to work out and understand well but it is entirely possible to combine Application.cfm / Application.cfc functionality. Well, this would be two application.cfc. I already converted Ray's stuff to application.cfc. ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292241 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting a record into CFGRID
This may help http://www.brucephillips.name/blog/index.cfm/2007/8/8/Updating-and-Adding-Records-Being-Displayed-In-ColdFusion-8s-cfgrid On 10/29/07, gary gilbert [EMAIL PROTECTED] wrote: Anthony, I am pretty sure that the insertbutton and deletebutton attributes are for applet only, additionally the insert attribute is for applet only, which means you can't insert a row into a cfgrid only update or delete. -- Gary Gilbert http://www.garyrgilbert.com/blog ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292240 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and SubApplications
You can extend the parent Application.cfc in the child Application.cfc. Make sure you don't override the application name though as I'm pretty sure that would create a different application name (and thus session scope). Also, make sure you call super() if the parent has any logic that also needs to run when the methods are called (onApplicationStart(), etc.). On 10/29/07, Justin T [EMAIL PROTECTED] wrote: There are a lot if issues to work out and understand well but it is entirely possible to combine Application.cfm / Application.cfc functionality. Well, this would be two application.cfc. I already converted Ray's stuff to application.cfc. ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292242 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and SubApplications
You can extend the parent Application.cfc in the child Application.cfc. Make sure you don't override the application name though as I'm pretty sure that would create a different application name (and thus session scope). Also, make sure you call super() if the parent has any logic that also needs to run when the methods are called (onApplicationStart(), etc.). Extension was something that I looked at as I use that extensively already, but the two applications are not related at all. I didn't want the onRequestStart, and onApplicationStart events firing in Canvas from my main application. In addition, let's say there would be conflicting application values. ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292244 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Inserting a record into CFGRID
Thanks Ron i had already found this link - im gonna have to submit to the conclusion that you cannot insert a new record to a CFGRID when you are binding the results as i found the following quote on a live doc âYou cannot insert new rows directly in a grid that uses a bind expression. To add rows, you must enter the data in a form, and make sure the grid refreshes after the form has been submitted.â Thanks Anyway Guys This may help http://www.brucephillips.name/blog/index. cfm/2007/8/ 8/Updating-and-Adding-Records-Being-Displayed-In-ColdFusion-8s-cfgrid On 10/29/07, gary gilbert [EMAIL PROTECTED] wrote: Anthony, I am pretty sure that the insertbutton and deletebutton attributes are for applet only, additionally the insert attribute is for applet only, which means you can't insert a row into a cfgrid only update or delete. -- Gary Gilbert http://www.garyrgilbert.com/blog ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292243 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Copying a CFC Persisted in Session Scope
Greetings all- I realize this topic may have been covered on this list a while back, but I'm having problems locating a good answer, so here goes. Typically in our administrative web sites, on a request, we copy over our session variables to the request scope so we can have read-access to the information without having to place locks all over the place. Now that we're doing more OO stuff, I would like the ability to persist an object in the session scope while a user is signed in, and then copy it over to request for the same purpose. As you know, cfset session.object = request.object / only creates a pointer to original, and duplicate() doesn't work on CFCs (we're using CFMX 7). Anyone have a workaround or best-practice solution for this type of thing? -- Ryan Heldt Senior Web Developer Global Reach Internet Productions http://www.globalreach.com Phone: 515-296-0792, Fax: 515-296-3748 ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292247 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Copying a CFC Persisted in Session Scope
As you know, cfset session.object = request.object / only creates a pointer to original, and duplicate() doesn't work on CFCs (we're using CFMX 7). Anyone have a workaround or best-practice solution for this type of thing? No workaround is needed. You don't need anything more than a reference to the object. When request.object (which is itself just a reference) goes out of scope, session.object will be the only remaining reference to that object. Now, if your goal is to prevent changes in request.object from affecting session.object, that's something else entirely. In that case, though, I don't see why you'd need both references. Dave Watts, CTO, Fig Leaf Software ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292251 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Configuring CF Datasources
Can CF use datasources that have been manually created using the Windows ODBC Admin program? Or does CF require all datasources be created through the CF Admin screen? For ODBC datasources, you will need to first define them as System DSNs within the ODBC Administrator, then define them as CF datasources within the CF Administrator. Of course, you should avoid using ODBC if possible, as it generally won't perform as well as pure Java type 4 JDBC datasources. You should only use ODBC for databases that don't have corresponding JDBC drivers. Dave Watts, CTO, Fig Leaf Software ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292252 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Copying a CFC Persisted in Session Scope
I realize this topic may have been covered on this list a while back, but I'm having problems locating a good answer, so here goes. Typically in our administrative web sites, on a request, we copy over our session variables to the request scope so we can have read-access to the information without having to place locks all over the place. I would suggest that you create a Session Facade and then have all your objects reference the façade. It is generally a bad idea to have an object reference an external scope (session, request, etc.), and this technique hides the implementation from your business objects. Assuming you wanted to return an 'admin' object, your objects would use a sessionFaçade.getAdminObject() and the function within the façade would look like the following (excluding locks, etc. for the sake of simplicity): function getAdminObject() { Return session.adminObject } HTH, Rich Kroll ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292254 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
Anyone have a workaround or best-practice solution for this type of thing? The easiest would be that one no longer needs to have locks everywhere when reading session or other global scopes. The bugs that where the reason for this old rule of thumb have long been handled. This has not been a recommended practice since before MX6.1 IIRC. Some seven years now I believe. ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292250 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
How about a method in all your CFCs called 'copy' (perhaps in a generic base cfc that they all inherit from): cffunction name=copy access=public cfreturn this /cffunction I'm quite sure that doesn't return a pointer (no time to test the theory but I'm sure someone could verify that). Regards, Dominic On 29/10/2007, Ryan Heldt [EMAIL PROTECTED] wrote: Greetings all- I realize this topic may have been covered on this list a while back, but I'm having problems locating a good answer, so here goes. Typically in our administrative web sites, on a request, we copy over our session variables to the request scope so we can have read-access to the information without having to place locks all over the place. Now that we're doing more OO stuff, I would like the ability to persist an object in the session scope while a user is signed in, and then copy it over to request for the same purpose. As you know, cfset session.object = request.object / only creates a pointer to original, and duplicate() doesn't work on CFCs (we're using CFMX 7). Anyone have a workaround or best-practice solution for this type of thing? -- Ryan Heldt Senior Web Developer Global Reach Internet Productions http://www.globalreach.com Phone: 515-296-0792, Fax: 515-296-3748 ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292248 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Sessions and SubApplications
Justin, If the applications are not related at all, what benefits do you seek to gain from joining the two files. Are you just looking for less coding time? William -Original Message -From: [EMAIL PROTECTED] -Date: Oct 29, 2007 9:42 -To: CF-Talkcf-talk@houseoffusion.com -Subj: Re: Sessions and SubApplications - -You can extend the parent Application.cfc in the child Application. cfc. Make -sure you don't override the application name though as I'm pretty sure that -would create a different application name (and thus session scope). Also, -make sure you call super() if the parent has any logic that also needs to -run when the methods are called (onApplicationStart(), etc.). - - - - -Extension was something that I looked at as I use that extensively already, but the two applications are not related at all. I didn't want the onRequestStart, and onApplicationStart events firing in Canvas from my main application. In addition, let's say there would be conflicting application values. - - ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292246 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SOT but... any one using a bot trap?
I don't see the problem, users with Web accelerator get their stuff from Google's cache, not from my server, so I don't even hear about them. Anyway, our sites are dynamic, we publish news every day, so robots are asked to not use cache anyway. No, Google Web Accelerator doesn't rely on Google's cache, it prefetches links from your server. HA ha! LOL, if they go to the trap with Lynx, they will be flagged as Bot, and the only consequence will be that they will only get text, not images, which is exactly what Lynx does anyway ;-) Then, the next user who gets that DHCP address won't see images in their regular old browser? Dave Watts, CTO, Fig Leaf Software ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292245 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and SubApplications
On 10/29/07, Justin T [EMAIL PROTECTED] wrote: Extension was something that I looked at as I use that extensively already, but the two applications are not related at all. I didn't want the onRequestStart, and onApplicationStart events firing in Canvas from my main application. In addition, let's say there would be conflicting application values. If something hits the main Application.cfc, the Canvas onApplicationStart() etc. won't be run. Conversely, what if someone hits the Canvas app BEFORE the main application has been run? You may want that to bubble up to the main app so that it's onApplicationStart() runs, which means doing a super.onApplicationStart() if the main application isn't already set up. You could add a condition to this so it only happens if the main app isn't set up yet. If not, just don't call the superclass methods. I'm not sure what you mean by conflicting application values, but these will probably need to be handled on a case by case basis. The bottom line is that to share the session scope between the two apps, they have to share the application name. It might be a good excuse to refactor things so that the application variables in the main app are segmented from the application variables in the child app(s). It's also a good demonstration of why one might not want to place lots of data directly into the base application scope but instead into structures within the application scope. ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292249 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Copying a CFC Persisted in Session Scope
I'm quite sure that doesn't return a pointer (no time to test the theory but I'm sure someone could verify that). No, it returns a reference, just like any other assignment that doesn't explicitly use Duplicate. Dave Watts, CTO, Fig Leaf Software ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292253 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Sessions and SubApplications
I'm looking to share authentication so that users don't have to login twice. I think I'm going to refactor Canvas a tad so I can just go with extension. It won't take a lot of work. I was just wondering if this was something possible as I've never looked at it. I see that Kinky Ben had something going on with manual cookies, but I'm seeing some security risk there somehow. Thanks all. Justin, If the applications are not related at all, what benefits do you seek to gain from joining the two files. Are you just looking for less coding time? William ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292255 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
I'm not clear on why you would want to copy the instance instead of create a reference to it. That said, you could serialize the original and then deserialize the serialized version to make a true clone of the object (this requires using Java though). You could even wrap up this logic into a cloneComponent() method and attach it to the component that you want to copy, if you really wanted to. The benefit (or drawback) here is that the clone would also maintain copies of any composed components that the original had. So not only would you lose any references that other objects had to the original instance, you'd also lose any references that the original instance had to other objects. In any event, unless you have some fundamental reason to want a copy, just use a reference. On 10/29/07, Ryan Heldt [EMAIL PROTECTED] wrote: Greetings all- I realize this topic may have been covered on this list a while back, but I'm having problems locating a good answer, so here goes. Typically in our administrative web sites, on a request, we copy over our session variables to the request scope so we can have read-access to the information without having to place locks all over the place. Now that we're doing more OO stuff, I would like the ability to persist an object in the session scope while a user is signed in, and then copy it over to request for the same purpose. As you know, cfset session.object = request.object / only creates a pointer to original, and duplicate() doesn't work on CFCs (we're using CFMX 7). Anyone have a workaround or best-practice solution for this type of thing? ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292256 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: SOT but... any one using a bot trap?
No, Google Web Accelerator doesn't rely on Google's cache, it prefetches links from your server. Are you sure about that ? It uses client software installed on the user's computer, as well as data caching on Google's servers... ( http://en.wikipedia.org/wiki/Google_Web_Accelerator ) Sending your page requests through Google machines dedicated to handling Google Web Accelerator traffic. Storing copies of frequently looked at pages to make them quickly accessible. ( http://webaccelerator.google.com/support.html ) The acceleration is acheived by both compacting the page content and using the super fast Google network to get the content. Obviously the user cannot get the content directly from my server, how would it be compressed ? Then, the next user who gets that DHCP address won't see images in their regular old browser? Ok, just too bad, I just lost 0.1 % of my visitors! :-( -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292258 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CF / SQL Encryption
Afternoon all, I have just received a new project that requires very sensitive information about assault victims to be stored in a sql 2k database. I have already gotten the SSL up and running but can anyone give me some ideas has to how you might securely store/encrypt that information in the database, such as full names, ssn's, addresses, etc. I am using CF 6.1 Thanks, Brian ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292259 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
CF8 AJAX form question
Can anyone point me in the right direction. I would like to update form elements as a user makes changes. So instead of hitting a submit button, I'd like each one updated via AJAX through a CFC. Are there any downsides to doing this? Are there any tutorials or docs to help me accomplish this? I have been coming up short in my search or at least no understanding enough about it to know that it would help me.. :) Muchly Appreciated. Jeff ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292257 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CF8 AJAX form question
Jeff, I think we might need more clarification here. ...update form elements as a user makes changes has a few different meanings. If field elements (say city and state) are bound to other elements (like a zip field), then you might use Ajax to update the city and state with info brought back from a query to the server (this zip = this city and state), whereas if you were just applying proper formatting to a field's contents (say a U.S. Phone Number field), you aren't really using Ajax, since you aren't making a query of the server for information based upon what you've entered. I would suggest reviewing some of the popular JS libraries for either (I prefer JQuery myself). If you are on CF8 you can take advantage of the new built in Ajax components and methods (see the livedocs for detailed implementation). Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com J W wrote: Can anyone point me in the right direction. I would like to update form elements as a user makes changes. So instead of hitting a submit button, I'd like each one updated via AJAX through a CFC. Are there any downsides to doing this? Are there any tutorials or docs to help me accomplish this? I have been coming up short in my search or at least no understanding enough about it to know that it would help me.. :) Muchly Appreciated. Jeff ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292260 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CF8 AJAX form question
Ok... Hopefully I can explain this a little better. In simple terms... Say I have a mailing list signup form with different news letters. = {{You have been added to [mailing list X] using [email address select]}} [ ] Mailing List A [email address select] [ ] Mailing List B [email address select] [ ] Mailing List C [email address select] == Legend: [ ] Check Box [email address] Select box {{Ajax updated div inner html}} The wanted action: As a user clicks the checkbox to a particular mailing list, I call a CFC and add that person to that particular mailing list via an insert query and update the HTML above to let the user know they have been subscribed. OR if the checkbox is already checked, and they click on it, unsubscribe them in the same manor. Did I make this clearer or did I make it more complex??? Jeff On 10/29/07, Cutter (CFRelated) [EMAIL PROTECTED] wrote: Jeff, I think we might need more clarification here. ...update form elements as a user makes changes has a few different meanings. If field elements (say city and state) are bound to other elements (like a zip field), then you might use Ajax to update the city and state with info brought back from a query to the server (this zip = this city and state), whereas if you were just applying proper formatting to a field's contents (say a U.S. Phone Number field), you aren't really using Ajax, since you aren't making a query of the server for information based upon what you've entered. I would suggest reviewing some of the popular JS libraries for either (I prefer JQuery myself). If you are on CF8 you can take advantage of the new built in Ajax components and methods (see the livedocs for detailed implementation). Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com J W wrote: Can anyone point me in the right direction. I would like to update form elements as a user makes changes. So instead of hitting a submit button, I'd like each one updated via AJAX through a CFC. Are there any downsides to doing this? Are there any tutorials or docs to help me accomplish this? I have been coming up short in my search or at least no understanding enough about it to know that it would help me.. :) Muchly Appreciated. Jeff ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292262 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Copying a CFC Persisted in Session Scope
Thanks everyone for responding. Unfortunately, the method suggested by Rich below seemed to create a pointer rather than a separate instance of the object, as I had hoped. However, after discussing this with a co-worker, we seem to have cooked-up a viable solution. There were two objects I wanted to copy into the request scope. So, in each of those objects, we added a copy() constructor that took the initial object, then copied all of the properties over, for instance: cffunction name=copy access=public output=false returntype=AuthenticatedUser cfargument name=object type=AuthenticatedUser required=true / cfscript _userID = object.getUserID(); _username = object.getUsername(); _firstName = object.getFirstName(); _lastName = object.getLastName(); _email = object.getEmail(); _permissions = object.getPermissions(); _isAuthenticated = object.getIsAuthenticated(); /cfscript cfreturn this / /cffunction Then, in Application.cfc, onRequestStart(): !--- Copy AuthenticatedUser object over to request scope --- cflock timeout=10 throwontimeout=false type=readonly scope=session cfset request.myAuthenticatedUser = createObject(component,AuthenticatedUser).copy(session.myAuthenticatedUs er) / /cflock Thanks! Ryan -Original Message- From: Rich [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 12:40 PM To: CF-Talk Subject: RE: Copying a CFC Persisted in Session Scope I realize this topic may have been covered on this list a while back, but I'm having problems locating a good answer, so here goes. Typically in our administrative web sites, on a request, we copy over our session variables to the request scope so we can have read-access to the information without having to place locks all over the place. I would suggest that you create a Session Facade and then have all your objects reference the façade. It is generally a bad idea to have an object reference an external scope (session, request, etc.), and this technique hides the implementation from your business objects. Assuming you wanted to return an 'admin' object, your objects would use a sessionFaçade.getAdminObject() and the function within the façade would look like the following (excluding locks, etc. for the sake of simplicity): function getAdminObject() { Return session.adminObject } HTH, Rich Kroll ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292263 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Copying a CFC Persisted in Session Scope
Yes, but why are you creating a copy in the first place? Why do you think you need a copy and not a reference? On 10/29/07, Ryan Heldt [EMAIL PROTECTED] wrote: Thanks everyone for responding. Unfortunately, the method suggested by Rich below seemed to create a pointer rather than a separate instance of the object, as I had hoped. However, after discussing this with a co-worker, we seem to have cooked-up a viable solution. There were two objects I wanted to copy into the request scope. So, in each of those objects, we added a copy() constructor that took the initial object, then copied all of the properties over, for instance: cffunction name=copy access=public output=false returntype=AuthenticatedUser cfargument name=object type=AuthenticatedUser required=true / cfscript _userID = object.getUserID(); _username = object.getUsername(); _firstName = object.getFirstName(); _lastName = object.getLastName(); _email = object.getEmail(); _permissions = object.getPermissions(); _isAuthenticated = object.getIsAuthenticated(); /cfscript cfreturn this / /cffunction Then, in Application.cfc, onRequestStart(): !--- Copy AuthenticatedUser object over to request scope --- cflock timeout=10 throwontimeout=false type=readonly scope=session cfset request.myAuthenticatedUser = createObject(component,AuthenticatedUser).copy( session.myAuthenticatedUs er) / /cflock Thanks! Ryan -Original Message- From: Rich [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 12:40 PM To: CF-Talk Subject: RE: Copying a CFC Persisted in Session Scope I realize this topic may have been covered on this list a while back, but I'm having problems locating a good answer, so here goes. Typically in our administrative web sites, on a request, we copy over our session variables to the request scope so we can have read-access to the information without having to place locks all over the place. I would suggest that you create a Session Facade and then have all your objects reference the façade. It is generally a bad idea to have an object reference an external scope (session, request, etc.), and this technique hides the implementation from your business objects. Assuming you wanted to return an 'admin' object, your objects would use a sessionFaçade.getAdminObject() and the function within the façade would look like the following (excluding locks, etc. for the sake of simplicity): function getAdminObject() { Return session.adminObject } HTH, Rich Kroll ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292265 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFGRID ajax loading icon
You can replace the loading.gif image in cfide/scripts/ajax/resources/cf/images with any image you like. On 10/29/07, Asim Manzur [EMAIL PROTECTED] wrote: I am using HTML CFGRID using the ajax calls, and wondering that if there is any way to replace the loading image, (the one which is right beside the paging buttons) or any other way to display some kind of animation while the grid is being loading. Thanks, ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292266 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Adding custom functions to core
Is there a way to add custom functions to ColdFusion, so that I can reference them without having to put them in a cfc or cfm page? For instance, I've written a simple, user-defined function. But I don't want to save it in the Application or Request scope, because it needs to be available within my CFCs - And I don't want to pass the function into every CFC, because that's a pain. I want my function to be available _everywhere_ within my application, just like a normal function. In fact, I'd like it if my function was available everywhere to every application, on my server. Is this possible? Has anyone ever hacked the ColdFusion core to add their own custom functions? -- Nicholas Vacek Vivid Image - Programmer 320-587-8974 ext. 111 [EMAIL PROTECTED] http://www.vimm.com ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292267 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfx_payflowpro
I have a presentation with a installation guide for CFX_payflowpro - the one provided with the custom tag does not work when followed exactly. http://www.colderfusion.com/presentations.cfm -- Dec '06 I believe there's some authorize.net stuff in there also - what you're looking for is the PDF that is included in this zip. Jake Pilgrim Sean, Thanks for the response. I just took a look and here is the java version diff current 1.6.0_03 mx6 1.6.0_02 ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292264 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Copying a CFC Persisted in Session Scope
The objects I am copying from are persisted in the session scope. I would like to be able to read from these objects at runtime without having to lock them all over the place. Does creating a pointer in the request scope to an object in session absolve you from locking? I'm not sure, and to be honest, I haven't found a lot of information either way on the issue, so copying the object seems to be playing it safe, no? -Original Message- From: Brian Kotek [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 3:43 PM To: CF-Talk Subject: Re: Copying a CFC Persisted in Session Scope Yes, but why are you creating a copy in the first place? Why do you think you need a copy and not a reference? On 10/29/07, Ryan Heldt [EMAIL PROTECTED] wrote: Thanks everyone for responding. Unfortunately, the method suggested by Rich below seemed to create a pointer rather than a separate instance of the object, as I had hoped. However, after discussing this with a co-worker, we seem to have cooked-up a viable solution. There were two objects I wanted to copy into the request scope. So, in each of those objects, we added a copy() constructor that took the initial object, then copied all of the properties over, for instance: cffunction name=copy access=public output=false returntype=AuthenticatedUser cfargument name=object type=AuthenticatedUser required=true / cfscript _userID = object.getUserID(); _username = object.getUsername(); _firstName = object.getFirstName(); _lastName = object.getLastName(); _email = object.getEmail(); _permissions = object.getPermissions(); _isAuthenticated = object.getIsAuthenticated(); /cfscript cfreturn this / /cffunction Then, in Application.cfc, onRequestStart(): !--- Copy AuthenticatedUser object over to request scope --- cflock timeout=10 throwontimeout=false type=readonly scope=session cfset request.myAuthenticatedUser = createObject(component,AuthenticatedUser).copy( session.myAuthenticatedUs er) / /cflock Thanks! Ryan -Original Message- From: Rich [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 12:40 PM To: CF-Talk Subject: RE: Copying a CFC Persisted in Session Scope I realize this topic may have been covered on this list a while back, but I'm having problems locating a good answer, so here goes. Typically in our administrative web sites, on a request, we copy over our session variables to the request scope so we can have read-access to the information without having to place locks all over the place. I would suggest that you create a Session Facade and then have all your objects reference the façade. It is generally a bad idea to have an object reference an external scope (session, request, etc.), and this technique hides the implementation from your business objects. Assuming you wanted to return an 'admin' object, your objects would use a sessionFaçade.getAdminObject() and the function within the façade would look like the following (excluding locks, etc. for the sake of simplicity): function getAdminObject() { Return session.adminObject } HTH, Rich Kroll ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292274 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfx_payflowpro
On 10/29/07, Dan Vega [EMAIL PROTECTED] wrote: Thanks for the response. I just took a look and here is the java version diff current 1.6.0_03 mx6 1.6.0_02 Hmm, I didn't think MX actually ran at all on Java 5 or 6? -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292268 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
On 10/29/07, Rich [EMAIL PROTECTED] wrote: I would suggest that you create a Session Facade and then have all your objects reference the façade. It is generally a bad idea to have an object reference an external scope (session, request, etc.), and this technique hides the implementation from your business objects. And having references to sessionFacade.getFoo() everywhere is somehow better than having references to session.foo? Having a giant kitchen sink session facade CFC is not a good idea and is not encapsulation. That sort of session facade is not a coherent object and having sessionfacade everywhere means you have not encapsulated use of session scope at all - you've just required that people call functions to get at data. The better solution is to consider what data you have in session scope in the first place and encapsulate each piece of data in an object that relates to that data. You might have a user object in session scope - encapsulate that knowledge in a userService (singleton). That way you've encapsulated how the user is stored - none of your application code knows about session scope (or sessionFacade!). You ask the service to perform operations on the current user and it knows how to do that. It can even give you the user object if you want to operate on it directly. That means your application code is only dependent on a fully encapsulated service. It also means that you can change how the user object is stored independent of any other data in session scope (because that other data is encapsulated elsewhere) and nothing in your application needs to change. Sorry, but this weird obsession with sessionFacade CFCs drives me nuts - it's completely misguided and a very procedural way of thinking. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292273 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Access db interface
is there any open source admin style interface from CF to an MS access database to give access to raw tables information or a query window or anything of this type? Thanks ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292271 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Access db interface
cfquery name=myQry datasource=myaccessdsn #form.query# /cfquery cfdump var=#myQry# That should probably do the trick. Of course it's very unsafe, and will allow people to do anything they want to the db, which is sort of the idea, I guess. Russ -Original Message- From: Scott Raley -ITC [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 4:57 PM To: CF-Talk Subject: Access db interface is there any open source admin style interface from CF to an MS access database to give access to raw tables information or a query window or anything of this type? Thanks ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292277 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Access db interface
Is this what you're looking for? http://cfdbexplorer.riaforge.org/ All you'd need to do is set up a ColdFusion DSN to your Access database. -Original Message- From: Scott Raley -ITC [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 3:57 PM To: CF-Talk Subject: Access db interface is there any open source admin style interface from CF to an MS access database to give access to raw tables information or a query window or anything of this type? Thanks ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292275 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Access db interface
is there any open source admin style interface from CF to an MS access database to give access to raw tables information or a query window or anything of this type? Thanks ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292272 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CFGRID ajax loading icon
I am using HTML CFGRID using the ajax calls, and wondering that if there is any way to replace the loading image, (the one which is right beside the paging buttons) or any other way to display some kind of animation while the grid is being loading. Thanks, ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292261 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Copying a CFC Persisted in Session Scope
That is, in fact, what I am doing. I have a AuthenticatedUser CFC that contains all of the information about the user that is signed in. Now, for example, say I want to run a query that gets all of the timebills for that user, I would SELECT foo FROM bar WHERE UserID = #session.myAuthenticatedUser.getUserID()# I would prefer doing that without having to put a session lock around or in my query, which is why I wanted to copy the object down into request. Make sense, or am I going about this the wrong way? -Original Message- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 4:00 PM To: CF-Talk Subject: Re: Copying a CFC Persisted in Session Scope On 10/29/07, Rich [EMAIL PROTECTED] wrote: I would suggest that you create a Session Facade and then have all your objects reference the façade. It is generally a bad idea to have an object reference an external scope (session, request, etc.), and this technique hides the implementation from your business objects. And having references to sessionFacade.getFoo() everywhere is somehow better than having references to session.foo? Having a giant kitchen sink session facade CFC is not a good idea and is not encapsulation. That sort of session facade is not a coherent object and having sessionfacade everywhere means you have not encapsulated use of session scope at all - you've just required that people call functions to get at data. The better solution is to consider what data you have in session scope in the first place and encapsulate each piece of data in an object that relates to that data. You might have a user object in session scope - encapsulate that knowledge in a userService (singleton). That way you've encapsulated how the user is stored - none of your application code knows about session scope (or sessionFacade!). You ask the service to perform operations on the current user and it knows how to do that. It can even give you the user object if you want to operate on it directly. That means your application code is only dependent on a fully encapsulated service. It also means that you can change how the user object is stored independent of any other data in session scope (because that other data is encapsulated elsewhere) and nothing in your application needs to change. Sorry, but this weird obsession with sessionFacade CFCs drives me nuts - it's completely misguided and a very procedural way of thinking. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292279 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Query of Queries causing server to hang
Graham, I haven't seen this exact error before, but do you perchance have a cflock around the QoQ code? Query of queries are very expensive on the server and grow more so as the record set being manipulated increases. Many times, the same functions performed in QoQ can be performed by rewriting the SQL used in the original query to return a more efficient query from the start. If you must use QoQ with a large record set, you might try adding caching to the query to lower the overhead or scoping the manipulated record set as appropriate for later re-use. The lock may be increasing the problem as the thread count stacks up while waiting for the ability to lock. Once that happens, and CF reaches the maximum number of requests (as configured in the CF Admin) the initial request may not finish and the memory used to manipulate and handle the query record set may not be cleared for other requests. I had to do some SQL optimizing last year on a client site which was having similar issues. HTH, Jon On Oct 29, 2007, at 8:50 AM, graham bates wrote: Over the last few weeks we have noticed our servers starting to queue up and often not recover; upon inspecting the stack trace, we invariably see lines like the following; Thread jrpp-485: - waiting to lock 0x60597d10 (a java.lang.Class) Runing a CFQUERY at D:\Live\wwwroot\admin\blah.cfm:109 Thread jrpp-484: - waiting to lock 0x60597d10 (a java.lang.Class) Runing a CFQUERY at D:\Live\wwwroot\admin\data\blah2.cfm:104 Thread jrpp-483: - waiting to lock 0x60597d10 (a java.lang.Class) Runing a CFQUERY at D:\Live\cfc\outsource\blah3.cfc:53 What is interesting, is that when these line numbers are followed, they are always pointing to **Query of Queries**. Has anyone come across this kind of thing before, my searches on these and other forums reveal nothing. Many Thanks ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292276 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CF8 AJAX form question
This can get tricky because the user can fill out the form without using the mouse by tabbing with the keyboard. So you'd need onKeyPress handlers for each field as well. I suppose I'd be careful with this, but nothing is stopping you from doing it. Most people are used to having things save when they click the submit button, so consider that this autosave approach might confuse some people. On 10/29/07, J W [EMAIL PROTECTED] wrote: Ok... Hopefully I can explain this a little better. In simple terms... Say I have a mailing list signup form with different news letters. = {{You have been added to [mailing list X] using [email address select]}} [ ] Mailing List A [email address select] [ ] Mailing List B [email address select] [ ] Mailing List C [email address select] == Legend: [ ] Check Box [email address] Select box {{Ajax updated div inner html}} The wanted action: As a user clicks the checkbox to a particular mailing list, I call a CFC and add that person to that particular mailing list via an insert query and update the HTML above to let the user know they have been subscribed. OR if the checkbox is already checked, and they click on it, unsubscribe them in the same manor. Did I make this clearer or did I make it more complex??? Jeff On 10/29/07, Cutter (CFRelated) [EMAIL PROTECTED] wrote: Jeff, I think we might need more clarification here. ...update form elements as a user makes changes has a few different meanings. If field elements (say city and state) are bound to other elements (like a zip field), then you might use Ajax to update the city and state with info brought back from a query to the server (this zip = this city and state), whereas if you were just applying proper formatting to a field's contents (say a U.S. Phone Number field), you aren't really using Ajax, since you aren't making a query of the server for information based upon what you've entered. I would suggest reviewing some of the popular JS libraries for either (I prefer JQuery myself). If you are on CF8 you can take advantage of the new built in Ajax components and methods (see the livedocs for detailed implementation). Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com J W wrote: Can anyone point me in the right direction. I would like to update form elements as a user makes changes. So instead of hitting a submit button, I'd like each one updated via AJAX through a CFC. Are there any downsides to doing this? Are there any tutorials or docs to help me accomplish this? I have been coming up short in my search or at least no understanding enough about it to know that it would help me.. :) Muchly Appreciated. Jeff ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292269 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
Ryan. You don't have to lock shared scope variables, unless you need to account for race conditions. Mark On 10/30/07, Ryan Heldt [EMAIL PROTECTED] wrote: The objects I am copying from are persisted in the session scope. I would like to be able to read from these objects at runtime without having to lock them all over the place. Does creating a pointer in the request scope to an object in session absolve you from locking? I'm not sure, and to be honest, I haven't found a lot of information either way on the issue, so copying the object seems to be playing it safe, no? -Original Message- From: Brian Kotek [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 3:43 PM To: CF-Talk Subject: Re: Copying a CFC Persisted in Session Scope Yes, but why are you creating a copy in the first place? Why do you think you need a copy and not a reference? On 10/29/07, Ryan Heldt [EMAIL PROTECTED] wrote: Thanks everyone for responding. Unfortunately, the method suggested by Rich below seemed to create a pointer rather than a separate instance of the object, as I had hoped. However, after discussing this with a co-worker, we seem to have cooked-up a viable solution. There were two objects I wanted to copy into the request scope. So, in each of those objects, we added a copy() constructor that took the initial object, then copied all of the properties over, for instance: cffunction name=copy access=public output=false returntype=AuthenticatedUser cfargument name=object type=AuthenticatedUser required=true / cfscript _userID = object.getUserID(); _username = object.getUsername(); _firstName = object.getFirstName(); _lastName = object.getLastName(); _email = object.getEmail(); _permissions = object.getPermissions(); _isAuthenticated = object.getIsAuthenticated(); /cfscript cfreturn this / /cffunction Then, in Application.cfc, onRequestStart(): !--- Copy AuthenticatedUser object over to request scope --- cflock timeout=10 throwontimeout=false type=readonly scope=session cfset request.myAuthenticatedUser = createObject(component,AuthenticatedUser).copy( session.myAuthenticatedUs er) / /cflock Thanks! Ryan -Original Message- From: Rich [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 12:40 PM To: CF-Talk Subject: RE: Copying a CFC Persisted in Session Scope I realize this topic may have been covered on this list a while back, but I'm having problems locating a good answer, so here goes. Typically in our administrative web sites, on a request, we copy over our session variables to the request scope so we can have read-access to the information without having to place locks all over the place. I would suggest that you create a Session Facade and then have all your objects reference the façade. It is generally a bad idea to have an object reference an external scope (session, request, etc.), and this technique hides the implementation from your business objects. Assuming you wanted to return an 'admin' object, your objects would use a sessionFaçade.getAdminObject() and the function within the façade would look like the following (excluding locks, etc. for the sake of simplicity): function getAdminObject() { Return session.adminObject } HTH, Rich Kroll ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292283 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Server performance problem since upgrading to CF8
Every since upgrading to CF8 I've been having a frustrating problem. After starting CF, it will run for a while (sometimes serveral hours, sometimes less than an hour) at about 1% - 3% in terms of processor load. (It's a 2 cpu - 4 core system.) Then, all of a sudden, the processor load will jump up to about 25% and stay there until CF is restarted. Pages then start loading very sluggishly. This never happened with CF7 and I haven't made any code changes since upgrading. Also, the CF code that this server runs is very light. Anyone seen this, or have any ideas. BTW, I'm running the standard edition of CF so I don't have access to the server monitor. ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292280 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Copying a CFC Persisted in Session Scope
Yes, but why are you creating a copy in the first place? Why do you think you need a copy and not a reference? I think he is copying from the session scope to the request scope, and he does not want to change the session object's values when changing with the request object's values. -- Josh ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292270 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
There should, since MX6 or so, be no reason to create read-only locks unless you have some sort of weird race condition going on. All session vars are thread-safe, and so cannot be simultaneously read and written to. So, you don't need to be absolved from locking even if you are referencing the session scope directly -- CF is forgiving. :-) --Ben Doom Ryan Heldt wrote: The objects I am copying from are persisted in the session scope. I would like to be able to read from these objects at runtime without having to lock them all over the place. Does creating a pointer in the request scope to an object in session absolve you from locking? I'm not sure, and to be honest, I haven't found a lot of information either way on the issue, so copying the object seems to be playing it safe, no? ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292281 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
Ryan Heldt wrote: The objects I am copying from are persisted in the session scope. I would like to be able to read from these objects at runtime without having to lock them all over the place. Does creating a pointer in the request scope to an object in session absolve you from locking? I'm not sure, and to be honest, I haven't found a lot of information either way on the issue, so copying the object seems to be playing it safe, no? As I pointed out previously one NO LONGER NEED to lock reads and other non-race condition writes to session, application and server scopes. This problem was resolved several version ago. One could quite happily and safely access the session persisted objects directly if that is the only requirement for all this extra work and memory use. You will be doubling the memory requirement of each and every object you duplicate from the session scope to the request or similar scope. But there have been some interesting thoughts on copying objects when one does have a need to do this. ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292278 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Copying a CFC Persisted in Session Scope
Unless you have an issue with race conditions, you don't have to bother with any of this. If you do have a situation where a race condition will cause an error, just add locking for that situation. On 10/29/07, Ryan Heldt [EMAIL PROTECTED] wrote: The objects I am copying from are persisted in the session scope. I would like to be able to read from these objects at runtime without having to lock them all over the place. Does creating a pointer in the request scope to an object in session absolve you from locking? I'm not sure, and to be honest, I haven't found a lot of information either way on the issue, so copying the object seems to be playing it safe, no? ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292284 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Copying a CFC Persisted in Session Scope
And having references to sessionFacade.getFoo() everywhere is somehow better than having references to session.foo? I think you are getting stuck on the name 'sessionFacade'; I was attempting to suggest abstracting access to the variable of which his components had no direct knowledge. If my code is calling userService.getFoo() instead of a reference to session.foo then I think that is absolutely a better choice to utilize a facade. The added benefit of using the façade is that you can unit test the service (by using a mock object). That sort of session facade is not a coherent object and having sessionfacade everywhere means you have not encapsulated use of session scope at all - you've just required that people call functions to get at data. It seems as though you are mixing concepts; a well designed object, and how it access an external scope. I believe that within a well designed object, it should not reference a scope it does not directly have access to and should use a façade to get access to that data. The better solution is to consider what data you have in session scope in the first place and encapsulate each piece of data in an object that relates to that data. I agree completely. You might have a user object in session scope - encapsulate that knowledge in a userService (singleton). That way you've encapsulated how the user is stored - none of your application code knows about session scope (or sessionFacade!). I agree that the application should utilize a service to interact (in your example) a user, but again, I think the service should not access the session directly either, it should use a façade to access the session. You ask the service to perform operations on the current user and it knows how to do that. It can even give you the user object if you want to operate on it directly. That means your application code is only dependent on a fully encapsulated service. It also means that you can change how the user object is stored independent of any other data in session scope (because that other data is encapsulated elsewhere) and nothing in your application needs to change. I could not agree more. - Rich Kroll ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292285 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
At the risk of disagreeing with Sean, which usually ends up with me realizing I'm wrong about something... On 10/29/07, Sean Corfield [EMAIL PROTECTED] wrote: And having references to sessionFacade.getFoo() everywhere is somehow better than having references to session.foo? I do see a difference, in that the calling code doesn't actually know about the session scope or how the data is being persisted. So I suppose a better name might be PersistenceFacade (or even PersistenceAdapter), but the point is that you are free to change how things are actually stored without changing anything outside the facade. Having a giant kitchen sink session facade CFC is not a good idea and is not encapsulation. That sort of session facade is not a coherent object and having sessionfacade everywhere means you have not encapsulated use of session scope at all - you've just required that people call functions to get at data. Isn't that the very definition of encapsulation? I don't see it as a kitchen sink, nor a non-coherent object. On the contrary, I see it as a very coherent object: it is the gatekeeper to the shared scope, and everything that wants to deal with the shared scope needs to talk to the facade. The better solution is to consider what data you have in session scope in the first place and encapsulate each piece of data in an object that relates to that data. You might have a user object in session scope - encapsulate that knowledge in a userService (singleton). That way you've encapsulated how the user is stored - none of your application code knows about session scope (or sessionFacade!). You ask the service to perform operations on the current user and it knows how to do that. It can even give you the user object if you want to operate on it directly. That means your application code is only dependent on a fully encapsulated service. It also means that you can change how the user object is stored independent of any other data in session scope (because that other data is encapsulated elsewhere) and nothing in your application needs to change. I totally agree here. I would pass the SessionFacade into the UserService, and nothing outside the UserService has any idea where it is getting or storing anything. If I call userService.getCurrentUser(), internally the service might be grabbing the object from the SessionFacade, but nothing outside of it knows that. I still think there is value in having a single point of interaction with the shared scope via the SessionFacade. If I understand your point of view on this, either your UserService would need to interact directly with the session scope, or you have to create service-specific objects that encapsulate interaction with the session scope and pass those into each service that needs them. Which means instead of having one object that deals with the session scope, now you have a bunch of them. The upside to that design decision seems to be that you have granular control over how/where the data is persisted for each service, but the downside is that you have multiple additional objects to deal with (one for each service). And since I have never run into a situation where different services needed to use different persistence mechanisms (everything is usually just in the session scope), this seems like an increase in complexity for not much real benefit. Further, since I'm passing the SessionFacade into the service at configuration time, if the need ever arises, I can simply pass in some other object that works differently without having to change anything in the service. Or perhaps are you advocating pushing the interaction with the session scope into a DAO, do be grouped with anything else that needs to be persisted (including the database)? Maybe part of the issue is that aside from a User object and maybe a Shopping Cart or something, I really don't keep much in the session scope at all. Sorry, but this weird obsession with sessionFacade CFCs drives me nuts - it's completely misguided and a very procedural way of thinking. If one had direct references to the SessionFacade all over their code, I'd agree with you. But I'd say the approach outlined above is definitely not a procedural approach. If anything, the only point of contention is your approach of having each service deal with the session scope through a service-specific object vs. my approach of having the services go through a single component to deal with the session scope. Thoughts? ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292282 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe:
RE: Server performance problem since upgrading to CF8
Anyone seen this, or have any ideas. BTW, I'm running the standard edition of CF so I don't have access to the server monitor. I suggest you invest in one of the other monitoring tools available - SeeFusion or FusionReactor. You will likely find the problem a lot faster, and it'll pay for itself on its first use as a result. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292288 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Copying a CFC Persisted in Session Scope
The objects I am copying from are persisted in the session scope. I would like to be able to read from these objects at runtime without having to lock them all over the place. Does creating a pointer in the request scope to an object in session absolve you from locking? I'm not sure, and to be honest, I haven't found a lot of information either way on the issue, so copying the object seems to be playing it safe, no? No, creating a reference in the request scope to an object in the session scope doesn't absolve you of responsibility for race conditions. But is there really a possibility for a race condition here anyway? I sincerely doubt it (although I would need to see source code to guarantee that). What I can guarantee, though, is that playing it safe in this case may not actually be a safe solution at all; locking imposes significant overhead, so using it where it isn't necessary may prevent your application from scaling as needed. As someone who spends a fair amount of my time reviewing others' code, I've actually run across this many times; far more than I've encountered race conditions. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292287 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Copying a CFC Persisted in Session Scope
That is, in fact, what I am doing. I have a AuthenticatedUser CFC that contains all of the information about the user that is signed in. Now, for example, say I want to run a query that gets all of the timebills for that user, I would SELECT foo FROM bar WHERE UserID = #session.myAuthenticatedUser.getUserID()# I would prefer doing that without having to put a session lock around or in my query, which is why I wanted to copy the object down into request. Make sense, or am I going about this the wrong way? You are going about this the wrong way. There is no need to copy your session object to the request scope. There is no potential for a race condition to occur if two request invoke that method concurrently - they will (presumably) get the same result. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292286 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CF / SQL Encryption
I have just received a new project that requires very sensitive information about assault victims to be stored in a sql 2k database. I have already gotten the SSL up and running but can anyone give me some ideas has to how you might securely store/encrypt that information in the database, such as full names, ssn's, addresses, etc. This is a very complicated question, and any answers you get here are bound to be less than complete. Basically, though, the answers will depend on your threat profile. Specifically, what are the specific security problems that you're worried about? If you're worried about people from the outside getting access to this data, you will be concerned about encryption from within your application server, and key management within your application server. You can encrypt values from within CF and store them within the database, but your application server would presumably require the ability to decrypt those values later, so you'd need to store the key(s) used to encrypt and decrypt values within your application server code. Someone who compromises your server may be able to acquire those keys and decrypt values. One potential solution to this would be to have separate environments for encrypting and decrypting values - for example, you might accept values from a public server, which could have an encryption key, but you might limit viewing those encrypted records to a completely separate server, which would possess the decryption key. That would obviously require separate keys for both (http://en.wikipedia.org/wiki/Public_key) If you're worried about people within your organization getting access to this data, you will be concerned about limiting and segmenting administrative access to application server code and databases. You may also be concerned about encrypting network traffic between your application and database servers. Of course, everybody's concerned with the former at the expense of the latter, even though most security incidents involve your own employees rather than some big bad hacker. I am using CF 6.1 You won't want to rely on CF 6.1's built-in encryption functionality, then. CF7 or higher include industry-standard encryption functionality. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292289 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CFC to check spam score BEFORE sent...
I would like to install something on our server that will check an emails spam score before we send it out to catch any problems. Is there any solution cfc, java, .net, server software ( windows 2003 ) that anyone knows about. Having a hard time refining google search to come up with a focused answer. Thanks... ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292290 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Server performance problem since upgrading to CF8
On a four core system, a CPU pegged at 25% means one core is at 100%; CF has probably filled the JVM memory and is permanently garbage collecting. I agree with Dave - get FusionReactor and set a memory alert threshold in the crash prevention options. On 10/30/07, Kevin Pompei [EMAIL PROTECTED] wrote: Every since upgrading to CF8 I've been having a frustrating problem. After starting CF, it will run for a while (sometimes serveral hours, sometimes less than an hour) at about 1% - 3% in terms of processor load. (It's a 2 cpu - 4 core system.) Then, all of a sudden, the processor load will jump up to about 25% and stay there until CF is restarted. Pages then start loading very sluggishly. This never happened with CF7 and I haven't made any code changes since upgrading. Also, the CF code that this server runs is very light. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292292 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Adding custom functions to core
Yes you can, We do this via Application.cfc, using the following technique. The udf.cfm has all the common functions. !--- Request --- cffunction name=onRequest returnType=void output=true cfargument name=targetPage type=string required=true/ cfinclude template=#arguments.targetPage# /cffunction cfinclude template=/base/udf.cfm / /cfcomponent Regards Dale Fraser http://learncf.com -Original Message- From: Nicholas Vacek [mailto:[EMAIL PROTECTED] Sent: Tuesday, 30 October 2007 7:49 AM To: CF-Talk Subject: Adding custom functions to core Is there a way to add custom functions to ColdFusion, so that I can reference them without having to put them in a cfc or cfm page? For instance, I've written a simple, user-defined function. But I don't want to save it in the Application or Request scope, because it needs to be available within my CFCs - And I don't want to pass the function into every CFC, because that's a pain. I want my function to be available _everywhere_ within my application, just like a normal function. In fact, I'd like it if my function was available everywhere to every application, on my server. Is this possible? Has anyone ever hacked the ColdFusion core to add their own custom functions? -- Nicholas Vacek Vivid Image - Programmer 320-587-8974 ext. 111 [EMAIL PROTECTED] http://www.vimm.com ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292291 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Adding custom functions to core
That only includes the UDF into the variables scope of the requested page. They won't be present in CFCs, custom tags, etc. cheers, barneyb On 10/29/07, Dale Fraser [EMAIL PROTECTED] wrote: Yes you can, We do this via Application.cfc, using the following technique. The udf.cfm has all the common functions. !--- Request --- cffunction name=onRequest returnType=void output=true cfargument name=targetPage type=string required=true/ cfinclude template=#arguments.targetPage# /cffunction cfinclude template=/base/udf.cfm / /cfcomponent Regards Dale Fraser -- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292295 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Server performance problem since upgrading to CF8
Kevin, What codebase are you running on it? Mark On 10/30/07, Kevin Pompei [EMAIL PROTECTED] wrote: Every since upgrading to CF8 I've been having a frustrating problem. After starting CF, it will run for a while (sometimes serveral hours, sometimes less than an hour) at about 1% - 3% in terms of processor load. (It's a 2 cpu - 4 core system.) Then, all of a sudden, the processor load will jump up to about 25% and stay there until CF is restarted. Pages then start loading very sluggishly. This never happened with CF7 and I haven't made any code changes since upgrading. Also, the CF code that this server runs is very light. Anyone seen this, or have any ideas. BTW, I'm running the standard edition of CF so I don't have access to the server monitor. ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292293 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Adding custom functions to core
No hacking necessary, just place your tags in /WEB-INF/cftags. On 10/30/07, Nicholas Vacek [EMAIL PROTECTED] wrote: Is there a way to add custom functions to ColdFusion, so that I can reference them without having to put them in a cfc or cfm page? For instance, I've written a simple, user-defined function. But I don't want to save it in the Application or Request scope, because it needs to be available within my CFCs - And I don't want to pass the function into every CFC, because that's a pain. I want my function to be available _everywhere_ within my application, just like a normal function. In fact, I'd like it if my function was available everywhere to every application, on my server. Is this possible? Has anyone ever hacked the ColdFusion core to add their own custom functions? -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292294 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Adding custom functions to core
That's for tags, not functions. cheers, barneyb On 10/29/07, James Holmes [EMAIL PROTECTED] wrote: No hacking necessary, just place your tags in /WEB-INF/cftags. On 10/30/07, Nicholas Vacek [EMAIL PROTECTED] wrote: Is there a way to add custom functions to ColdFusion, so that I can reference them without having to put them in a cfc or cfm page? For instance, I've written a simple, user-defined function. But I don't want to save it in the Application or Request scope, because it needs to be available within my CFCs - And I don't want to pass the function into every CFC, because that's a pain. I want my function to be available _everywhere_ within my application, just like a normal function. In fact, I'd like it if my function was available everywhere to every application, on my server. Is this possible? Has anyone ever hacked the ColdFusion core to add their own custom functions? = -- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292297 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Server performance problem since upgrading to CF8
You could also install the Dev version locally at and try running the code with the server monitor turned on. On 10/29/07, Kevin Pompei [EMAIL PROTECTED] wrote: Every since upgrading to CF8 I've been having a frustrating problem. After starting CF, it will run for a while (sometimes serveral hours, sometimes less than an hour) at about 1% - 3% in terms of processor load. (It's a 2 cpu - 4 core system.) Then, all of a sudden, the processor load will jump up to about 25% and stay there until CF is restarted. Pages then start loading very sluggishly. This never happened with CF7 and I haven't made any code changes since upgrading. Also, the CF code that this server runs is very light. Anyone seen this, or have any ideas. BTW, I'm running the standard edition of CF so I don't have access to the server monitor. ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292298 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Adding custom functions to core
Ah, that'll teach me to half-read a question. On 10/30/07, Barney Boisvert [EMAIL PROTECTED] wrote: That's for tags, not functions. cheers, barneyb On 10/29/07, James Holmes [EMAIL PROTECTED] wrote: No hacking necessary, just place your tags in /WEB-INF/cftags. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Check out the new features and enhancements in the latest product release - download the What's New PDF now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292299 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CFC to check spam score BEFORE sent...
I would like to install something on our server that will check an emails spam score before we send it out to catch any problems. If you know of one I'd love to hear about it as well. One idea that came to mind - if there were a way to use CFExecute to fire off SpamAssassin and tell it to check a message via the command line you should get something back for a score. Not 100% certain if that's possible with SA though. Still checking. I did find this: http://wiki.apache.org/spamassassin/AvoidingFpsForSenders as a list of tips but that doesn't help much. I also found a program called Mail Avenger that lets you process a message on SMTP receive instead of on POP/IMAP/Exchange delivery. Hatton ~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292296 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Adding custom functions to core
That's for tags, not functions. What about the base component? Correct me if I'm wrong but while it does not fit with all the restrictions the base component automatically inherited by all components. So you might be able to use this for your UDF's. ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292300 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Design/Web Development Agencies that has a strong CF core
Hey ... I just stumbled across this thread. In the future - If you guys would like to make a little cash off a referral, Alagad will pay you. Check out the Alagad Affiliate Program here: http://alagad.com/go/footer/alagad-affiliate-program And, BTW, we can do anything Figleaf or Teratech or any of the other big names can do (better? cheaper?). We've got an extremely strong staff and we're here to compete. Thanks :) Doug Hughes, President Alagad Inc [EMAIL PROTECTED] (note that I'm on the list via a different email address) 888 Alagad4 On 10/3/07, [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Four Eyes Productions http://www.foureyes.com 1.888.LAUNCH.9 All, Does anyone know of or had expereince workign with a reputatble Web Design/Development agencies where CF is a strong core of their development focus? This is for a publically trade company not a small Mom and Pop business. Thanks. D ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292301 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Adding custom functions to core
I think you're referring to %ColdFusion%/WEB-INF/cftags/component.cfc Might want to give this a read first: http://www.briankotek.com/blog/index.cfm/2007/8/27/Base-CFCOMPONENT-Rant -Original Message- From: Larry Lyons [mailto:[EMAIL PROTECTED] Sent: Monday, October 29, 2007 9:14 PM To: CF-Talk Subject: Re: Adding custom functions to core That's for tags, not functions. What about the base component? Correct me if I'm wrong but while it does not fit with all the restrictions the base component automatically inherited by all components. So you might be able to use this for your UDF's. ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292302 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
On 10/29/07, Rich [EMAIL PROTECTED] wrote: I think you are getting stuck on the name 'sessionFacade'; Only because that's what most people do *literally*. I was attempting to suggest abstracting access to the variable of which his components had no direct knowledge. If my code is calling userService.getFoo() instead of a reference to session.foo then I think that is absolutely a better choice to utilize a facade. The added benefit of using the façade is that you can unit test the service (by using a mock object). Totally agree. Using userService.getUser() as a facade for a user object stored in session scope is exactly what I'm advocating. It seems as though you are mixing concepts; I'm not - but a lot of other people are! I agree completely. I agree that the application should utilize a service to interact (in your example) a user, I could not agree more. See, we're on the same page. but again, I think the service should not access the session directly either, it should use a façade to access the session. I think that's a pointless abstraction - see my response to Brian for why but I'll also elaborate here since this is an important point and a lot of people seem to be missing it. Only the service should know or care where the object for which it acts as a facade is stored. Introducing an arbitrary abstraction and then coupling most (all) of your services to that abstraction overcomplicates things and makes your code more brittle. Once a service has access to a generic facade like that, it can access *any* data behind that facade and the faux-encapsulation of the facade encourages developers to do so, believing they're using good OO practice. All that happens is you get increased dependencies because you've opened up a conduit to data that a service should not be able to touch. If a service needs access to data in another service, it should go through the *service* but with this generic facade approach, it can go directly through the generic facade, completely breaking the layering and encapsulation in the application. A session facade object - by any name - *breaks* encapsulation by allowing unrestricted access to *any* data for which it acts as a facade. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292305 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Copying a CFC Persisted in Session Scope
On 10/29/07, Brian Kotek [EMAIL PROTECTED] wrote: And since I have never run into a situation where different services needed to use different persistence mechanisms I have. One day you will too. peeveAnd it's not persistence - memory is not persistent by definition, disk-based systems are persistent./peeve If one had direct references to the SessionFacade all over their code, I'd agree with you. Which is what most people do and that's why I'm making a fuss! I'm reviewing an application right now that has a sessionFacade containing nearly 80 methods for all sorts of random stuff and consequently they have references to sessionFacade all over their code. If you're using it as a simple get/set facade and injecting it directly into your services and then only using it within one or two methods, that addresses part of my complaint but now you've created an artificial coupling between classes - your services all become dependent on the facade and are all tied to the same shared scope handling. You've introduced an extra layer of abstraction for no real benefit - the service still refer to session (as the name of a component); you've introduced a (slight) performance overhead and you no longer have granular control over how the data is stored. There is a trade off here (of course) and I'll argue that having a single method inside a service that encapsulates use of session scope is better encapsulation than having the service depend on an external class that lots of other components also depend on. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292304 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Adding custom functions to core
On 10/29/07, Larry Lyons [EMAIL PROTECTED] wrote: What about the base component? Correct me if I'm wrong but while it does not fit with all the restrictions the base component automatically inherited by all components. So you might be able to use this for your UDF's. That would make the functions available inside any CFC but not inside CFM pages or custom tags etc. To be honest, using custom tags instead of UDFs is the easiest way to add functionality that is accessible in any file. And what's so horrible about saying this: cf_myFunction arg1=a arg2=123 result=foo / instead of: cfset foo = myFunction(arg1=a,arg2=123) / -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292303 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
On 10/29/07, Brian Kotek [EMAIL PROTECTED] wrote: just because I do this, I was missing the fact that many people might not impose the same limitation on themselves. By eliminating the centralized facade, you're not even giving other services the possibility of digging into shared scope data that is outside their area of concern. Right, and that's the rub... I do a lot of code audits these days and I see this cropping up over and over again: too many developers can't resist the convenience of accessing other service's data via the shared scope facade instead of going about it the right way. So I push hard to eliminate the temptation in order to break them of their bad habits :) OK, I'm sold. ;-) Cool! Still, if you could comment on your approach to dealing with the session scope in your services I'd be interested. Do you use a direct reference to the session scope? Or some other approach? In general, I isolate it into one private method that has a direct reference to session scope. The exact mechanism depends on what the cached object is and how it is initialized. For mock testing, just extend that service CFC and override that one method. That one method is often responsible for creating the cached object on-demand so the extended mock can double up as both a mock for the cache access and a way to substitute the creation of the cached object. Make sense? -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292308 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Copying a CFC Persisted in Session Scope
On 10/29/07, Sean Corfield [EMAIL PROTECTED] wrote: For mock testing, just extend that service CFC and override that one method. That one method is often responsible for creating the cached object on-demand so the extended mock can double up as both a mock for the cache access and a way to substitute the creation of the cached object. And just as a footnote on this: I don't like to break encapsulation just to make testing easier and I don't like to introduction additional, unnecessary abstractions just to make testing easier. Mocking by extension is a reasonable way around encapsulation and it doesn't need the extra abstraction. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292309 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Copying a CFC Persisted in Session Scope
I'm curious, then, how you handle reference to the session scope in your service. Do you actually reference the session scope directly? One of the things I like about the centralized SessionFacade is that it is easy to test by feeding in a fake struct that the facade uses in place of a real session scope. On Oct 30, 2007 12:37 AM, Sean Corfield [EMAIL PROTECTED] wrote: On 10/29/07, Brian Kotek [EMAIL PROTECTED] wrote: And since I have never run into a situation where different services needed to use different persistence mechanisms I have. One day you will too. But again, doesn't my approach make it very easy to refactor and supply an alternate shared scope interface component to the service if that should ever be necessary? peeveAnd it's not persistence - memory is not persistent by definition, disk-based systems are persistent./peeve I knew you'd say that which is why I was fumbling with the label to use. ;-) I'm still used to the days when we called these persistent scopes. If one had direct references to the SessionFacade all over their code, I'd agree with you. Which is what most people do and that's why I'm making a fuss! I'm reviewing an application right now that has a sessionFacade containing nearly 80 methods for all sorts of random stuff and consequently they have references to sessionFacade all over their code. Clearly that is a pretty poorly thought out design. If you're using it as a simple get/set facade and injecting it directly into your services and then only using it within one or two methods, that addresses part of my complaint but now you've created an artificial coupling between classes - your services all become dependent on the facade and are all tied to the same shared scope handling. You've introduced an extra layer of abstraction for no real benefit - the service still refer to session (as the name of a component); you've introduced a (slight) performance overhead and you no longer have granular control over how the data is stored. The extra layer of abstraction does make it easier to test, as well as know where I need to go look for any code that has anything to do with a shared scope. If the name is really bothering you I can refer to it as SharedScopeFacade or something similar. I just call it SessionFacade because, as a label, everyone pretty much understands the concept of a session as data that exists across multiple user requests. In other words, I see a difference between SessionFacade (the concept) and, say SessionScopeFacade (explicitly stating what scope is being encapsulated). There is a trade off here (of course) and I'll argue that having a single method inside a service that encapsulates use of session scope is better encapsulation than having the service depend on an external class that lots of other components also depend on. I agree that there is a trade off, and I hope that given this and the previous post that, while you wouldn't take the same approach, that the approach I'm using is: superior to direct references to the session scope across your code; superior to the generic all-in-one session facade that uses one get and one set method; and superior to the usage of a centralized SessionFacade that is also referenced all over the code instead of only within services (and even then to a very limited degree). In other words, the disagreement between our two approaches has actually been narrowed down to a single specific issue (the single facade vs. separate interaction with a shared scope within each service). ~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292306 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Copying a CFC Persisted in Session Scope
On Oct 30, 2007 12:46 AM, Sean Corfield [EMAIL PROTECTED] wrote: Once a service has access to a generic facade like that, it can access *any* data behind that facade and the faux-encapsulation of the facade encourages developers to do so, believing they're using good OO practice. All that happens is you get increased dependencies because you've opened up a conduit to data that a service should not be able to touch. If a service needs access to data in another service, it should go through the *service* but with this generic facade approach, it can go directly through the generic facade, completely breaking the layering and encapsulation in the application. Ah, see this makes it more clear why you're discouraging that. See, I would still always go through the appropriate service to get at data outside the current service, *even if the service could attempt to get at the data directly by using the SessionFacade*. In other words, I limit what a service will interact with via the SessionFacade as a deliberate convention. But just because I do this, I was missing the fact that many people might not impose the same limitation on themselves. By eliminating the centralized facade, you're not even giving other services the possibility of digging into shared scope data that is outside their area of concern. OK, I'm sold. ;-) Still, if you could comment on your approach to dealing with the session scope in your services I'd be interested. Do you use a direct reference to the session scope? Or some other approach? ~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292307 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4