Re: Moving part of my hosting business - thoughts about my plan please ...
Coming in a couple of months late here, but I've just been through a move from Windows/Adobe CF/MS SQL Server to Linux/Railo/MySQL and found a couple of things not previously mentioned. Windows - Linux: already covered above, but I'll just add that anything that turns into a file name (like CFC paths) is also included in the case-sensitivity issue. One issue that hit me was case inconsistency in strings stored in the database that were later used to build path names. AdobeCF - Railo: Even aside from the unsupported tags, syntax compatibility although very good is not 100%. See e.g. http://lagod.id.au/blog/?p=378. A lot of this will come down to coding style - your code might be completely fine. The big thing for me though is the way Apache and Tomcat work together. ACF goes to some lengths to disappear the Tomcat layer and make the whole thing look like a web server that miraculously knows what to do with cfm files. Railo is much more of a classic Tomcat app, in that it is definitely sitting behind the web server with its own separate configuration. I can go into more detail about the consequences of that if you like, but if you take the path of least resistance (use mod_cfml and make the Apache document root the same as the Tomcat context root) then at the very least you end up with a dirty big WEB-INF folder in your document root. MSSQL - MySQL: CRUD queries will almost certainly be fine. Heavy-weight slicing and dicing queries probably won't. There are lots of differences in DDL (I have a very home-brewed set of regexes that did the trick for me - happy to share). Stored procedures will need to be completely rewritten. Many functions are different, but most have direct equivalents. One gotcha is that when MySQL is running on Linux, database object names (e.g. table names) are case sensitive. That sounds like a lot, but it is perfectly feasible to have one codebase that will deploy and run happily in both environments (that might not be a requirement for you, but it does illustrate that the differences are not major). My total changeover time was about six weeks, but I was completely reworking my build and provisioning procedures at the same time. Feel free to ping me on or off list if you want any more detail on any of this. Jaime On Sat, Mar 29, 2014 at 1:31 PM, Mike K afpwebwo...@gmail.com wrote: Thank you everybody, I'm glad I asked.I have changed my plan now. Cameron and others made a good point. I was trying to do too many thing at once. My plan now is to get a new hosting environment as similar as possible to my current one, so its gives me the most chance that I'll be able to just copy everything over and most of it will work as is. Then work from there on the transition to Linux or the cloud and Railo in two more steps. Thanks to a suggestion from another member of this list off-list I'm not going with the cloud just yet, I'll go with a VPS at Viviotech and work from there. So far every question I've asked they have said yes we can do that all you do is Once again this group helps me out. In this case, I can see if I had gone with my original plan, it MIGHT have worked out ok, but with my luck the odds were that it would give me a lot of grief before it was all said and done.Thank you all I'll let you know how it all turns out. Cheers Mike Kear On Sat, Mar 29, 2014 at 2:12 AM, Money Pit websitema...@gmail.com wrote: Having been there/done that myself, I would follow Cameron's described route. You don't want to be debugging so many different issues at once on an OS you aren't intimately familiar with (and maybe not familiar at all). You mentioned you are on Win2003. Have you by chance missed out on running CF on a 64-bit Win OS? That was like manna from heaven when I first switched. Consider a Windows VPS from Viviotech. They can license you a copy of CF Enterprise *very* inexpensively. They are surprisingly robust for the prices charged, they are CF-literate and an excellent firm on general principles. From there consider leasing another Windows VPS and put Railo on it (Viviotech will do this for you for a small setup fee or for free IIRC). Then tinker away, migrate a low-profile site over when you're ready etc. This is what I did with my personal sites. You could take it a step further and after mastering Railo, retire the Windows/Railo VPS, fire up one with linux and start over again on the tinkering so you limit your issues to that part of the change. If you need more horsepower and have the budget for a CF license, look at the blade servers at Cybercon; check out their hardware configs. I don't see how you can beat those prices. My servers there have been absolutely reliable. -- --m@Robertson-- Janitor, The Robertson Team mysecretbase.com ~| Order the Adobe
Re: Can application scope gateways/DAOs returning an array of Objects?
Hi Jonathon, There's only one thisContact variable, which is being reused each time through the loop. So all you need to do is put: cfset var thisContact = right at the start. There's an indeterminate number of values that are passing through that one variable on their way into the array, but it's still one variable. And of course var scope returnArray and q_Contacts as well. If you're on CF9 things may a little different in that you may not need to explicitly var scope, but I'll let the CF9 gurus pick that one up. Jaime On Thu, Jan 14, 2010 at 4:26 PM, Jonathan Price jonat...@imakehthissound.com wrote: So, I'm relatively new to OO in ColdFusion, and I'm banging my head against one issue in particular. Let's say I've got a DAO or Gateway object in my APPLICATION scope that needs to return a collection of beans, I'm having trouble understanding the need to VAR scope all internally used variables when I've got a dynamic number of objects being returned. That's not very clear, so let's say this is the function in question: cffunction name=getContacts access=public returntype=Contact[] cfset returnArray = ArrayNew() cfset q_Contacts = cfquery name=q_Contacts SELECT * FROM Contacts /cfquery cfloop query=q_Contacts cfset thisContact = createObject('component', 'Contact').init(...insert init info here...) cfset ArrayAppend(returnArray, thisContact) /cfloop cfreturn returnArray /cffunction So, my concern is with the inability to create the Contact objects in the VAR scope since I don't know how many I'll be creating before hand. If I do it like this (i.e. without the VAR on the createObject), am I setting myself up problems? If so, how should I handle this? Thanks again, and I hope it's not to ridiculous a question. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329653 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SQLServer Express and SQLServer - totally compatible?
Just a thought: if you're carting an external disk back and forth, why not put a VM with SQL Express and your databases on that disk? Personally I run a little VM farm with SQL and CF all off the one eSATA disk. All is kosher as far as SQL is concerned, and if you need to get data onto another server you've still got linked servers and/or SSRS, or even just a file copy of the results of your processing. BTW, I would not be at all suprised if SQL had some kind of fit when your database files arrive back from wherever with a big hole in their LSN's. It's precisely for this reason that detaching/reattaching is necessary. Jaime On Tue, Jan 5, 2010 at 12:05 PM, Mike Kear afpwebwo...@gmail.com wrote: I'm building a second machine which will run CF on it, and will need to manipulate my SQLServer2005 databases on a network server. I'm going to be connecting this machine to these databases on an external drive as though they're local, because i'm going to be swapping back and forth between these machines regularly. I dont want to keep attaching and detatching lots of databases - i'd rather just connect the external database to this machine and then boot it up. So if i have SQLServer2005 (the full version) driving the databases when I'm working at one location, and SQLServer2005 Express driving the databases when I'm working at my other location, will that cause problems in the databases? Are the two versions fully compatible at least as far as database file structure etc is concerned? I should also add that I'm only going to be using the Express on a dev machine - not connected to the internet, and there wont be multiple users. And i hardly ever use the advanced features of the database for these little applications - things like syndication and triggers etc - i prefer to have ColdFusion take care of all those kinds of jobs. So for the most part, the databases are simple data storage mechanisms, with all the processing of data being done in ColdFusion. Can anyone see a problem if i do this?I'm not sure the machine I'm building justifies the cost of buying a licence for SQLServer2005 the full version. -- Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET http://asp.net/ hosting from AUD$15/month ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329406 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Possible thread issue?
Andre, Is this DAO a singleton? I notice the queries aren't var scoped. If this is a singleton under load another thread could easily overwrite your trans_insert variable in between issuing the query and logging the generated key. Jaime On Tue, Dec 8, 2009 at 8:58 PM, Andre Kapp kap...@gmail.com wrote: Ok - changed the pk id field returned to the following: cfset theTransID = trans_insert_res.GENERATED_KEY Still the same issue. Here is the complete cfc module sorry for it being a bit long... cfcomponent displayname=TransDAO cffunction name=init access=public returntype=moneymaker.core.model.trans.TransDAO output=false cfargument name=datasourceSettings type=moneymaker.core.model.DatasourceSettings required=true/ cfset variables.dss = arguments.datasourceSettings / cfset variables.dsn = variables.dss.getDatasourceName() / cfset variables.accountService = application.serviceFactory.getBean(AccountService) cfreturn this / /cffunction cffunction name=fetch access=public returntype=Trans displayname=fetch /cffunction cffunction name=process access=public returntype=struct cfargument name=acctid required=Yes type=numeric / cfargument name=cardid required=Yes type=numeric / cfargument name=cardnumber required=Yes type=numeric / cfargument name=amount required=Yes type=numeric / cfargument name=type required=Yes type=string / cfargument name=paytype required=Yes type=numeric / cfargument name=description required=Yes type=string / cfargument name=tracenumber required=no type=string default= / cfargument name=stLimits required=Yes type=struct / cfset var stTrans = structNew() / cftry cflog file=transdao_cfc text=Process tx for #cardnumber# type=information !--- Get balance --- cfset theCurrentAvailableBalance = variables.accountService.getAccountBalance(available, arguments.acctid) cfset theCurrentActualBalance = variables.accountService.getAccountBalance(actual, arguments.acctid) cfset theNewAvailableBalance = numberformat(theCurrentAvailableBalance, _.__) + numberformat(arguments.amount, _.__) cfset theNewActualBalance = numberformat(theCurrentActualBalance, _.__) + numberformat(arguments.amount, _.__) cfset theNewActualRunningBalance = numberformat(theCurrentActualBalance, _.__) + numberformat(arguments.amount, _.__) !--- If debit, make sure there is enough funds --- !--- 2009-09-29 AJK Changed this to enabled debit to push the account into negative. cfif arguments.type IS D99 AND theNewAvailableBalance LT 0 cfthrow errorcode=51 detail=Insuffcient Funds message=Error 51: Card has insufficient funds /cfif --- !--- Check status of card/account --- cfquery datasource=#variables.dsn# name=cardcheck SELECT * FROM card WHERE card_id = cfqueryparam cfsqltype=CF_SQL_NUMERIC value=#arguments.cardid# /cfquery cfif cardcheck.status_id NEQ 1 cfswitch expression=#cardcheck.status_id# !--- Closed account --- cfcase value=3cflog text=closed card:#cardcheck.card_cardnumber# loaded for #arguments.amount# on #dateformat(now(), '-mm-dd')# #timeformat(now(), 'HH:mm:ss')# file=closed_card_loads type=Information/cfcase !--- Lost Card --- cfcase value=4cfif arguments.type NEQ D98cfthrow errorcode=41 detail=Lost Card message=Error 41: Card has been reported lost/cfif/cfcase !--- Stolen Card --- cfcase value=5cfif arguments.type NEQ D98cfthrow errorcode=43 detail=Stolen Card message=Error 43: Card has been reported stolen/cfif/cfcase !--- Restricted Card --- cfcase value=10 cfthrow errorcode=62 detail=Restricted Card message=Error 62: Card is restricted /cfcase !--- New Inactive Card --- cfcase value=11 cftry cfif cardcheck.card_type_id EQ 1 OR cardcheck.bin_prog_link_id EQ 9 cfquery datasource=#variables.dsn# update card set status_id = 1 where card_id = cfqueryparam cfsqltype=CF_SQL_NUMERIC value=#arguments.cardid# /cfquery cflog text=#cardcheck.card_cardnumber# activated on load
Re: Possible thread issue?
Andre, Yeah, looks like singleton, but you'd have to find where the service is instantiated to be sure. Throw it back to the guys who wrote the code anyway! They should be var scoping always. Don't know about the classid. You can of course get the hashcode - see http://www.compoundtheory.com/?action=displayPostID=42. Failing that, a common but invasive way to establish CFC instance identity is to set a variable: cfset transDAO.__variable_name_unlikely_to_be_already_used = I'm back!!! and then next time around check IsDefined(transDAO, __variable_name_unlikely_to_be_already_used ). Jaime On Wed, Dec 9, 2009 at 1:50 PM, Andre Kapp kap...@gmail.com wrote: Andre, Is this DAO a singleton? I notice the queries aren't var scoped. If this is a singleton under load another thread could easily overwrite your trans_insert variable in between issuing the query and logging the generated key. Jaime Tks Jaime. I have traced the code back to where this object is instantiated. It pretty much looks like a singleton design! This is the code just above this transdao.cfc Just a quick question. I'm much more familiar with the Java environment, so still learning the CF way. Is there a way to get the classid value of the Java object that gets created by coldfusion? This will help me to dump the TransDAO classid when displaying the transid value. If the classid is the same, then it will prove the singleton implementation. Tks Andre ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328996 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Possible thread issue?
I can't comment on whether for your app singleton is right or not. Just be aware that in CF singleton is much more common than in Java, largely due to the much higher object instantiation overhead. Jaime On Wed, Dec 9, 2009 at 3:28 PM, Andre Kapp kap...@gmail.com wrote: Tks Leigh I changed all the variables to be var scoped. I have also var scoped the queries. Still busy testing but it looks go Tks again for all the input. Without this I would have been lost! I still believe the Singleton is not the correct design pattern here, so will still do some work on that. Andre ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329000 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Possible thread issue?
Andrew, I can't help thinking the code you haven't shown is important. Are you creating a CF thread? And are any of your variables in shared scopes? Transactions and threads don't necessarily work the way you might expect. There are lots of possibilites for cross-talk between threads, connections and transaction in a CF thread scenario, particularly where shared scopes are involved. Jaime On Tue, Dec 8, 2009 at 5:22 AM, Andre Kapp kap...@gmail.com wrote: I'v now come across a code problem that I simply cannot understand what is happending here. The code is part of a cfc module that is behind a web-service. This is not inside a loop - just a normal cfc with a function that enter, process and returns data... The problem here is the transID. When you start putting a bit of load on this code, the transID gets mangled/confused/ When looking at the first cflog here, the trans id is the correct value is an thedatabase table. However, after the values are assigned to stTrans, the trans id is different! It is that of another tx that happend later on... Nowere is the transID updated in the code between the two cflog's. The value in the cflog is correct, as it is this value that I receive on the other side of the WebService module Here is the logfile output Look for card no 00213 Information,jrpp-5,12/07/09,20:11:27,GCCSVPWS,Process tx for xxx00213 with tx id 163537 and Thread.txid is 163537 Information,jrpp-0,12/07/09,20:11:27,GCCSVPWS, Process tx (after transaction) for x000346 with tx id 163537 and Thread.txid is 163537 Information,jrpp-4,12/07/09,20:11:27,GCCSVPWS, Process tx (after transaction) for 38304 with tx id 163537 and Thread.txid is 163537 Information,jrpp-7,12/07/09,20:11:27,GCCSVPWS,Process tx for 254 Information,jrpp-9,12/07/09,20:11:27,GCCSVPWS,Process tx for xxx0270 Information,jrpp-16,12/07/09,20:11:27,GCCSVPWS, Process tx (after transaction) for xx005097 with tx id 163537 and Thread.txid is 163537 Information,jrpp-18,12/07/09,20:11:27,GCCSVPWS, Process tx (after transaction) for xx00239 with tx id 163537 and Thread.txid is 163537 Information,jrpp-19,12/07/09,20:11:27,GCCSVPWS, Process tx (after transaction) for xx00304 with tx id 163537 and Thread.txid is 163537 Information,jrpp-8,12/07/09,20:11:27,GCCSVPWS,Process tx for x12 with tx id 163538 and Thread.txid is 163538 Information,jrpp-9,12/07/09,20:11:27,GCCSVPWS,Process tx for x270 with tx id 163539 and Thread.txid is 163539 Information,jrpp-3,12/07/09,20:11:27,GCCSVPWS, Process tx (after transaction) for 0288 with tx id 163539 and Thread.txid is 163539 Information,jrpp-7,12/07/09,20:11:27,GCCSVPWS,Process tx for xxx254 with tx id 163540 and Thread.txid is 163540 Information,jrpp-5,12/07/09,20:11:27,GCCSVPWS, Process tx (after transaction) for xx0213 with tx id 163540 and Thread.txid is 163540 I found a problem when I did code optimizationon the other side of the webservice. First thought it was the web service, but trace it right down to this bit of code on the one server. This is happening on my Mac's VM's running CentOS 5.2 and Coldfusion 8 on top of that. Coldfusion details: Server Product ColdFusion Version 8,0,1,195765 Operating SystemUNIX OS Version 2.6.18-128.2.1.el5 JVM Details Java Version1.6.0_04 Database is MySQL version 5.0 Any any any ideas will be appreciated! snipped SELECT last_insert_id() AS transid; /cfquery cfset theTransID = trans_insert.transid cfset Thread.txid = trans_insert.transid cflog file=transdao_cfc text=Process tx for #cardnumber# with tx id #theTransID# and Thread.txid is #Thread.txid# type=information !--- Update acct balance on gateway --- cfquery datasource=#variables.dsn# UPDATE acct_balances SET acct_balance = acct_balance + #arguments.amount#, acct_balance_available = acct_balance_available + #arguments.amount# WHERE acct_id = cfqueryparam cfsqltype=CF_SQL_INTEGER value=#arguments.acctid# /cfquery /cftransaction !--- CHECK FOR NEG to POS cftry cfif theCurrentActualBalance LT 0 AND theNewActualBalance GTE 0 cfquery datasource=#variables.dsn# UPDATE fees_collection SET settled = cfqueryparam cfsqltype=CF_SQL_INTEGER value=1, settled_trans_id = cfqueryparam
Re: Possible thread issue?
Andrew G, But...:) A single request won't necessarily keep the same connection, especially under load. So unless you use a transaction, it's entirely possible for the insert query to run on one connection, and the select last_insert_id() to run on another connection. See http://lagod.id.au/blog/?p=41 Jaime On Tue, Dec 8, 2009 at 8:51 AM, Andrew Grosset rushg...@yahoo.com wrote: maybe not (wrong)... The ID that was generated is maintained in the server on a per-connection basis. This means that the value returned by the function to a given client is the first AUTO_INCREMENT value generated for most recent statement affecting an AUTO_INCREMENT column by that client. This value cannot be affected by other clients, even if they generate AUTO_INCREMENT values of their own. This behavior ensures that each client can retrieve its own ID without concern for the activity of other clients, and without the need for locks or transactions. http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id I was under the impression that Last_Insert_ID() in MySQL was the equilavent of Scope_Identity() in MSSQL.please correct me if I'm wrong. You're wrong, I think. From the MySQL docs: For LAST_INSERT_ID(), the most recently generated ID is maintained in the server on a per-connection basis. If two page requests are running simultaneously, they're not using the same connection. 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! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328934 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF8, Vista, SQL 2005
It might be worth looking at the connection settings in SQL studio. SQL studio by default will truncate long fields, which may be hiding row size limitations. If you bump up the field length limit in SQL studio and it still works, that would point even more strongly to JDBC. Jaime On Fri, Nov 20, 2009 at 8:37 AM, A D alandeans2...@yahoo.co.uk wrote: Its works ok using SQL managment studio. Doesnt work from eclipse RDS or CF. Its around 40 columns - none of them text or ntext. ... Selecting the 40 colums results in the same, but selecting a few columns is ok. I suspect you're hitting some sort of row length limitation in the JDBC drivers. Are you able to select an entire row from a native SQL Server client? 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! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328549 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Query Retries
A transaction that has rolled back due to a deadlock should always be retried at least once. Unless your server is chronically ill or you use massively long transactions, the chances of getting the same deadlock twice in a row are pretty small. Jaime -Original Message- From: b...@bradwood.com [mailto:b...@bradwood.com] Sent: Friday, 3 April 2009 6:06 AM To: cf-talk Subject: RE: Query Retries Just speaking for myself here-- I never retry a query. Most errors I tend to get with a database call is due to something like a column not existing or some data truncation error that is going to happen no matter how many times I try it. The only times I have ever really seen SQL Server throw an error that is recoverable is when it is trying to to connect to some remote linked server via ODBC and the connection has timed out. In those specific instances, the query always works the second time. Why don't you tell us what kind of errors you usually have thrown from the database. ~Brad Original Message Subject: Query Retries From: Byte Me byteme...@verizon.net Date: Thu, April 02, 2009 3:46 pm To: cf-talk cf-talk@houseoffusion.com Is there a rule of thumb on how many times a query should be retried? I'm using nested cftry/catch and will retry a maximum of 4 times. Each retry is delayed by a random number of milliseconds. Thanks for any insight. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321268 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: uml modelling tool
Visual Paradigm is the only one I've used where I feel like I'm drawing rather than filling out forms. It has about a million features I don't use, but I just stick to basic drawings. Jaime -Original Message- From: Richard White [mailto:rich...@j7is.co.uk] Sent: Sunday, 29 March 2009 12:26 AM To: cf-talk Subject: uml modelling tool hi Can anyone give suggestions on good UML Modelling tools for small to medium sized projects. we don't mind cost as we dont really like open source products thanks for your suggestions richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321085 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Java Training: moving from CF to Java
Answering for myself, not for Dan: 1. Java is a squillion times faster than CF (OK, it's only about 200 times faster - might as well be a squillion) 2. That means it becomes feasible to create a truly cohesive OO domain model, which can be a lifesaver for large apps. 3. And once you have that domain model in a jar file, it can go anywhere - desktop apps, backend datasource for an LDAP server, suck it into .NET, trad JEE server... Dunno about XML/XSLT for the front end, though. I reckon CF still rules there. Jaime -Original Message- From: James Holmes [mailto:james.hol...@gmail.com] Sent: Thursday, 12 March 2009 1:32 AM To: cf-talk Subject: Re: Java Training: moving from CF to Java Please forgive me the odd topic reply, but why on earth would you want to do that? mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ 2009/3/11 coldfusion.develo...@att.net: 1) We're moving our platform form CF to Java ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320421 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Java Training: moving from CF to Java
I'd want to see some pretty solid benchmarks before I believed that the Java written by CF is 200 times slower than the Java written by a random programmer. The 200 times difference comes from my own comparison of the same domain model implemented idiomatically in both ColdFusion/ColdSpring/Transfer and Java/Spring/Hibernate. Similar experiments conducted by colleagues give similar results. Mark Drew did some testing with a totally different scenario, but the results are in the same ballpark. Not sure why you'd find this surprising. Java code to solve a given problem isn't remotely similar to the bytecode that CF spits out for the same problem, unless that problem happens to be interpreting a dynamic language. The fact that they are both Java is far less significant than the fact that one is dynamic and the other static. There have been similar results from comparisons of Jruby and Java, and Groovy and Java. We're not talking about 20% or 50% performance differences, we're talking about orders of magnitude. Jaime ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320424 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: dynamic names for named locks
I do this frequently. Works well. Jaime -Original Message- From: Rick Root [mailto:rick.r...@webworksllc.com] Sent: Monday, 9 February 2009 9:51 AM To: cf-talk Subject: dynamic names for named locks Is it possible to use named locks with dynamic names? I've got a site running a single application under thousands of domains. Site information for each domain is stored in the application scope so I don't have to get it from the DB all the time. So my first lock looks like this cflock name=appInitLock1 type=exclusive timeout=30 cfif not structKeyExists(application,sites) or NOT isStruct(application.sites) or isDefined(url.reinit) or isDefined(url.init) cfset application.sites = structNew() /cfif /cfif My second piece that is locked is specifically to get or set the detail within the application.sites struct with the site specific information based on the domain name. So while many threads *MAY* execute the code, only threads making a request to the same domain would need to be protected from each other. So I was thinking about doing a named lock with a dynamic name based on the domain... ie: cflock name=appInitLock2_#replace(request.domain,.,,ALL)# type=exclusive timeout=30 Would this work and can anyone think of any reasons NOT to do this? Thanks. Rick -- Rick Root New Brian Vander Ark Album, songs in the music player and cool behind the scenes video at www.myspace.com/brianvanderark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319092 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Connection pooling - why bother?
Jochem, Sent to you off-list. Thanks for having a look. Jaime -Original Message- From: Jochem van Dieten [mailto:joch...@gmail.com] Sent: Wednesday, 4 February 2009 10:19 PM To: cf-talk Subject: Re: Connection pooling - why bother? On Tue, Feb 3, 2009 at 11:46 PM, Jaime Metcher wrote: And for the CF datasource: bean id=CFDataSourceService class=coldfusion.server.ServiceFactory factory-method=getDataSourceService/ bean id=collegeDataSource factory-bean=CFDataSourceService factory-method=getDatasource constructor-arg type=java.lang.String value=xxx/ /bean And then I go into the CF admin and turn maintain connections on or off. Could you grab the full settings from neo-datasource.xml so we can see what is configured there? Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318912 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Connection pooling - why bother?
D'oh. *And* he knows I was silly enough to set all my usernames and passwords to xxx. Wait - now *everyone* knows! Jaime pulling plug on database server in last ditch defense -Original Message- From: Brad Wood [mailto:b...@bradwood.com] Sent: Thursday, 5 February 2009 3:33 PM To: cf-talk Subject: Re: Connection pooling - why bother? Oh man, you fell for it. Now Jochem has all your datasource passwords. :) His plan for total world annihilation is one step closer now... ~Brad - Original Message - From: Jaime Metcher jaime.metc...@medeserv.com.au Sent to you off-list. Thanks for having a look. Jaime Could you grab the full settings from neo-datasource.xml so we can see what is configured there? Jochem ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318920 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Connection pooling - why bother?
Hey Cutter, in our environment we would be insane not to use connection pooling. ...unless it's actually faster to not use connection pooling. So is it? Jaime ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318725 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Connection pooling - why bother?
@Cutter: thanks for the info - that's what I would have expected, so good to know. @Jochem: The config for the Spring provider looks like this: bean id=collegeDataSource class=org.springframework.jdbc.datasource.DriverManagerDataSource property name=driverClassNamevaluenet.sourceforge.jtds.jdbc.Driver/value/prop erty property name=urlvaluejdbc:jtds:sqlserver://xxx.xxx.xxx.xxx:1433/college_test/v alue/property property name=usernamevaluexxx/value/property property name=passwordvaluexxx/value/property /bean And for the CF datasource: bean id=CFDataSourceService class=coldfusion.server.ServiceFactory factory-method=getDataSourceService/ bean id=collegeDataSource factory-bean=CFDataSourceService factory-method=getDatasource constructor-arg type=java.lang.String value=xxx/ /bean And then I go into the CF admin and turn maintain connections on or off. This is a clean CF8.01 developer install, so pool settings would be default (but not sure where to check that). Jaime -Original Message- From: Jochem van Dieten [mailto:joch...@gmail.com] Sent: Wednesday, 4 February 2009 5:00 AM To: cf-talk Subject: Re: Connection pooling - why bother? On Fri, Jan 30, 2009 at 10:12 AM, Jaime Metcher wrote: Just wondering if anyone has benchmarked CF's connection pooling. I'm getting results suggesting that turning on maintain connections does basically nothing for performance, and that using an alternative unpooled connection provider (in this case Spring's DriverManagerDataSource with jTDS) is way faster. However, testing on CF8.01 with 10 simultaneous requests, I'm getting about 50% better throughput with Spring's setup than going via CF's datasources. How did you configure both? Can you provide full JDBC URLs and pool settings? Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318793 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Load testing tools.
+1 for jMeter. It's not *too* finicky... Coupla nice features worth mentioning: 1. You can set it to either remember or forget cookies. With cookies on, you can script a whole login sequence and use that as your load test. With cookies off, you can stress your server with 50,000 live sessions in the blinking of an eye. 2. The test scripts can read parameters out of a comma-delimited file. If you point the above-mentioned login sequence at a file containing a bunch of user accounts, you can get the worst of both worlds and have 50,000 live *authenticated* sessions. Kind of fun. Your server *will* crash - but do you know when? (cue spooky music). Jaime -Original Message- From: Mark Mandel [mailto:mark.man...@gmail.com] Sent: Tuesday, 13 January 2009 7:23 AM To: cf-talk Subject: Re: Load testing tools. I got quite into jMeter, but its a bit finicky to get into. Once you understand how it works, tho', its very flexible (and free!) Mark On Tue, Jan 13, 2009 at 6:28 AM, Robert Rawlins robert.rawl...@thinkbluemedia.co.uk wrote: Afternoon guys, Any good recommendations on load testing tools? I'm just looking for something that'll make HTTP requests to a bunch of given URLS on set intervals for a period of time, monitoring response times etc. I've used a couple in the past but forget which, thought I'd get your suggestions. Obviously I'm quite partial to something free or open source ;-) Cheers, Rob ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317817 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: sharing vars between applications
Jessica, I'm making some big assumptions here. Firstly, I'm presuming you don't want to go as far as having a real distributed authentication mechanism like CAS, Kerberos or Shibboleth, and that your servers aren't authenticating against a Windows AD. Secondly, I'm presuming there's no way to get both sites running on the same CF instance, as this is far and away the easiest way to share data between CF apps - just give the two apps the same application name and that's all. Given those assumptions, the low-rent way to do this is to pass the user's authentication details through to the secure site in a form post or in a cookie when the user navigates from one site to the other. For more security, have your member site notify the secure site via a backchannel (e.g. CFHTTP) when somebody logs in. Then the secure site can compare the details coming in from the browser with the notification it previously received from your server, and reject the request if there's no match or the request is stale. Just make sure the backchannel is properly restricted, preferably to a single IP address. For even better security, you can encrypt the backchannel as well. Note that in this scenario authentication details need not mean the actual data of interest - it may be a time-limited key that you can then use to look up the data, perhaps in a shared database or by issuing a webservice call. This is a very simplified version of what things like Kerberos and Shibboleth do, and if it's all you need it will probably take weeks less to do than setting up something like Shibboleth. Jaime -Original Message- From: Jessica Kennedy [mailto:police_kidnapped_your_child...@yahoo.com] Sent: Wednesday, 31 December 2008 9:13 AM To: cf-talk Subject: sharing vars between applications Posted this last week... no response, I am still not any further... any help would be greatly appreciated! OK, I have a member area on my site that is unencrypted. there are a couple of pages that need to be encrypted as they deal with passing credit card info to our cc processor. I'm using crystaltech, so our site has a mirrored site on their shared SSL domain. I thought it would be fairly easy to pass some session vars to the mirrored site and keep the user logged in, but that is clearly not working; i am assuming because the cfid token are the same it is kicking me out of the system on the mirrored site. does anyone have suggestions for how i can accomplish this without moving my entire member area to ssl?? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317282 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Sharing Data Between Applications
Ryan, For the highest throughput, you're right of course. But even a modest hardware configuration can easily handle thousands of database queries per second. Do you really need to avoid hitting the database? Jaime -Original Message- From: Ryan J. Heldt [mailto:[EMAIL PROTECTED] Sent: Thursday, 16 October 2008 12:09 AM To: cf-talk Subject: Re: Sharing Data Between Applications Hey, thanks for responding. Creating a shared data source like you mention would work, however this this data I'm wanting to share is probably going accessed on every page request, so hitting the database on every request is something I would like to try to avoid, if possible. *Ryan J. Heldt*, Senior Web Developer Global Reach Internet Productions http://www.globalreach.com Phone: 515-296-0792, Fax: 515-296-3748 Jason Fisher wrote: To clarify a bit on Adrian's suggestion, allow the other applications to access the database of the core management application. One suggestion is to create a read-only datasource to that database and use that new DSN when accessing from the 'other' applications. Example: adminSource: datasource with full INSERT, UPDATE, DELETE access, used by core app adminReader: datasource with SELECT / proc access ONLY, used by other apps ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313956 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFC and MG2 where does validation fit in?
Richard, There was a ton of discussion on this just recently - maybe on CFCDEV - so there might be a bit of validation fatigue out there. On the upside, you should find rich pickings in the list archives. Basically both of your proposed solutions sound fine. If there was a consensus (not sure if there was), I think it would go something like: 1. Your instinct to remove the reusable validation logic from the controller is sound. 2. Putting it in the service is OK 3. Breaking it out into a separate validation object is also OK, and maybe slightly preferable. Jaime -Original Message- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Monday, 8 September 2008 9:41 PM To: CF-Talk Subject: Re: CFC and MG2 where does validation fit in? hi, does anyone have any ideas on this? thanks richard Hi we have hit a little sticking point with CFC's and model glue 2. we have an object named subject. we have created a DAO to handle single record db work and a GW to handle all multiple record db work. we also have a service cfc to handle the DAO and GW CFC's. we also have a controller for the interface which listens for events on that interface. One of the events listens for the user to edit subject details. the listener calls a function in the controller named validateAndSave which is where the problem arises: we want to validate the subject details but we dont want to validate them in this controller as there will also be other interfaces in our system where we might want to validate the same details, so this defeats the object of the cfc's. so we thought that we could add functions such as validateFirstName, validateLastName in the subject services cfc. alterntaively we can create a whole new cfc called subject validation cfc and add all validation functions in there. this way, other interfaces can also call these validation functions easily and makes logical sense. we would really appreciate your feedback on what you guys think would be the best route, and how you do this? thanks richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312210 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: TDD vs. Big Ball of Mud (was Re: fusebox vs model glue)
Well, it's kind of cool that cf-talk is having the TDD argument. Don't really mind how it turns out. Makes me feel good about being a CF programmer. @Bill, Thanks for the links. The thing that intrigues me about a lot of the TDD debate, including these articles you point to, is that most of the anti-TDD side of the argument ends up espousing pretty much all of the principles of TDD in the very act of trying to refute it. So a lot of the debate is actually about people reacting to what they see as extremism and overly prescriptive statements. IMHO, there's nothing wrong with strongly stating a principle - everyone knows that principles get modified in application - but it's true that some people get way too personal about it. The rest of the debate is along the lines of I blindly followed the letter of the TDD law while ignoring the principles and it didn't work for me - therefore TDD is flawed. The poster then lays out how they manage to apply all the principles of TDD in some other way that is superficially different from cookbook TDD. So leaving those two smokescreens aside, I have yet to see anyone even attempt to seriously contradict the principles of TDD - but I'm still looking! Jaime -Original Message- From: Bill Shelton [mailto:[EMAIL PROTECTED] Sent: Thursday, 4 September 2008 1:59 AM To: CF-Talk Subject: Re: TDD vs. Big Ball of Mud (was Re: fusebox vs model glue) I'm not going to get into the discussion of whether or not TDD is good, bad, or should be done lest you are just stupid and ugly. Anytime, or anyway, you think hard about the software you deliver, it's is going to be better than if you just bang it out with one eye open and hope no one sees it's shortcomings. TDD kind of forces you to open both eyes. TDD seems to work for some and others it does not - why is that? This one has been floating around this year, and with good cause: The Flawed Theory Behind Unit Testing - http://michaelfeathers.typepad.com/michael_feathers_blog/2008/06/the- flawed-theo.html Here's some other really interesting debates on TDD: Cedric Beust wrote the TestNG framework, with others, and though a total hard-core tester, openly criticizes TDD: http://beust.com/weblog/archives/000477.html Uncle Bob Martin has some good responses to Cedric as well as some other good points: http://butunclebob.com/ArticleS.UncleBob I hope I have few illusions about the quality of my software. Today, I truly believe my delivered software is only as good as the tests that have executed it. In other words, the number of defects is directly proportionals to how thoroughly it's been tested - either manually or through automation. best, bill It's actually switching over, to where the tests come first, that's the hard part, for me. Due to a lot of the reasons listed in that article about big balls of mud. :] I'm not entirely convinced that writing the test before writing the code is the best strategy... or at least that it's the best strategy for everyone. Development work by its nature means doing things that (we hope anyway) haven't been done before. And while you may have some ideas about how to accomplish those things ahead of time, the human brain is really just not equipped to map out large numbers of variables accurately in advance. snip ... -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 781.769.0723 http://onTap.riaforge.org/blog ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312012 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: TDD vs. Big Ball of Mud (was Re: fusebox vs model glue)
-Original Message- From: s. isaac dealey [mailto:[EMAIL PROTECTED] Sent: Tuesday, 2 September 2008 3:06 AM To: CF-Talk Subject: TDD vs. Big Ball of Mud (was Re: fusebox vs model glue) snip And so it's an assumed that the TDD advocates who talk about writing all your tests before writing your code will be overconfident about their design. snip Whoa, hold it right there. Show me the TDD advocate who promotes writing all tests before writing code and I'll personally have their card revoked! TDD means write a test, then write some code, then write another testby the time you write your last test, you've written all your code bar that last function. You will actually rewrite less of your stuff than otherwise, because writing tests first really brings a poorly factored design into the spotlight much earlier than would otherwise happen. The assertion is that if you can't write a test you don't *have* a design, or indeed a clear intention. And if your tests are hard to write, it's because you have a bad design. So given all of this, it's hard to argue that the right thing to do in this situation is to go ahead and write some code anyway. Thinking out loud in code is fine, but thinking out loud into a test case is even better. @Adam: Agreed that behaviour is a better word. I also like the last D to stand for design. Test driven design takes away some of the quality-control mindset that's introduced by the word test. Jaime ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311887 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Best method for Export to Excel...
+1 to POI. jXLS is also nice if you need templating. But +2 to SSIS (or similar). CF as a data pump just does not scale. Jaime -Original Message- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, 19 August 2008 1:56 AM To: CF-Talk Subject: RE: Best method for Export to Excel... With 20,000 records, do you actually need to create it on-demand for each user? Can you have a scheduled task rebuild the .xls file every so often? If that would work, then you could just have SSIS dump the .xls file on your web server. This would take CF completely out of the process. m!ke -Original Message- From: jonese [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2008 10:09 AM To: CF-Talk Subject: Best method for Export to Excel... Hey all, I've got lots of ideas. done this a million times. but wanted to just check in with the crowd to see if maybe I've missed something new etc. I've got about 20k records in a sql 2005 DB table which i need to dump to an excel file on demand for users. Basically inside a cfthread tag I'm grabbing the 20k records from a web service, dumping them into a table, and then need to go from that table to an excel file and email / provide a download link for the end user. Best practices? super duper suggestions? thanks in advance! jonese http://www.jonese.us http://twitter.com/jonese ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311232 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Way to View SQL Transaction history.. RE SQL Injection
There's a bunch of transaction log analysis tools out there. We use Redgate's SQL Log Rescue. On a busy site the transaction logs are voluminous and take a long time to analyze. Depending on your situation you may actually be better off analyzing the injected queries, perhaps running them on a test server. Jaime -Original Message- From: jonese [mailto:[EMAIL PROTECTED] Sent: Saturday, 9 August 2008 12:32 AM To: CF-Talk Subject: Way to View SQL Transaction history.. RE SQL Injection Hey all, So far we've been good but i'm helping some other companies who have experience successful SQL injection attacks. Is there any way to see the log files of every transaction for a DB so we can see which queries failed and which ones were a success? jonese http://www.jonese.us http://twitter.com/jonese ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310778 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Database Sessions
Rob, With pooled connections you can force a request to stay on one connection by wrapping your queries in cftransaction. Otherwise, CF can and will swap connections on you right in the middle of processing a request, and your temp tables will go away. Jaime -Original Message- From: Robert Rawlins [mailto:[EMAIL PROTECTED] Sent: Monday, 11 August 2008 9:01 PM To: CF-Talk Subject: RE: Database Sessions Thanks James, that makes fair sense, I'll check my connection pooling setting and have a play around, I'll let you know how I get on. Rob -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: 11 August 2008 11:55 To: CF-Talk Subject: Re: Database Sessions CF does conenctions two ways: 1) CF uses pooled connections if you have maintain connections checked for the datasource, This means a connection will stay open for quite some time, across multiple web requests. 2) If you don't maintain connections, CF opens a connection at the first cfquery tag and keeps it open until the request ends, so that all the queries in a single request use the same connection. So, at the very least, you should be able to use your temporary table for everything in the page. On Mon, Aug 11, 2008 at 5:42 PM, Robert Rawlins [EMAIL PROTECTED] wrote: Morning guys, Does anyone know how ColdFusion handles opening and closing a database session? Is it for every cfquery tag set? Or for every cftransaction tag set? Or is it less predictable than that? The reason I ask is that I've been looking at using temporary tables in a procedure, as I understand it, SQL Server creates these in a session local variable. I need to know how long the temporary table will be accessible to me in this session scope, can it spread across multiple queries? Or just the single one?. -- ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310780 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: HELP! SQL Injection Attack!
If you block APNIC's range you're blocking the whole of the Asia/Pacific region. APNIC is not an ISP or large company, it's actually the regional authority for internet addresses, so it owns *all* addresses in Asia/Pacific - just like ARIN owns all addresses in North America and RIPE owns all addresses in Europe. Your lookup is resolving back to APNIC because you're using your regional authority (in your case ARIN) and it will only resolve addresses in its own range. For all other addresses it will just refer you to the appropriate regional authority. If you then use *that* authority's whois, you'll get the real story. Oh, and if you try to automate this to look up lots of addresses, you're breaking the terms of use of the whois server. I'd imagine they'd block you, but I've never tried it. Jaime -Original Message- From: Brian Peddle [mailto:[EMAIL PROTECTED] Sent: Saturday, 9 August 2008 4:28 AM To: CF-Talk Subject: Re: HELP! SQL Injection Attack! Just curious as I have no seen this on an old asp site months ago and now on CF. Every IP lookup I do goes back to OrgName:Asia Pacific Network Information Centre OrgID: APNIC http://ws.arin.net/whois/?queryinput=O%20%21%20APNIC Address:PO Box 2131 City: Milton StateProv: QLD PostalCode: 4064 Country:AU For ASP I ended up blocking full ranges of ips which helped the issue quicker. Paul Ihrig wrote: what are you seeing if you limit email to unique IP's? ours is way down if we do that. we are just sending unique ip's to one of our GREAT it guys to insert into ban list in firewall. should figure out how to auto add remove ip's On Fri, Aug 8, 2008 at 11:03 AM, Les Mizzell [EMAIL PROTECTED] wrote: http://www.actcfug.com/files/_SQLPrev.zip After putting this on a number of sites in just the last two hours, I am completely blown away by the number of attacks I'm seeing! Over 2500 in less than 2 hours on just 3 sites. My poor mail server can't take all the extra incoming mail!!! I'm going to have to mod the code to remove the warning email that goes out, and have it create a log file or something instead! I have to think to myself - is this payback for baiting all those Nigerian scammers last week? Oh jezz This is unbelievable! Les ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310783 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Am I a thread or not ?
Lifted from Transfer: cfset var group = getThread().currentThread().getThreadGroup().getName() / !--- if we're in onAppEnd, or onSessionEnd, ignore --- cfif group eq scheduler cfreturn / !--- if we're inside a cfthread, run syncronously --- cfelseif group eq cfthread cfelse /cfif Thanks, Mark! Jaime -Original Message- From: Tom Chiverton [mailto:[EMAIL PROTECTED] Sent: Monday, 14 July 2008 10:22 PM To: CF-Talk Subject: Am I a thread or not ? How can I tell if the CF code being run is inside a CFTHREAD block or not ? The reason is that scopes like CGI are not available inside such a block (i.e. all the values are empty), and I need to turn off some security settings in my code if so. -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309069 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Agile coldfusion
Just to add to Brian's comments: it can also be useful to just lay down some integration tests using Selenium or the like prior to a TDD refactoring effort. You'll be going through and reviewing the existing functionality anyway, so you might as well record how it behaves. Jaime -Original Message- From: Neb o'Gwbl [mailto:[EMAIL PROTECTED] Sent: Sunday, 13 July 2008 6:44 AM To: CF-Talk Subject: Agile coldfusion Hello all, I've just started work at a company that is in the middle of moving to an agile development process who use coldfusion, javascript and pl/sql. I have a couple of questions where you hopefully will be able to point me in the right direction ... Given that most agile texts are geared towards object oriented development and that there are unit testing frameworks for coldfusion and pl/sql, how do developers approach agile techniques in an environment with mostly procedural code? Where are there examples of realistic unit tests and refactoring in coldfusion (or pl/sql)? Does anyone really do this? 'Toad' doesn't have an 'extract method' function ... How do you, at a code level, seperate ui from domain logic in an environment like this? How does domain driven design fit in here? Thanks for taking the time to read this and forgive me if I've asked in the wrong list, Neb. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309068 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: When is is time to upgrade to Enterprise Edition?
Have you tried making the perm size bigger again? With lots of apps, especially if any of them are using frameworks, you'll be using the perm gen pretty heavily. If your app is freezing with plenty of headroom left in the heap, perm gen is certainly a suspect. Jaime -Original Message- From: Michael Patti [mailto:[EMAIL PROTECTED] Sent: Friday, 30 May 2008 6:16 AM To: CF-Talk Subject: Re: When is is time to upgrade to Enterprise Edition? Hi Mark, To clarify about the JRUN memory usage: I'm looking in the Task Manager under the Processes tab. When I sort on the 'Mem Usage' column, jrun.exe is almost always at the top of the list, with at least 350 MB of memory being used at any time. I'm also running FusionReactor to monitor memory usage, but that tool doesn't include the permanent heap in it's stats. I read some postings that suggested looking in the task manager, since that *does* include JVM memory from the permanent heap; and that's where I discovered the memory leak. On most days, task manager will show the jrun.exe memory starting off at around 200 MB right after a re-start of CF, but the levels rise steadily throughout the day, until it reaches 500 MB, and then I script I have in place restarts CF (when things reach the 500 MB mark, which is when pages start to freeze up). Right now, CF is restarting on average every 6 hours, which is absolutely horrendous. I know some of this is related to the persistent CFCs, but I'm done my best to go back into the applications I've built and make sure that variables used/returned by the CFCs are within the 'request' scope, rather than the 'variables' scope. When I run SQL profiler against my DB server, I'm not seeing any patterns of the same query re-running endlessly, so I don't think that's an issue. But, this is the point at which my knowledge of Java's memory management breaks down. What I probably need to do is set up a jave profiler like JProbe to see which threads are eating up memory, but I haven't had a chance to do this yet. If anyone out there is a JVM expert looking for a few hours work, let me know :-) Thanks, Michael Michael, These args are pretty close to what I use on several CF7 standard servers. I don't see anything that jumps out at me. I wonder where you got the idea that Jrun is only using 350 megs of memory however. The args below should put it close to 1200 megs (1.2 gigs). What are you using to make that determination? If you are using the task manager make sure you can see the VM size column. -Mark Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com Thanks Wil, I have actually been doing a fair amount of tuning the JVM. I'll definitely read your article, but in the meanwhile, here's my jvm.config file. Let me know if it seems totally wrong: # # VM configuration # # Where to find JVM, if {java.home}/jre exists then that JVM is used # if not then it must be the path to the JRE itself java.home=C:/j2sdk1.4.2_16/jre # # If no java.home is specified a VM is located by looking in these places in this # order: # # 1) bin directory for java.dll (windows) or lib/ARCH/libjava.so (unix) # 2) ../jre # 3) registry (windows only) # 4) JAVA_HOME env var plus jre (ie $JAVA_HOME/jre) # # Arguments to VM java.args=-server -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Xms1024m -Xmx1024m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=128m -XX:PermSize=64m -XX:NewSize=48m -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -XX:+UseConcMarkSweepGC -Dcoldfusion.classPath={application.home}/../lib/updates,{applica tion.home}/ ../lib,{application.home}/../gateway/lib/,{application.home}/../w wwroot/WEB- INF/cfform/jars,c:\\CfusionMX7\\classpath # # commas will be converted to platform specific separator and the result will be passed # as -Djava.ext.dirs= to the VM java.ext.dirs={jre.home}/lib/ext # # where to find shared libraries java.library.path={application.home}/../lib,{application.home}/.. /jintegra/b in,{application.home}/../jintegra/bin/international system.path.first=false # # set the current working directory - useful for Windows to control # the default search path used when loading DLLs since it comes # before system directory, windows directory and PATH java.user.dir={application.home}/../../lib # JVM classpath java.class.path={application.home}/servers/lib,{application.home} /../lib/mac romedia_drivers.jar,{application.home}/lib/cfmx_mbean.jar,{applic ation.home} /lib ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306301 Subscription:
RE: cfcs good practise
Richard, If your project.add() method is adding a test - yeah, that sounds right. Although I'd call it addTest(). And then internally the project would delegate to a DAO to do the add. So project.addTest() would call TestDAO.add(). project.addTest() would take a parameter of type Test - i.e. you'd first create a Test object, then pass it to addTest(). It's also often convient to have a project.createTest(), which takes as parameters all the basic properties required to create a new Test object and returns the new Test. So you might say: project.addTest(project.createTest(param1, param2)); OK, some details: 1. In this example TestDAO is acting as a collection object, albeit specifically a database-backed collection. You can imagine you could do a similar thing with an in-memory collection like a struct. The natural progression is to make in-memory collections act just like database-backed collections so you can switch between the two, but in practice there are some ColdFusion-specific issues with doing this. 2. project.createTest() is a factory method, which makes Project a factory for Tests. This makes sense if all tests have to live inside projects. If tests can stand alone, you need a different factory, maybe a dedicated factory object that encapsulates the creation logic for your top-level domain objects. You'll probably need this for creating Project instances anyway. If this same top-level factory also has a DAO that lets it manipulate existing Projects, it's starting to look like a service object. 3. Where do all these DAOs come from? You can have your top-level factory know how to create them, and then the creation logic for your domain objects would make sure that each domain object has it's DAO. So you'd have something like (in pseudocode): component myAppFactory: method createTestDAO() return new TestDAO(DSN = my_datasource) method createProject (name_param, description_param) return new Project( name = name_param, description = description_param, dao = createTestDAO() ) Hope this helps Jaime Metcher -Original Message- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Monday, 26 May 2008 8:58 PM To: CF-Talk Subject: Re: cfcs good practise Thanks for your reply Jaime so am i correct in understanding that i should have a project class with methods such as add, remove, find etc... and properties such as name etc... and a test class with much the same methods and attributes, and a materials class, again with much the same attributes then in order to create a collection of the objects so i can manipulate and query the collections i should use dao (and gateways) is this what you mean? apologies, i understand the basic principles of OO but this is the first time i am putting it into practise!!! thanks again Start with just a pure object model. Later you can pick it apart and patch up the bits that don't map real well to CF. So, Projects have Tests. To me, that says that you have a Project class with an instance variable Tests. Tests is a collection that has methods like add, remove, find etc. The elements of the Tests collection are instances of the Test class. Instances of Test *may* have an instance variable Project, which points to the parent project - or may not. The benefit is flexibility in navigating between objects, the downside is another reference you have to manage. I tend to add these back pointers when and if I need them. Ditto for the tests-materials relationship. OK, so how do you do this in CF? The biggest mismatches are: 1) no built-in collection classes 2) the need to avoid instantiating lots of objects The usual workaround is to build the collection object as a (or with a) DAO (see also Gateway) and return a CF query from any method that might return more than one item. Within the DAO you can go crazy with naked SQL, or abstract the SQL with a framework, or both. Just keeping this brief for the moment, but ask for more detail and you shall receive. Jaime Metcher ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306045 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfcs good practise
Start with just a pure object model. Later you can pick it apart and patch up the bits that don't map real well to CF. So, Projects have Tests. To me, that says that you have a Project class with an instance variable Tests. Tests is a collection that has methods like add, remove, find etc. The elements of the Tests collection are instances of the Test class. Instances of Test *may* have an instance variable Project, which points to the parent project - or may not. The benefit is flexibility in navigating between objects, the downside is another reference you have to manage. I tend to add these back pointers when and if I need them. Ditto for the tests-materials relationship. OK, so how do you do this in CF? The biggest mismatches are: 1) no built-in collection classes 2) the need to avoid instantiating lots of objects The usual workaround is to build the collection object as a (or with a) DAO (see also Gateway) and return a CF query from any method that might return more than one item. Within the DAO you can go crazy with naked SQL, or abstract the SQL with a framework, or both. Just keeping this brief for the moment, but ask for more detail and you shall receive. Jaime Metcher -Original Message- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Sunday, 25 May 2008 10:29 PM To: CF-Talk Subject: cfcs good practise hi just wondering what you guys think about the structure of the following cfc scenario, i am having difficulties picturing how to best do it i have 3 core components to a system materials, projects, and tests they are relating as follows: each project contains various tests, and each test analyzes various materials. the material can also be part of one or many projects: for example they could have 1000 materials, 5 projects, and each project has one or more tests analysing these materials in different ways - a test could also be a part of one or more projects in the database i have 5 tables to represent this: projects, tests, and materials hold their individual information, then they are linked by 2 tables: projecttests (include primary keys from these tables) testmaterials (include primary keys from these tables) this is working fine but when i try to think of this in terms of cfc's then i get a bit lost, as i am new to working with cfc's so would appreciate any advice on what you guys would do. i am thinking there would be a cfc called project, one called test, and one called materials. but then what would i call in order to get the testmaterials for a specific test etc... i know i can normally query the database table to get that information but i am wanting to get to grips with how to best use the cfc's and wonder if you guys have any pointers also, if i wanted to get information about multiple tests, i.e. their test locations, then would i need to create a collection of cfc objects in order to store this data i know this is a lengthy question but i feel if i can get my head around these concepts then i would understand cfc's alot more thanks again for your help richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306029 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: CF and SQL Server temporary tables
It's entirely possible for a CF page to change connections in the middle of processing a request, and therefore lose sight of the temp table. It's also possible for the new connection to be one that was previously used by another invocation of the same page, producing the problem that James mentions. You can avoid both of these problems by wrapping the relevant code in a cftransaction - the transaction binds the connection to the CF thread - but, like all locking, you have to consider the impact on throughput. Jaime Metcher -Original Message- From: James Smith [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 April 2008 10:38 PM To: CF-Talk Subject: Re: CF and SQL Server temporary tables If I remember correctly if you have CF maintaining connections your temp table will hang around almost indefinitely, best practice would be to DROP it once you are done with it. Also worth noting that if the page that creates the table can be called multiple times simultaneously (by different users of the system for example) then the second request will fail and error on you because the table has already been created. If you need a truly temporary table you could lock the database (to prevent other requests getting in the way) create the table, do what you need it for, then drop the table and unlock the database. If the table will hold data needed by multiple requests I would look at some way of creating a permanent table and managing the data across requests. -- Jay On Thu, Apr 17, 2008 at 1:13 PM, Rick Root [EMAIL PROTECTED] wrote: so I have a question about temporary tables in SQL Server 2005. From the SQL Server documentation for CREATE TABLE: You can create local and global temporary tables. Local temporary tables are visible only in the current session, and global temporary tables are visible to all sessions. Temporary tables cannot be partitioned. Prefix local temporary table names with single number sign (#*table_name*), and prefix global temporary table names with a double number sign (##* table_name*). What exactly does current session mean as it applies to a Coldfusion request? The life of the request? the life of the transaction, if any? The life of the executing query? Or, since CF maintains the database connection between requests, and pools connections, how does that affect things? I'm hoping that each cf request is a separate session as far as SQL Server is concerned. Thanks! Rick -- Rick Root New Brian Vander Ark Album, songs in the music player and cool behind the scenes video at www.myspace.com/brianvanderark ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303698 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Determining The Server's IP
This gets the hostname: cfset txtLocalHostname = CreateObject(java, java.net.InetAddress).getLocalHost().getHostName() IP address would be something similar. Jaime Metcher -Original Message- From: Sonny Savage [mailto:[EMAIL PROTECTED] Sent: Thursday, 27 March 2008 5:17 AM To: CF-Talk Subject: Determining The Server's IP I was wondering if there are some values I can look at that reliably hold the server's IP address. The CGI variables seem to show the same thing as what's in the address bar. Thanks! -- Edward A Savage Jr - Sonny Senior Software Engineer Creditdiscovery, LLC I was gratified to be able to answer promptly. I said I don't know. ~ Mark Twain ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302134 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: What are the Necessary Code Changes for Migrating from 6.1 to 8?
-Original Message- From: Russ [mailto:[EMAIL PROTECTED] Sent: Tuesday, 11 March 2008 2:05 PM To: CF-Talk Subject: RE: What are the Necessary Code Changes for Migrating from 6.1 to 8? Automated testing isn't always possible, especially when you are dealing with enterprise applications with millions of lines of code. snip If you do any testing at all, record the tests. Then you have automated tests. You can't, for example, expect a company like Myspace to thoroughly test all their code. Or even Google for that matter. Most of Google's services are in perpetual beta, because they need people to test their product. Are you saying Google doesn't use automated tests? Jaime Metcher ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300923 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Find/Replace for Eclipse
Folder: Click on the folder you want in the Navigator view, then choose Selected Resources in the search dialog. Site: Ditto, but start at the site root Jaime -Original Message- From: j s [mailto:[EMAIL PROTECTED] Sent: Wednesday, 5 March 2008 1:11 PM To: CF-Talk Subject: Find/Replace for Eclipse Does a plugin exist for Find/Replace that is as good as the one for Dreamweaver? I like the option of searching the entire site or folder. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300480 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CFC Naming Convention Question
Depends on the kinds of rules. I often end up with a strategy object e.g. PermissionsStrategy or PricingStrategy. Jaime -Original Message- From: Tom Chiverton [mailto:[EMAIL PROTECTED] Sent: Thursday, 21 February 2008 2:01 AM To: CF-Talk Subject: Re: CFC Naming Convention Question On Wednesday 20 Feb 2008, Dan Skaggs wrote: objectNameBR.cfc Business Rules 'service' (or 'manager' if you prefer). -- Tom Chiverton Helping to assertively repurpose error-free schemas on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299529 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Reading Excel..
Brian, I would also recommend POI with Ben Nadel's POIUtility, but if you want to stick with a DSN, the following includes a way to unlock the datasource: http://cfregex.com/cfcomet/Excel/index.cfm?ArticleID=0239B2E5-5FED-11D3-B3E9 004033E03EF9 No idea if it still works in CFMX 6/7/8. Jaime Metcher -Original Message- From: Brian Dumbledore [mailto:[EMAIL PROTECTED] Sent: Thursday, 14 February 2008 2:05 AM To: CF-Talk Subject: Reading Excel.. I made the subject look easy so I can have more viewers ;) But here is my problem.. After having trouble with working cfx_Excel2Query ( I finally reverted to it in the end and got it working), I thought why not do this: 1) Create a odbc dsn to a excel file 2) Create a cf dsn to this odbc dsn 3) User uploads his file, I copy it as the file to which the dsn si specified. 4) I query the file using [sheet$1] as the table, and so on. This method works fine, however, sometimes (most of the times), it appears the file being used as the dsn gets 'locked'. I cann't delete, rename etc, 'next' upload of file fails to overwrite this file because it is locked. Basically this method is too inconsistent. My question is, is there anything I need to do to make sure the file is 'released' after the query has run? If this one thing is solved, I no longer have to use third party solutions, I can just create a dsn to the file and keep overwriting the file with the new file whenever. Any suggestions? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298945 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Cannot create a new thread because the task queue has reached it maximum limit
FWIW, I have seen this error on a stressed CF7 box undergoing GC thrashing, where it basically meant the server was totally resource starved and about to die. I have a vague recollection that the queue in question is not the list of jrpp worker threads but rather the queue of things waiting to be assigned to a worker thread. Obviously CF8 changes the game, but I presume you've ruled out memory issues, infinite loops, pathological GCs etc? Jaime Metcher -Original Message- From: Mark Mandel [mailto:[EMAIL PROTECTED] Sent: Thursday, 14 February 2008 3:28 PM To: CF-Talk Subject: Cannot create a new thread because the task queue has reached it maximum limit Hey all, We keep getting this error on our server: Cannot create a new thread because the task queue has reached it maximum limit Where we are attempting to use cfthread for some code (it's actually Transfer code). The error occurs on the block: cffunction name=run hint=Runs the aspect of clearing out discard queues access=public returntype=void output=false !--- if we're inside a cfthread, run syncronously --- cfif getThread().currentThread().getThreadGroup().getName() eq cfthread cfscript super.run(); /cfscript cfelse cfthread action=run name=transfer.DiscardQueueHandler_#getRequestFacade().getThreadID()# cfscript super.run(); /cfscript /cfthread /cfif /cffunction On the link starting with cfthread Has anyone come across this before? or have any idea what it is caused by? Mark -- ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298964 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Combine Documents and Databse Records in a Verity Index
Peter, It's certainly possible. The key is to use multiple CFINDEX tags to build the collection. When you execute a search, you then need to do some sort of parsing on the result query to determine how to build the link to the appropriate resource. With the use of the custom fields available in Verity, we've successfully integrated half-a-dozen different database tables and 2-3 file system trees into the one collection. For example, we might have a website with a calendar system, a library of FAQs and a document library. Depending on the contents of the search query, a line in the list of search hits might link to a calendar event, a particular FAQ, a document or just a plain old web page. Jaime Metcher -Original Message- From: Peter Shaw [mailto:[EMAIL PROTECTED] Sent: Monday, 26 November 2007 9:18 PM To: CF-Talk Subject: Combine Documents and Databse Records in a Verity Index We're exploring Verity to use on a new project. Our user profiles are made up of several database fields and an optional uploaded document (word / pdf). Is it possible to combine both file and database data in a Verity index so that we can search both with a single CF_Search? Ideally we only want to get one ranked result set back to work with. Our work around would be to create two collections, one for files, one for database records and merge the two results sets - but this seems an inferior path. Peter ~| 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:293798 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SOLVED: Race Condition and Locking?
Will, It's still going to bite you in the butt. You still have a race condition, and lots of people share IPs. From what you've said, I'd say take a good hard look inside the AuthorizeNet component. Or lock the bejeesus out of it - but if you just do that it's going to be hard to know whether you've killed the problem or not, until it happens again. Jaime Metcher -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Thursday, 22 November 2007 3:57 PM To: CF-Talk Subject: SOLVED: Race Condition and Locking? After consultation with the disruptor, I came to the conclusion that using a timestamp wasn't a good idea for a customer ID. :) It finally bit me in the butt after 860 orders. Now I use a timestamp + IP add. Thanks, Will ~| 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:293682 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Converting simple Java code to CF
That error is a totally non-specific object instantiation error. That third sentence (...must not be an interface...) is just a stab in the dark by some engineer trying to be helpful. Look down the full stack trace to find out what the real error is. Jaime Metcher That looks very promising, it coming up with a different error now: Object Instantiation Exception. An exception occurred when instantiating a Java object. The class must not be an interface or an abstract class. Error: ''. It does it when it reaches this bit of code cfset pres2 = CreateObject(java, com.aspose.slides.Presentation).init(fis.init(c:\test\destinati on.ppt)) ~| 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:293550 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: CF Coding Standards
Surely the Smith project has one? For that matter, cfeclipse itself is obviously doing some sort of parsing, no? Jaime -Original Message- From: Mark Mandel [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 October 2007 9:04 AM To: CF-Talk Subject: Re: CF Coding Standards Gaulin, To do something like that, you would need a decent Open Source CFML parser. I started working on one a while back, and got pretty far into it, but I got sidetracked by other OSS commitments. I should return to it at some point, and finish it off. Mark On 10/10/07, Gaulin, Mark [EMAIL PROTECTED] wrote: Actually, all this talk about cf code formatting styles is making me wish there was a way to reformat code in cfeclipse (to my liking), but I'd always be wary about the formatter changing something important (and subtle) in the html. Still, it might make an interesting addition to cfeclipse. What I would find more interesting is something approaching a coding style validator for important things, like varing local variables in functions and always scoping variables properly (to the degree that I would want), checking for cfparam tags for url, form, and attribute variables, etc. Does anything like that already exist for Eclipse, or in CFEclipse? Thanks Mark From: Matt Robertson [mailto:[EMAIL PROTECTED] Sent: Tue 10/9/2007 3:41 PM To: CF-Talk Subject: Re: CF Coding Standards or don't do tabs and use spaces exclusively. Tell HomeSite/CF Studio to convert tabs to spaces so you don't have to actually use the spacebar. I went that route after I wound up having to edit non-CF code in HS and weird things started happening to the other code, whose (primitive) native editor used spaces only, and whose interpreter didn't figure on seeing tabs in the code like that. Not sure if CF cares much over the extra char count. Must be a slow day if we are all waxing eloquent on this utterly worthless topic :D Oh and another variation on the tag thing: cfmail to=#MailList.EmailAddr# from=#MailList.EmailFrom# subject=#MailList.EmailSubject# server=#MailList.EmailServer# type=HTML I put the closing bracket on the same line as the last attribute. woo hoo. -- [EMAIL PROTECTED] Janitor, The Robertson Team mysecretbase.com ~| 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:290709 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Rollback db changes in CFCUnit/CFUnit tests
Janet, +1 to dbunit. You also have the option of wrapping each unit test in a transaction and then rolling it back at the end. Jaime Metcher -Original Message- From: Janet MacKay [mailto:[EMAIL PROTECTED] Sent: Friday, 5 October 2007 3:28 AM To: CF-Talk Subject: SOT: Rollback db changes in CFCUnit/CFUnit tests Does anyone know of an article(s) explaining how to work rollbacks into unit testing? I want to test a series of DAO's, but am not sure how to incorporate this into my tests. Janet ~| 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:290488 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: CF8 configuration issues in a VM environment
Hope I'm not just spreading FUD, but I suspect that's not possible. On W2K3, the only way to get a mapped drive letter is to run CF under a login session - i.e., login to the server, map the drive, then start CF as a console app. I'd presume XP would be the same. Jaime Metcher -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Tuesday, 25 September 2007 12:01 AM To: CF-Talk Subject: Re: CF8 configuration issues in a VM environment One wrinkle: when I added an additional custom tags directory mapping, the CF administrator didn't like using the mapped drive (i.e. Z:\customtags\), but it seems to work well with a SMB share (i.e. \\osx-machine\user\sites\customtags\). Letter drive mappings are user account specific. Did you define that Z drive under the account that the CF service runs under? ~| 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:289377 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: #$^% Forms!
LOL. I think the general strategy (which several other replies have alluded to) is: 1. Hire a munchkin to code your boring forms 2. Spend all your new free time becoming the nifty-cool guy in the dark room After an interval that's both long (what a huge undertaking!) and short (but what a guru!): 3. Earn the munchkin's pathetic gratitude by freeing them from their drudgery Course you could just use someone else's system, but where's the glory in that :) Jaime Metcher -Original Message- From: Michael David [mailto:[EMAIL PROTECTED] Sent: Tuesday, 25 September 2007 5:47 AM To: CF-Talk Subject: #$^% Forms! Ok, I admit it; I hate developing forms! There's not one part of the process that I find even remotely interesting, enlightening, or fulfilling. Forms suck. Now that I got that off of my chest, does anyone know of some nifty-cool program/guy in a dark room halfway around the world/magic spell that would help with most of the more mundane aspects of the process. Did I mention that I hate developing forms?!?! -- Cheers! Michael David ~| 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:289379 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Odd behavior when using cfform inside a CFC
Not sure how much effort you want to go to, but if you want to have it both ways you could have a per-request object which has composed into it the session-scope object. Did you do that dump of the variables scope? I'd be interested to see how CFGRID is doing this. I'd have a look myself, but my copy of CF8 is still in a box on my desk. Jaime Metcher -Original Message- From: Charles Sheehan-Miles [mailto:[EMAIL PROTECTED] Sent: Tuesday, 11 September 2007 7:14 PM To: CF-Talk Subject: Re: Odd behavior when using cfform inside a CFC Well, the verdict here: 1) If I create the object every request, the javascript appears and the cfform works fine 2) If I CFINCLUDE a CFM template, the javascript appears and the cffform works fine 3) If it is invoked from a persistent object (in either application or session scope) it shows up the first time I access the page, but subsequent access fails to send the page with the needed javascript Hmm. I want the cfgrid considerably less than I want to do either of the first two, because both of the first two options introduce the problems I was trying to avoid by having the thing in memory in the first place. Ah, well. -- Charles Sheehan-Miles | http://www.sheehanmiles.com Author of Republic: A Novel of America's Future Sparse, clean narrative... Pay attention to this new book... -- Pulitzer Prize winning journalist John Hanchette, Niagara Falls Reporter This novel ...may be prophetic...It will disturb you...It should. -- DailyKos On Sep 10, 2007, at 11:53 AM, Brian Kotek wrote: You could try dumping the variables scope of the CFC to see if cfform is putting something in there. But whatever the problem is, I'm pretty sure it must be related to the fact that the CFC is being stored in a shared scope. Does switching to a per-request CFC allow the JavaScript to work correctly? While I don't recommend doing it in general, you might also see if doing a cfinclude of a template that contains the cfform tags makes a difference. On 9/10/07, Jaime Metcher [EMAIL PROTECTED] wrote: Well, this really is just a wild guess, but maybe it's worth trying re-instantiating the CFC on every request. CFFORM could be stashing some state in that CFC. Jaime Metcher -Original Message- From: Charles Sheehan-Miles [mailto:[EMAIL PROTECTED] Sent: Monday, 10 September 2007 6:58 PM To: CF-Talk Subject: Re: Odd behavior when using cfform inside a CFC Jaime interesting question, and yes, the CFC in this case is stored in the session 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:288207 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Odd database behavior: duplicate key error
Dave, According to livedocs cftransaction by default uses the default isolation level of the database - which in most installations will be either read committed or repeatable read. What you say is true if one sets the isolation level explicitly to serializable. However (I'm sure you know this but it's worth saying), it's hard to overstate the crippling effect on database throughput that serializable transactions can have. I would recommend that even for lightly loaded sites it's worth the extra effort to put a locking strategy in place using cflock, and save serializable transactions for stop the world database maintenance tasks. Jaime Metcher -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Wednesday, 12 September 2007 4:32 AM To: CF-Talk Subject: RE: Odd database behavior: duplicate key error This is not correct at all, according to my understanding. CFTRANSACTION creates a database transaction, which uses either locking or MVCC (depending on the specifics of the database used) to prevent concurrent access to database objects that would cause data integrity problems. It doesn't just affect the current thread; it affects any attempt to simultaneously manipulate the same database objects - not just from within other threads in CF, but even from other database clients. The default isolation level for CFTRANSACTION is SERIALIZABLE, if I recall correctly. http://en.wikipedia.org/wiki/Isolation_(computer_science) ~| 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:288209 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Odd behavior when using cfform inside a CFC
Well, this really is just a wild guess, but maybe it's worth trying re-instantiating the CFC on every request. CFFORM could be stashing some state in that CFC. Jaime Metcher -Original Message- From: Charles Sheehan-Miles [mailto:[EMAIL PROTECTED] Sent: Monday, 10 September 2007 6:58 PM To: CF-Talk Subject: Re: Odd behavior when using cfform inside a CFC Jaime interesting question, and yes, the CFC in this case is stored in the session scope. ~| 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:288077 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Odd behavior when using cfform inside a CFC
Charles, Nothing obvious, but a couple of questions come to mind: 1. Is it just the javascript that's missing i.e. the other content is OK? 2. Is the CFC instance cached e.g. in session or application scope? Also, I know that was only pseudocode, but given that var is a reserved word it looks a bit dodgy. You'd want to at least var scope that result variable, e.g. cfset var result = cfsavecontent variable=result etc. @Andrew: You're implying that the V layer in MVC not be implemented using CFCs, right? Any particular reason why? Jaime Metcher -Original Message- From: Charles Sheehan-Miles [mailto:[EMAIL PROTECTED] Sent: Monday, 10 September 2007 12:32 PM To: CF-Talk Subject: Re: Odd behavior when using cfform inside a CFC It's CF8. On Sep 9, 2007, at 10:19 PM, Andrew Scott wrote: What version of Coldfusion? Personally I would be looking at an MVC solution and not be placing Form output into CFC's Andrew Scott Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 8676 4223 Mobile: 0404 998 273 -Original Message- From: Charles Sheehan-Miles [mailto:[EMAIL PROTECTED] Sent: Monday, 10 September 2007 12:07 PM To: CF-Talk Subject: Odd behavior when using cfform inside a CFC Hi all, Here's my situation, and its a bit odd. I've reproduced it under a couple of different contexts. I have a number of CFC methods which handle page processing for my application. It typically looks something like this: cffunction name=blah cfargument blah cfset var=result cfsavecontent variable=result page content executes here: example: /cfsavecontent cfreturn result Here's the issue. This works just fine, but I'm starting to play with cf8 cfforms, particularly cfgrid. What's interesting is that the first time I call one of these pages, the grid works fine. On subsequent page loads, I don't get any of the coldfusion javascript, so I get no grid. Looking at the page source at the browser, the scripts don't even show up. It I have the ajax calls in a vanilla cfm template, they load every time. But when loaded from a cfc -- the scripts only appear the first time. Anyone run into anything like this? -- Charles Sheehan-Miles | http://www.sheehanmiles.com Author of Republic: A Novel of America's Future .Sparse, clean narrative... Pay attention to this new book... -- Pulitzer Prize winning journalist John Hanchette, Niagara Falls Reporter This novel ...may be prophetic...It will disturb you...It should. -- DailyKos ~| 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:288070 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Implications of no JVM loaded
+1. I'd have a close look at that SDC, it may be more far-reaching than you think. I've seen standard environments that exclude Flash, Java, ActiveX controls, Javascript (!), cookies, and external links to all but an approved list of sites. Jaime Metcher -Original Message- From: Cutter (CFRelated) [mailto:[EMAIL PROTECTED] Sent: Thursday, 6 September 2007 4:07 AM To: CF-Talk Subject: Re: Implications of no JVM loaded I doubt it's a lack of a JVM. More likely it's a lack of a Flash Player... Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com Howell, Craig H Civ WRALC/ITMS wrote: This is a simple question that may have far reaching implications for me. The DoD pushes Standard Desktop Configurations, SDC, to all client machines so all the machines look alike. The newest SDC that will be released soon will not have the JVM loaded and will have IE 7.. I was wondering what the implications will be for our apps. I know the CF code is converted to HTML before it reaches the desktop, but are there other issues we need to be concerned with, especially in areas like Flash Forms? We have discovered that our Flash Forms don't appear to be working in IE 7, but is it IE or the lack of a JVM? Any inputs/responses would be greatly appreciated. ~| 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:287880 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Clear Object Variables
It sounds like the cache is in a static variable in the Java class, hence in the CF classloader. However, a quick peruse of the documentation for java.awt.Toolkit reveals that getImage will cache images indefinitely, but the underlying createImage will not: Since the mechanism required to facilitate this sharing of Image objects may continue to hold onto images that are no longer of use for an indefinite period of time, developers are encouraged to implement their own caching of images by using the createImage variant wherever available. http://java.sun.com/j2se/1.4.2/docs/api/ http://www.google.com.au/search?hl=enq=java.awt.toolkit+%22image+cache%22b tnG=Searchmeta= Jaime Metcher -Original Message- From: Robert Harrison [mailto:[EMAIL PROTECTED] Sent: Thursday, 6 September 2007 4:48 AM To: CF-Talk Subject: RE: Clear Object Variables Did you try my suggestion to re-run the constructor? Yes. That did not clear the cached data. I tried to init the entire structure but I don't really know the actual name of the img object CF is creating. I'm naming it img, but CF is probably appending some longer name that has img as part of it. Wherever these are being cached they not in any of the CF variables I can find... although strangely enough they are clearing at the purge interval set in the CF administrator. Robert B. Harrison Director of Interactive services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 T : 631.231.6600 Ext. 119 F : 631.434.7022 www.austin-williams.com Great advertising can't be either/or... It must be . -Original Message- From: Brian Kotek [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 05, 2007 2:10 PM To: CF-Talk Subject: Re: Clear Object Variables Did you try my suggestion to re-run the constructor? On 9/5/07, Robert Harrison [EMAIL PROTECTED] wrote: The code below is caching the results for each file. They stay persistent until server reboot. I need to clear them on demand and have tried everything to find them. I've dumped all the client, session, application, and server variables. Cannot find them there. Where are these being cached? If I can find them I should be able to clear them. cfobject type=JAVA action=Create name=tk class=java.awt.Toolkit/cfobject cfobject type=JAVA action=Create name=img class=java.awt.Image/cfobject cfscript img = tk.getDefaultToolkit ().getImage(#rootpath#\assets\banners\#gif_files.name# ); width = img.getWidth(); height = img.getHeight(); img.flush(); /cfscript Thanks Robert ~| 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:287881 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Unit Testing Code Coverage
Given that a step debugger is basically sitting there watching line numbers fly by waiting for a break-point, it seems to me that if the debugger kept a record of those line numbers you'd have a test coverage tool. I did lodge a feature request with the FusionDebug guys, but I have no notion of whether this is a serious possibility for them. Maybe if there's enough demand it'd move up the priority list? Jaime Metcher -Original Message- From: Rich [mailto:[EMAIL PROTECTED] Sent: Wednesday, 22 August 2007 12:32 AM To: CF-Talk Subject: RE: Unit Testing Code Coverage It looks as though I am going to have to develop a solution for our needs, but I will see if my company will allow me to release our efforts into the public domain. ~| 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:286752 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: I'm Old - ColdFusion 4.x
Not ideal, but you could skim through the online CFMX developer's guide that's on livedocs: http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/js/html/wwhel p.htm?href=wwhelp/wwhimpl/common/html/default.htm I'd focus on the sections on user defined functions, cold fusion components and J2EE integration. If you're feeling bold, go for the flash remoting section as well and check out the new features in CF8. Beyond the new language features, the biggest change since you've been away is the upsurge in production quality open source frameworks. Check here: http://www.remotesynthesis.com/cfopensourcelist/ for a list. It's a long list and uneven in terms of maturity and currency, but you can get a flavour by looking at Fusebox, ColdSpring, Transfer and CFCUnit. Beyond that again, you have the world of OOP plus all the Java libraries and frameworks...but maybe save that for next weekend :) Good luck! Jaime Metcher -Original Message- From: Mark Sorteberg [mailto:[EMAIL PROTECTED] Sent: Friday, 10 August 2007 9:11 AM To: CF-Talk Subject: I'm Old - ColdFusion 4.x I haven't been around the ColdFusion world since 4.x. I have a good job lead that requires that I get back into ColdFusion. I am having a very difficult time doing two things. 1. Finding a good training center. (I called Adobe and they couldn't help and the training center(s) on their website do not return calls and they have no email address to send questions to. 2. Is there an online tutorial website that I can use to get reaquainted with CF over the weekend. I obviously do not have the CF product at home or where I currently work. I have an interview on Monday and I'd like to play with CF as much as I can over the next few days. Any advice? ~| 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:285927 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: any idea how to
LOL. I miss those perl days, when hackers were real hackers and the top line of the keyboard was nervous. -Original Message- From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED] Sent: Thursday, 9 August 2007 12:57 PM To: CF-Talk Subject: Re: any idea how to cfset new_date=rereplace (20060523, ([\d]{4})([\d]{2})([\d]{2}),\2/\3/\1,ALL)/ On 8/8/07, Scott Stewart [EMAIL PROTECTED] wrote: Convert 20060523 Into 5/23/2006 I'm at a loss. Thanks in advance sas -- Scott Stewart ColdFusion Developer SSTWebworks 4405 Oakshyre Way Raleigh, NC. 27616 (703) 220-2835 http://www.sstwebworks.com http://www.linkedin.com/in/sstwebworks http://www.linkedin.com/in/sstwebworks ~| 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:285789 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: massive jrun -out.log files
There's lots of stuff there I don't understand (particularly the JINI stuff), but it seems apparent that FusionReactor is throwing a thread dump. If you had a chronic low-memory condition or otherwise were continually triggering FusionReactor's crash protection you'd see some pretty beefy log files. Maybe start with your FusionReactor settings, and take a look at the CP logs? Jaime Metcher -Original Message- From: John Beynon [mailto:[EMAIL PROTECTED] Sent: Tuesday, 7 August 2007 7:49 PM To: CF-Talk Subject: massive jrun -out.log files All of a sudden my CF on Jrun instances are churning out MASSIVE -out.log files in the jrun/logs folder and i have no idea what it means and would appreciate it if anyone could take a look - I've loaded part of the log file onto a server at http://www.berkeleyhomes.co.uk/scratch/jrunlogs.txt - it's only one of our CF servers doing it but all instances on the box are doing the same thing. many thanks for your time, john. ~| 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:285563 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: running jrockit with CFusionMX7 to find memory leak
Have I missed something here? Things like visualgc, FusionReactor etc just tell you how big the heap is. Unless you can pin down the memory leakage to particular moments in time, this doesn't help much. We need to know what's in that heap. From what I've seen the only one of Sun's tools that runs on the 1.4.x JVM is visualgc. The heap analysis tools require later JVMs, which CFMX7 does not support. That leaves us with things like OptimizeIt and JProfiler. I'd love to know if there's another way. I have a memory leak on my production server which I've been unable to reproduce on dev, and don't want to load down production with instrumentation. My current plan is to upgrade to CF8 and a) see if the leak goes away and b) get into the JVM 1.6 good stuff like JHAT. Jaime Metcher -Original Message- From: Calvert Rent [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 August 2007 7:21 AM To: CF-Talk Subject: Re: running jrockit with CFusionMX7 to find memory leak varScoper looks good, but this page uses cfscript which doesn't work w/ varScooper. I am currently downloading Java SE 5.0 so I can try out jvmstat. After I download a new version of Java, I assume I need to point coldfusion (through the admin interface) to point to the new instance of java. At that point I should be able to use jvmstat. Am I on the right track here? No reason to completely switch out the JVM for this.. Sun has free tools to help find memory leaks with their jvm's Check.. http://java.sun.com/performance/jvmstat/ You can also use Seefusion or Fusion-reactor which pulls a lot of the same info but more in the light of CF. John Mason [EMAIL PROTECTED] 770.337.8363 www.FusionLink.com - ColdFusion and Flex hosting Now offering ColdFusion 8 Enterprise hosting FREE Subversion hosting This is not relating to jrockit, but do you happen to be running FusionReactor? There was a bug in v2 of FR that, in some instances, caused the ODBC Wrapper to make memory climb. This has been fixed in their 2.04 release - and works great I might add. Just thought I would though that out there in case you are running FR with the ODBC wrapper. ~| 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:285643 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Unit Testing an XML Parsing Function
Jeff, How about this: rather than calling the built-in CreateUUID(), call your own function that will return either a hardcoded value or a real UUID, depending on a test mode flag. if (Request.testFlag) return fake UUID; else return CreateUUID(); For maximum verisimilitude you could return test UUIDs from out of a preset list - not sure how sensitive your testing needs to be. Jaime Metcher -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: Friday, 27 July 2007 3:18 AM To: CF-Talk Subject: Unit Testing an XML Parsing Function I have a component whose init method takes the path to an xml file and parses the contents of that xml file into an internal data structure. Now I am trying to write the unit test for this function and I am getting stuck. My original attempt was to pass in a test xml file and the manually create the matching data structure and compare the two. The problem is, during the parsing of this xml file, the component creates and inserts several UUID values into the internal data structure. Obviously, I cannot magically generate the same UUID value when I manually create the matching data structure to compare against. So, does anybody have any suggestions on testing this type of functionality? 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:284665 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Writing large data files
I'd *really* be trying to get the DBMS to dump this file out. If that's completely out of the question, I'd look at cfexecute-ing some sort of batch query tool (not sure what this is for oracle - the mssql equivalent is bcp). As a last resort, maybe dropping into Java offers you something, but I really don't know what the options are here - maybe open a cursor? Jaime Metcher -Original Message- From: Garth Young [mailto:[EMAIL PROTECTED] Sent: Wednesday, 25 July 2007 2:14 PM To: CF-Talk Subject: Re: Writing large data files I have released a UDF over at cflib.org, that will convert a ColdFusion query to CSV using JavaString Buffer which is considerably faster. http://www.cflib.org/udf.cfm?ID=1197 Thanks and let me know if you have any problem. Qasim The problem I have is that the Coldfusion query is not returning as the result set is too big. I could simply run the query pulling out blocks of rows from it but this would require re-executing the SQL 6-7 times at least. I suppose I could increase the JVM max memory to 2GB but I'm not really sure if this is a viable option. ~| 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:284499 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: managing multiple dev environments
-Original Message- From: John Paul Ashenfelter [mailto:[EMAIL PROTECTED] Sent: Wednesday, 18 July 2007 5:08 AM To: CF-Talk Subject: Re: SOT: managing multiple dev environments There's two pieces, right -- schema, and data. Developers need the schema and enough data, whatever that means.I find the redgate software tools are pretty spectacular as an aside for both moving/syncing schema and data. I'd be interested in any good Ant references anyone can throw my way as well. Pragmatic Project Automation with Ant is a good lite start. You can also take a look at the DBUnit task for Ant which will help you reset your database(s)... :) +1. The Redgate tools are great. DBUnit/Ant takes a little bit more thought but still very worthwhile for test automation. Jaime Metcher ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283947 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Metadata for code documentation (was RE: SURVEY RESULTS: Is ColdFusion OO?)
-Original Message- From: Tom Chiverton [mailto:[EMAIL PROTECTED] Sent: Wednesday, 11 July 2007 7:59 PM To: CF-Talk Subject: Re: Metadata for code documentation (was RE: SURVEY RESULTS: Is ColdFusion OO?) On Wednesday 11 Jul 2007, Jaime Metcher wrote: there is no enforceable contract, so cfinterface turns into an elaborate commenting mechanism with a runtime performance penalty. Did you try the CF8 beta yet :-) ? That's the Mona Lisa smiley - I can tell you're thinking something, but I'm not sure what it is. Jaime ~| ColdFusion 8 beta â Build next generation applications today. Free beta download on Labs http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283512 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: SURVEY RESULTS: Is ColdFusion OO?
-Original Message- From: Sean Corfield [mailto:[EMAIL PROTECTED] Sent: Thursday, 12 July 2007 2:21 AM To: CF-Talk Subject: Re: SURVEY RESULTS: Is ColdFusion OO? 2) simply use type=any and allow any strategy object to be pass in - if it doesn't implement the right methods, you'll get a runtime error Just musing about how to preserve some of the documentation benefits of typing in the presence of duck-typing. I guess if we stick to short methods (20 lines) the set of methods required to be implemented by duck-typed arguments is not too hard to work out just by reading the method body. In fact if we wanted to soup up the code introspection I'd think this is something that could be determined automatically by inspecting the CF parse tree. Obviously we couldn't follow the call tree as we don't know which implementation to look at until runtime, but we could at least determine method names and number of arguments. Beyond that, there's still a need to document somewhere central the semantics of each duck-typed method - it's all very well to know that a method will take as an argument any object that implements a setID() method, e.g., but it's important that the caller and implementor share a common world view regarding what an ID is. cfinterface or the abstract superclass technique provides a place to put that documentation, and it would be nice to have a documentation mechanism with no runtime impact that is similarly structured and introspectable. Jaime Metcher ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283519 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Metadata for code documentation (was RE: SURVEY RESULTS: Is ColdFusion OO?)
-Original Message- From: Tom Chiverton [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 July 2007 7:16 PM To: CF-Talk Subject: Re: SURVEY RESULTS: Is ColdFusion OO? On Tuesday 10 Jul 2007, Sean Corfield wrote: In ColdFusion, all type checking is done at run time. So if you use interfaces, you will get a *runtime* check, just like all the other checks. And if you screw up, you'll get a runtime error. If you use interfaces, the error just has different text in it (OK, that's a *slight* oversimplification :) I want Interfaces so I can aid other developers intergrating with my code- it explictly codes the contract. I love the idea of documenting the intention - something that can be very obscure using mixins. However, as Sean and Ben Nadel have pointed out, there is no enforceable contract, so cfinterface turns into an elaborate commenting mechanism with a runtime performance penalty. That reminds me of another idea for documenting intention in a structured way that *doesn't* have a performance penalty. I'm certainly not the first person to point this out, but you can add arbitrary attributes to the cfcomponent, cffunction and cfargument tags that then appear in the metadata. I'd love to see the community generate some momentum on a standard set of metadata to aid in code introspection. For example, if converting code from typed to untyped for performance reasons, instead of removing type and returntype attributes, why not change them to _type and _returntype, thus documenting the original intention?. If ducktyping, the _type attribute could read any CFC that implements getID() for example. It would then be simple matter to adapt CF's builtin CFC introspection to read these attributes. Similarly, if you have a function in a superclass like this: cffunction name=doSomething cfthrow Subclass responsibility /cffunction why not add an abstract attribute to document the intention. From there it's not too hard to parse the metadata into XMI and produce a UML diagram, if that's what floats your boat. And I know there's somebody out there (sorry -forgot who you are) who uses cfproperty tags to document composition relationships. This *is* just documentation, *not* an attempt to add Java-style annotations, and isn't necessarily any more accurate than any other documentation. The cool thing is the ability to import it into other tools. Jaime Metcher ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283431 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Init method and getters / setters in cfc
Somebody (Peter Bell, I think?) has a comprehensive solution involving lists of properties where on a per-property basis you can define whether it is gettable or settable for each access type (i.e. public, private, package), and on a per-class basis you define whether properties are addable and what happens when a non-existent property is accessed. This is non-trivial and gets around the infinitely mutable object problem, and the self-documentation issue. The naked get(key, value), set(key, value) (maybe simplified for use as an example?) is really just a way to expose the variables scope to the world. I wouldn't want to do that in most cases, and if I was really doing a quick and dirty hack I'd just use the this scope and save myself the trouble of even writing the generic get/set. Jaime Metcher -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 July 2007 6:25 AM To: CF-Talk Subject: Re: Init method and getters / setters in cfc I would add your component is now completely mutable. A developer can add any data they want which may or may not be a big deal depending on ones thinking on such things and what the component is meant to do. An example that shows this code is going to accept any and all input such as this. aObj.set(myOwnSillyvar,Some really bad data) Ian Ben Nadel wrote: Chris, While I don't know what is *right*, here are the arguments that I have heard against the generic getter/setter: * The CFC is not self documenting. Looking at its functions does not give you any insight into what it can set/get. * Not clear on what should be returned if an invalid get is requested. * It makes extending a component more difficult because the parent component now has to be smarter about where it looks for its data. Take that with a grain of salt ;) .. Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Peterson, Chris [mailto:[EMAIL PROTECTED] Sent: Monday, July 09, 2007 3:52 PM To: CF-Talk Subject: Init method and getters / setters in cfc A lot of cfc's using init and 'good' OO practices have functions like getDSN(), setDSN('Blah') littered throughout. Can I ask any guru out there why you wouldn't use simple get('keyname') and set('keyname','keyvalue') like the following? cffunction name=get access=public output=no returntype=any cfargument name=name required=true type=string cfreturn evaluate('variables.' arguments.name) / /cffunction cffunction name=set access=public output=no returntype=void cfargument name=name required=true type=string cfargument name=value required=true type=any cfset variables[arguments.name] = arguments.value / /cffunction Then instead of littering your cfc with numerous getters / setter, you have 2 methods that should be able to handle simple or complex values without any problems with much less code. Chris Peterson Gainey IT Adobe Certified Advanced Coldfusion Developer ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283335 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Coldfusion MX7 Developer Exam for certification, a must? Wher e is the location of the exam?
-Original Message- From: DURETTE, STEVEN J (ATTASIAIT) [mailto:[EMAIL PROTECTED] Sent: Friday, 6 July 2007 4:32 AM To: CF-Talk Subject: RE: Coldfusion MX7 Developer Exam for certification, a must? Wher e is the location of the exam? Out of the last five or so that we hired, ONE really knows ColdFusion. +1 Then there was the one. Great resume, extensive experience with SQL, CF, and other things; great responses from previous employers. Had to fire him after a week. He didn't even know do a simple table join. (we now ask basic technical questions during the interview) Amen to that. However, I also have scant regard for certification. I now do two things: 1. Just talk to them. If someone is knowledgeable and enthusiastic it will show. And I do expect my programmers to be able to speak. In an interview, I expect a programmer to a) tell me something I didn't know - they're keen and up with all the buzzwords, right? and b) get so intrigued with something I tell them that they forget to be the poised interviewee and go into problem-solving mode. 2. Ask them to read out load from a page of code (any page). If they say nothing more than this is a loop followed by a query I'm not impressed. If they say Hey, it looks like you've coded your own free text search here. Are you trying to work around the file limits in Verity? Did you try Lucene? I *am* impressed. Jaime Metcher ~| ColdFusion 8 beta â Build next generation applications today. Free beta download on Labs http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283023 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: CF Editor
-Original Message- From: James Wolfe [mailto:[EMAIL PROTECTED] Sent: Tuesday, 26 June 2007 8:47 AM To: CF-Talk Subject: Re: CF Editor snip CF Eclipse has lots of nice features, and if it didn't use over 400MB of RAM + VM (not an exaggeration), I think it might even be considered usable. Unfortunately, the massive Java bloat, that would be funny if it werent so sad, makes the editor responsive/usable only to those who have 2GB+ of RAM (unless you want to run your own CF Dev instance on the box in which case I'd go for 3GB+) which can obviously get prohibitively expensive if you have more than 1 or 2 developers using it. I've got 2GB. I run Eclipse, CFMX7 on IIS, Firefox, IE, Outlook, any number of Excel/MS Word documents, JMeter, VisualGC, Tomcat with Alfresco CMS. CFMX7 gets the first 1GB, all the rest fit within the second 1GB. All within physical RAM, no paging. Within Eclipse I use Ant with CFCUnit and Selenium tasks, Subclipse, XMLBuddy and CFEclipse. Right now the Eclipse instance has 235MB. I guess only the super rich can develop for CF at this point. 2GB of RAM pays for itself before morning tea on Monday. Everything else I mentioned above (other than the MS Office stuff) is free. What are the super rich CF developers spending their money on? Jaime Metcher ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282132 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 Editor
Total RAM used is *not* the sum of the Mem usage and VM columns in task manager. See http://shsc.info/WindowsMemoryManagement - the punchline is right at the end. Jaime Metcher -Original Message- From: James Wolfe [mailto:[EMAIL PROTECTED] Sent: Tuesday, 26 June 2007 2:08 PM To: CF-Talk Subject: Re: CF Editor I said that Eclipse only runs well on 2GB of ram and then everyone comes out of the woodwork and says I got 2GB of RAM and it runs fine! What is the point of that post? I'm very glad for you that have 2GB of RAM (and mildly jealous), but the average non-brand-spanking new machine has 512MB of RAM which is simply not enough to run Eclipse properly. I also specifically said that it uses 400MB of [RAM + VM] and I get responses from people that clearly leave off the VM (which is extremely relevant). For reference, in order to see the total RAM (including VM) that an app uses, open Task Manager, click View, click Columns, check off Virtual Memory and sum the RAM + Virtual Memory for the total RAM used. After using eclipse for 5 minutes, you will see the total RAM is at or (far) above 400GB. That is an obscene amount of memory for a program to use. Visual Studio, which is all the IDE Eclipse is and more, uses 1/10 (~40MB) of that at load time and 1/3 (100 - 150MB) of that when you have 20 files open and are compiling software. I honestly dont understand how everyone cheers about such a poorly written memory hog. I understand that its free and you get what you pay for, but there are limits. In short, as I said in my original post, use Eclipse if you have 2GB or more of RAM. Don't if you don't. ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282152 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Subversion Revisions
We check out a working copy to our integration server, then use a file comparison/copy tool to go from there to production. For incremental releases, this means we just do a svn update to the integration server - no need for a full checkout each time. Ant or even xcopy can do the upload to production, but we use a gui tool called directory toolkit (we have mapped drive access to the production server). By default directory toolkit ignores hidden files, so the .svn files aren't a problem. Jaime Metcher -Original Message- From: Cutter (CFRelated) [mailto:[EMAIL PROTECTED] Sent: Friday, 22 June 2007 1:55 AM To: CF-Talk Subject: SOT: Subversion Revisions OK, quick OT. Moving to using Subversion in our dev environment (yeah!), but hitting a few stumbling blocks. I can 'export' a clean version of my 'HEAD', or any revision. But, I have a massive (3,000+ template) code base. Not every 'commit' to the system is tagged, or part of a branch. How (or is it even possible) do I pull ONLY the modified files from the repository? I have SvnAnt installed within Eclipse, to utilize Ant with Subversion for creating builds and deployments, but I'm still struggling to get my head around all of this. -- Steve Cutter Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281850 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: How many CF developers does it take to manage a site ???
Yeah, like: Ten: one to write the code, one to make sure it's not Java, one to make sure it's better than PHP, one to scan the press for adverse comments, and six to argue about which framework to use. Sorry - best I could do. Jaime Metcher -Original Message- From: JJ Cool [mailto:[EMAIL PROTECTED] Sent: Tuesday, 12 June 2007 1:47 AM To: CF-Talk Subject: Re: How many CF developers does it take to manage a site ??? By the title of this thread I thought this was going to be a joke. :( disappointed, CoolJJ ~| ColdFusion 8 beta â Build next generation applications today. Free beta download on Labs http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280719 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfEclipse :: Find closing tag
Right-click, Jump to end tag? Jaime Metcher -Original Message- From: AJ Mercer [mailto:[EMAIL PROTECTED] Sent: Tuesday, 5 June 2007 7:28 PM To: CF-Talk Subject: Re: cfEclipse :: Find closing tag Not for me - that maximises the edit window do you know if there is a menu or right click option On 6/5/07, Michael Bramwell [EMAIL PROTECTED] wrote: Hi AJ, Ctrl + M Mike. On 6/5/07, AJ Mercer [EMAIL PROTECTED] wrote: Can cfEclipse find closing tags? So if I select cfif it will find for me /cfif TIA ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280082 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Concepts of Developing Locally with CFEclipse
Rick, It think your questions have mostly been answered, but to do so in the context of your original post: We have 7 or 8 web sites that I work on regularly, so from a local development perspective, I either need to use a locally installed web server with one instance of coldfusion... or I need to install multiple instances of coldfusion and use the built in web server for each web site. Those are my options, right? If you're using single instance installs on production, that's what I'd do on dev. Can I use the Developer Edition locally but still use an external web server with host headers to determine which site I'm accessing? That way I could just use a hosts file to get to them. Yep. Now... should I edit the source code in place in the appropriate web root? Yep. I've been using flex Builder a lot and it publishes the compiled swf and HTML to the destination directory each time.. is there something similar when using CFEclipse to edit HTML/CFM/CFC files? No need. If I'm also using Subversion and something like Subclipse (I haven't tried this yet)... should my webroot also be my working copy? Yep. Jaime Metcher ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278519 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: New developer vs. Veteran developer
I agree about upgrading the bean counters or at least adjusting their attitude. The fact is that the productivity gap between an excellent developer and a merely competent one can be enormous, a factor of 10-20, and it can vary depending on the task. I believe this is a finding arising out of formal research, not just anecdotal (sorry, don't have the reference). In fact (and this is anecdotal now) in a small agile shop an even slightly sub-par developer can be a net drain on team productivity, and you may not diagnose this until training time is over, crunch time has come and gone, the developer has moved on and you now need to do the first major upgrade of the subsystem they wrote. You don't see anything like these extremes in most professions (say, counting beans), so bean counters can find it hard to accept. I'd also echo Barney and say that years of CF experience is much less important than years of development experience. I would expect a top notch developer who had never used CF to be teaching *me* things about CF after 3-6 months. And finally, years of development experience is much less important than years of actively pursuing professional excellence. For example, a CF developer of 10 years experience who has never heard of patterns and never played with Java integration isn't worth much IMHO. NOT because I expect them to use patterns, or even OO - but if they are actively seeking after best practices, the WILL be aware of these things, WILL have investigated them and WILL have coherent reasons for using/not using them. So, to finally give my answer to the question: developer A = webmaster type who can do ColdFusion but doesn't really get development as a profession developer B = CS grad with solid skills but maybe a bit of a plodder developer C = CS grad with talent and great attitude developer D = Zen master with 10 years of the pursuit of excellence Productivity ratio B:C:D ~ 1:2:4 What about developer A? After six months, D will have mentored A, B and C, done his/her own work, collaborated with C on improving the teams practices, completely rewritten all of A's code, and participated in interviewing for A's replacement. So A's contribution is that D is now very tired. Jaime Metcher -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Thursday, 17 May 2007 3:37 AM To: CF-Talk Subject: Re: New developer vs. Veteran developer If the bean counters want to quantify that, you might be well advised to find some new bean counters. ; ) My opinion is that language idioms are pretty simple, but core development concepts are quite complex. As such, I'd generally rather hire a developer with experience building the types of applications I'm building in a different language over a CF developer who is new to the arena I'm building apps in. ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278365 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Subversion Tutorial Posted
Andrew, Where's your blog? I did google it - do you have any idea how many people out there are pretending to be you? Jaime Metcher -Original Message- From: Andrew Scott [mailto:[EMAIL PROTECTED] Sent: Saturday, 12 May 2007 10:37 PM To: CF-Talk Subject: Re: Subversion Tutorial Posted Rick, I am, it will be a very lengthy tutorial. And should be up in the next couple of days. It is written for any number of team members, one or 20. But its not a rule, its a guide... On 5/12/07, Rick Faircloth [EMAIL PROTECTED] wrote: Boy... and to think I was really looking forward to reading this long thread, hoping that, as I contemplate implementing Eclipse, CFEclipse, and Subversion, that I would be able to confidently set up a new working environment... but alas, all this thread has brought is confusion. It seems almost all perspectives offered in this thread revolves around team environments. As a sole (as in the only developer on my projects) developer, the question remains, what would be the be approach to Subversion for me? Anyone blogged that in detail? I'm sure the best (or at least very acceptable) practices to all for an solo developer would be, perhaps, very different from team best practices... or are there 5,233 different perspectives on that, too, and I should be dive in and figure out what works best for me. Remember, after about 9 or 10 years of development on CF 4.5 without upgrading (going to CF8), I'm very comfortable with developing on my *production* server, which would cause most of you to pull your hair out in a team environment... Rick ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277987 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Subversion Tutorial Posted
I don't reckon this thread is long enough yet, so here's some more... There are so many ways to use Subversion that it's easy to be in violent agreement. We all agree on this: Don't break the build. Make sure you thoroughly test before you commit. And be sure to backup your working copy. But we interpret the words differently: Andrew: the build = the latest revision Tom: the build = the approved tag Me: the build = the latest revision from trunk Andrew: commit = the usual subversion commit Tom: commit = create an approved tag Me: commit = merge my personal dev branch into trunk Andrew: backup = filesystem backup of working copy Tom: backup = commit working copy into repo, then backup repo Me: backup = commit working copy into my dev branch of the repo, then backup repo And thereby end up with three different procedures that look different but in fact do the same thing (maybe with slightly different emphases). We all create abstractions for a living here, surely we can cope with that. Jaime Metcher -Original Message- From: Andrew Scott [mailto:[EMAIL PROTECTED] Sent: Saturday, 12 May 2007 3:00 AM To: CF-Talk Subject: Re: Subversion Tutorial Posted So what your saying is this. You and I are on the same team working on the same project I make some changes to my code, and I have not written any TDD test cases and just submit my work into subversion and go home, while I am travelling home I am involved in a car accident and put into hospital and out of action for a day or 2... Thanking god its not serious... Anyway, the code that I submitted broke the website / application in a major way. now its your Job or someone elses to step through the revisions to see what I did to break the code. Now on top of this, you have one hour to figure this out before you demostrate the new changes that had been made for the last few weeks. However I can't be contacted cause I am still not very coheriant But due to an unforseen problem, I not only broke the latest version (Note: version not revision) and forced others to waste time finding out what I did to break the latest build / code. In the meantime the client is being patient, and you have to put him/her off for a day or two to get this sorted out, then he begins to wonder what he/she has paid for and is becomming a little impatient with you. Are you begining to understand my point now, it doesn't matter what you think in the long run you might have saved more time on the project if I did not commit this code and stopped everyone else from getting their job done. Subversion is a version control system, with the ability to handle revisions. It is not a revision control system and should not be treated that way. The mentality of a developer should be take action against all possible problems, and if my code is going to break the latest build at the 11th hour or not I shouldn't commit it until I am 100% happy with the fact all my unit test cases have passed and I have covered 100% of code in my tests. Bobby, your methods might work. But it can be improved and thats what I am trying to say to you, why do you think the java community adopted the agile and TDD aproach, and use subversion for what it is designed for. They know at the end of the day they can export the code to a test server, and its as stable as it should be for any demo or presentation at the drop of a hat. On 5/12/07, Bobby Hartsfield [EMAIL PROTECTED] wrote: Its your time your wasting I'm not wasting any time or money but thanks for your concern. I have a pretty good reputation for OVER delivering applications WELL under budget AND deadline. Anyone who has worked with me can vouch for that. I also come from a place where I clean up after myself. If I spill it, I'll clean it up... If I break it, I'll fix it. I don't depend on other developers to hold my hand and fix mistakes that I might have made. I would do that on my own time and dime. If I had back every dollar I've 'wasted' doing so over the years, I MIGHT be able to buy you a beer. Maybe, over that beer, I could explain to you the concept of agree to disagree and the definition of narcissism. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.8/797 - Release Date: 5/10/2007 5:10 PM ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277890 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Subversion Tutorial Posted
FWIW, our procedure (having created the repo) is this: 1. Identify a batch of requirements totalling 1-3 weeks work. 2. Create a branch from the head revision of trunk. This is a branch of the entire system, not just the subsystem under development. 3. Assign the job to a developer, who will check out that branch as their working copy onto their local CF environment. 4. The developer can then use that branch as backup/undo if they want to. 5. 1-3 weeks later when finished, merge the latest trunk revision into the branch. 6. Then, after passing both unit and integration tests the branch is merged back into trunk. 7. Back to step 1. In the rare (and undesirable) instance where the work can't be completed due to external dependencies or some overriding priority, the developer can simply park that branch and start work on a second job with a second branch. Obviously parking a branch for too long has all sorts of hairs, but not being able to do this can be even hairier. In the rare (but desirable) instance where we want to just futz around with some new ideas, same story - create a second branch and go for it. This one might never be merged back to trunk. If two developers are working on the same batch, we may check out a dev branch to two different machines, but in practice we rarely do this. We either pair program or work on something different. Meanwhile, maintenance fixes and small tweaks (meaning one hour fixes) continue from the trunk, which is checked out to a shared CF environment. The head revision of trunk must be deployable at all times (i.e. it is the build). Jaime Metcher -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Friday, 11 May 2007 12:18 PM To: CF-Talk Subject: Subversion Tutorial Posted Just wanted to let you folks know I setup an REALLY basic tutorial on getting started with Subversion/Tortoise SVN. It's still pretty rough, so any suggestions/tips would be appreciated. http://wtomlinson.com/subversion.cfm I'm pretty dense most of the time and it took some time, and some good help from Bobby before I could grasp what I needed to do to make it work. The docs really confused me. Maybe this will help others save some time. Thanks, Will ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277889 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Unit Testing A Web Interface
and automation of cross-domain testing. You can run cross-domain scripts manually, but the automation is experimental and didn't work for me. But it's hard to see how checking cross-domain workflows could be called unit testing. I use selenium a lot, but if you just want to unit test a single form post, you can also do this in cfcunit or cfunit pretty easily. 1. Use a global test mode flag to make the form think it's been POSTed to: if (CGI.request_method is POST or StructKeyExists(Request, flgFormTestMode)) { // processing code here } 2. Instead of cflocation, use a UDF which checks the same flag and prints out the URL if the flag is set. 3. Use cfunit's AssertOutputs function (or steal or write your own for cfcunit) to run the form processing module, capture its output and run a set of assertions agains the output. So then your test looks something like: Request.flgFormTestMode = 1; FORM.myField = hello; AssertOutputs(type=module, template=/mymodule.cfm, expected=Redirect: nextpage.cfm); This has the advantage that it's easy to simulate some of the bizarro form transmissions that only real users and spambots seem to be able to create - you know, missing fields, strange query string parameters, a list of 2,000 porno sites in a form field that's supposed to be a yes/no radio button... So I tend to use selenium for success scenarios and typical exceptions, and cfcunit for strange edge cases. Jaime Metcher -Original Message- From: Andrew Scott [mailto:[EMAIL PROTECTED] Sent: Saturday, 12 May 2007 3:20 AM To: CF-Talk Subject: Re: Unit Testing A Web Interface There is a better one out there but its costs... The one thing selinium lacks is the fact you can't script RMB (Right Mouse Button) :-( On 5/12/07, Ben Nadel [EMAIL PROTECTED] wrote: That looks pretty cool. I like that it can integrate with FireFox. -Original Message- From: Kris Jones [mailto:[EMAIL PROTECTED] Sent: Friday, May 11, 2007 11:30 AM To: CF-Talk Subject: Re: Unit Testing A Web Interface Selenium? http://www.openqa.org/selenium-ide/ Cheers, Kris Hey All, I have a new manager for a current project and he wants to see me do unit tests for form interfaces for an existing web application. I have an idea of what a Unit Test is for code classes, but I have no idea how this is to be done for a web interface? Does anyone have any explanation or resources I can look into? Am I supposed to write code that attempts to submit a form with bad value sets? Are there apps out there that do that? Is that what a test harness would do - submit a form and maybe check for resultant error text on the returned page? ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277894 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: defeating offline form posts
Put the session ID in the form and then check to see if the session has expired. Jaime Metcher -Original Message- From: Eric J. Hoffman [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 May 2007 12:44 PM To: CF-Talk Subject: defeating offline form posts Curious question here. If I think about this, if someone takes a form of ours for login, for example, and makes a local copy on their machineand they set the post action to be the live server authenticate filewhat is the best way to detect this and defeat it? Noone has ever gained access this way as of yet, but we are studying possibilities, and this seems to me to be an attack vector. Any thoughts?A check to see if the referrer was the domain name/login file name? Or can that be spoofed as well then? Thanks~! Eric J. Hoffman Managing Partner 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: http://www.ejhassociates.com tel: 651.717.4105 fax: 651.717.4101 mob: 651.245.2717 Adobe Solutions Partner Microsoft Certified Partner This message contains confidential information and is intended only for [EMAIL PROTECTED] If you are not cf-talk@houseoffusion.com you should not disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Eric J. Hoffman therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277372 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: defeating offline form posts
It's thoroughly unreliable even if not spoofed. Some browsers won't set it, some proxies will mask it or strip it out. Jaime Metcher -Original Message- From: Eric J. Hoffman [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 May 2007 1:02 PM To: CF-Talk Subject: RE: defeating offline form posts That's where I startedbut the thing is, I think they can spoof that variable? Or not? Eric J. Hoffman Managing Partner 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: http://www.ejhassociates.com tel: 651.717.4105 fax: 651.717.4101 mob: 651.245.2717 Adobe Solutions Partner Microsoft Certified Partner This message contains confidential information and is intended only for [EMAIL PROTECTED] If you are not cf-talk@houseoffusion.com you should not disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Eric J. Hoffman therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -Original Message- From: AJ Mercer [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 08, 2007 9:53 PM To: CF-Talk Subject: Re: defeating offline form posts Have a look at the CGI variables in particular CGI.HTTP_REFERER This is the page before the current one - it should have your server details in there, other wise discard. On 5/9/07, Eric J. Hoffman [EMAIL PROTECTED] wrote: Curious question here. If I think about this, if someone takes a form of ours for login, for example, and makes a local copy on their machineand they set the post action to be the live server authenticate filewhat is the best way to detect this and defeat it? Noone has ever gained access this way as of yet, but we are studying possibilities, and this seems to me to be an attack vector. Any thoughts?A check to see if the referrer was the domain name/login file name? Or can that be spoofed as well then? Thanks~! Eric J. Hoffman Managing Partner 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: http://www.ejhassociates.com tel: 651.717.4105 fax: 651.717.4101 mob: 651.245.2717 Adobe Solutions Partner Microsoft Certified Partner This message contains confidential information and is intended only for [EMAIL PROTECTED] If you are not cf-talk@houseoffusion.com you should not disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Eric J. Hoffman therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277374 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Best Practice: Query User Specific Data
I'd always want an open version that will take any user ID, then another layer over that that enforces the rules about what user ID can be passed in. Otherwise you have a hell of a time writing admin systems or unit tests. Jaime Metcher -Original Message- From: Robert Rawlins - Think Blue [mailto:[EMAIL PROTECTED] Sent: Friday, 4 May 2007 10:05 PM To: CF-Talk Subject: Best Practice: Query User Specific Data Hey Guys, Something crossed my mind this morning and I thought I'd run it past you, see what your thoughts on it were. In my application I have allot of queries that pull data dependant on the user that is currently signed in using the user_id which sits in their session. Now for the moment I pass this user_id in as an argument to my functions that contain queries, like this. cffunction cfargument name=userid cfquery SELECT somthing FROM wherever WHERE userid = #arguments.userid# /cfquery /cffunction I then call this function by doing the usual MyObject.myFunction(Session.UserID) Now is this the best way of doing this? Presumably there is a slight vulnerability in security as anyone could effectively pass in any old user ID and have it pull their information from the database. What I'd really like to do it have that WHERE clause interact directly with the SESSION scope to collect that user ID, that way the user HAS to have an active session and will only ever be able to retrieve their information, and to get an active session with a populated user_id they must have been authenticated. I know this might make the code a little less usable, but I feel that it's probably a little more secure. What do you think? Rob ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277206 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Display number of users online
cfset tracker = createObject(java,coldfusion.runtime.SessionTracker) cfoutputpThere are #tracker.getSessionCount()# active sessions/p/cfoutput cfset sk = tracker.getSessionKeys() cfset count_logged_in = 0 cfloop condition=#sk.hasNext()# cfset k = sk.nextElement() cfset s = tracker.getSession(k) cfif StructKeyExists(s, whatever key you use to check whether somebody is logged in) cfset count_logged_in = count_logged_in + 1 /cfif /cfloop cfoutputpThere are #count_logged_in# logged in users/p/cfoutput Jaime Metcher -Original Message- From: Joel Watson [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 April 2007 12:03 PM To: CF-Talk Subject: Display number of users online I have a site (a forum, really) that allows users to login and post messages. Is there a way that I can display the number of users that are currently logged in? Thanks! ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275502 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Using CFCs in session scope - need cflock help
Wow, this thread sure kicked off. While we've got the attention of all these big brains, can we just agree that Jason's problem has nothing to do with locking or lack thereof? There are certainly race condition scenarios when initializing shared scopes (as per Sean's example) that can *look* like a new session is being created, where in fact all that's happened is you've clobbered your existing session variables. But the fact that Jason is seeing new session IDs indicates that the problem is something completely different. Yes? Jaime Metcher -Original Message- From: Andrew Scott [mailto:[EMAIL PROTECTED] Sent: Monday, 16 April 2007 7:18 AM To: CF-Talk Subject: Re: Using CFCs in session scope - need cflock help Sean, A race condition is as stated in one of my previous posts. And I quote again... If thread one, is running and it checked the condition session.flag is true and while halfway through that check, the variable is changed it is going to cause a few problems. If for instance I have a serious of variables and while I need to use those variables, and whil reading them in and they change, the results are going to be unexpected dat results. On 4/16/07, Sean Corfield [EMAIL PROTECTED] wrote: On 4/15/07, Andrew Scott [EMAIL PROTECTED] wrote: cfset application.flag = true / no on its own that can not cause a race condition, but if somewhere else there is a read on that variable somewhere then that will cause a race condition. Wrong. Code can read that variable to its heart's content all over the application without a race condition. Now as this debate is being discussed because of a CFC inside of a session scope, there is an extremely high chance that a race condtion is going to occur, so as Ben says lock it. Not necessarily true. You can have a bean in session scope and never need to lock it. If the operations are *atomic*. You are just simply refusing to listen to what people are telling you and you aren't reading the documents closely enough. I don't think you actually understand what a race condition is...? -- 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 MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275297 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: What conditions would cause a new jsessionid to be assigned to a user session?
Jason, Not sure if you saw my reply to the now somewhat out of control thread on CFC locking, so here it is again: I have seen a problem where a proxy cache was mixing up user's sessions so they would actually see each other's data. The actual mechanism was that the proxy would return the cookie headers (to the browser) out of proxy cache. A lot of the time, of course, the cached cookie would be referring to an expired session, so it would look like a session timeout. We developed a mechanism for comparing the cookie sent to the browser by the server with the cookie that the browser sends back - where they're different, there's been a cache mixup. We resolved this with no-cache directives. I'm presuming you've tried that, but it's suprisingly difficult, so it might be worth another look. See: http://www.bpurcell.org/blog/index.cfm?mode=entryentry=1075 http://support.microsoft.com/kb/222064 Ultimately, though, neither browsers nor proxies are obliged to honour your caching directives. Jaime Metcher -Original Message- From: Jason Dunaway [mailto:[EMAIL PROTECTED] Sent: Friday, 13 April 2007 11:33 PM To: CF-Talk Subject: What conditions would cause a new jsessionid to be assigned to a user session? I know this may be a rather rookie question, but I want as much input as possible on this so I'm asking it anyways. We're having problems with users being timed out prematurely, before the 2hr time limit our client has decided upon. Everything has been setup in CFadministrator correctly, as 95% of the users are able to stay logged in for the 2hr time frame and have no problems. With the small percentage of users that are not being able to stay logged, the timeout is random and the server assigns a NEW jsessionid to them. Of course, when this happens all of the user info that is stored in session is lost, therefore they are gracefully kicked out of the site and asked to log in again. Anyone have any input as to what can be causing this? Thanks! ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275298 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Using CFCs in session scope - need cflock help
Jason, If you are seeing the session ID values change (as per the earlier thread) then the user is getting a new session. Whether there was a race condition in the old session has nothing to do with it. The request with the new session ID is starting with a clean slate and is not even aware the old session existed. AFAIK, there's only one thing you can do in code that will cause somebody to get a new session ID, and that's destroy their cookie with a CFCOOKIE or CFHEADER tag. If you're not doing that, the problem must be at the HTTP level, and all the previous suggestions about browser bugs, proxies and caching come into play. I have seen a problem where a proxy cache was mixing up user's sessions so they would actually see each other's data. The actual mechanism was that the proxy would return the cookie headers (to the browser) out of cache. A lot of the time, of course, the cached cookie would be referring to an expired session, so it would look like a session timeout. We developed a mechanism for comparing the cookie sent to the browser by the server with the cookie that the browser sends back - where they're different, there's been a cache mixup. We resolved this with no-cache directives. I'm presuming you've tried that, but it's suprisingly difficult, so it might be worth another look. See: http://www.bpurcell.org/blog/index.cfm?mode=entryentry=1075 http://support.microsoft.com/kb/222064 Ultimately, though, neither browsers nor proxies are obliged to honour your caching directives. Jaime Metcher -Original Message- From: Jason Dunaway [mailto:[EMAIL PROTECTED] Sent: Friday, 13 April 2007 11:15 PM To: CF-Talk Subject: Re: Using CFCs in session scope - need cflock help I've been out of the office for 4 days so I'm just now responding. Thanks to all who offered valuable feedback and input. I am a huge fan of OO programing. I graduated college in December 2002 from Miami U. of Ohio. The program I studied there really focused on OO design and use. So I've been somewhat brainwashed, but I really believe in it despite this. So when I took on the current project my employer wanted the site cleaned up. It was a mess prior to the redesign. I chose to use components rather then using cookies or individual session variables because I love the structure and organization that a nice, neat wrapped up component providesand I love reusing code instead of having copies of it everywhere. Everything is much more consistent and logical. Instantiating them in session was a natural choice since, in theory, the data should be maintained for the user's session across all pages. The main user component only contains DATA relevant to the user and methods that deal with this data. I honestly don't see a huge problem with this because it's not a huge amount of code. RAM is not really a concern to us, the machine is adequately equipped. So now we're having issues with the site timing out users prematurely and randomly. We have verified that what is causing this is that the user is getting a NEW jsessionid from the server. What we don't know is WHY this is happening. Responses from another post I made where that there are a number of causes, many which are unrelated to actual code. What I really need to determine is if the lack of cflock in appropriate places is the culprit. I see that there are pros/cons to using cfcs in session, as have been noted in most of the responses here, but I need to pin down what is causing it. If anyone has any helpful advice please send it my way. If you want to scorn me for using CFCs in session scope, please keep your comments to yourself unless you truely feel it is relevant to my problem. Thanks in advance! ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275217 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Using CFCs in session scope - need cflock help
Andrew, I just don't see what your code example has to do with race conditions. cfset is an atomic operation (didn't used to be, but that's been fixed) so no race condition is possible. Using locks like this is a bizarre but mostly harmless practice that is only common in ColdFusion because of bugs in earlier versions. What *isn't* harmless is the notion that doing this in any way protects you from a real race condition. I'm preaching to the choir here, but for the record, a race condition looks like this: 1. I query some piece of shared state. 2. Some other thread or process changes that state 3. I perform some operation that depends on the state not having changed. Even if we restrict the problem to, say, just the CF session scope, the only blanket approach that will prevent race conditions is to single-thread the whole session. Locking single cfset tags in setter functions will do nothing for you. If you don't want to single thread the session (and if you're doing frames or AJAX you shouldn't), you need to understand for every operation what shared state it depends on and what the impact of a change in the shared state would be. If there would be an impact you care about, put the querying of the state and the operation where you use it as close together as possible and wrap them in a lock. Jaime Metcher -Original Message- From: Andrew Scott [mailto:[EMAIL PROTECTED] Sent: Saturday, 14 April 2007 1:04 PM To: CF-Talk Subject: Re: Using CFCs in session scope - need cflock help Jason, I answered your question, in my post I gave you a code example of what you need to do. So the answer is yes, when writing to any scoped variable you must cflock the write. I am very sure I said that:-) ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275220 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Using CFCs in session scope - need cflock help
Andrew, OK, I'm officially confused. I remember it being nutted out, and the conclusion being that you *don't* need to lock when writing to a session variable. A simple cfset Session.x = y can't possibly have a race condition, right? It *may* be part of a multistatement operation that creates a race condition, but in itself, no way. Jaime Metcher -Original Message- From: Andrew Scott [mailto:[EMAIL PROTECTED] Sent: Sunday, 15 April 2007 9:46 AM To: CF-Talk Subject: Re: Using CFCs in session scope - need cflock help Jaime, In the example of the original question the CFC is stored inside a session scope. Anytime one write to session.somevariable, there is a chance that there could be a race condition. I am sure you know that, and if the session containes a CFC then the rules of race conditions still need to apply. This was nutted out many moons ago on the CFCDev mailing list. ~| ColdFusion MX7 by Adobe® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275228 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfcontent excel session and url variables
Also check your exception log. Even if an error does make it to the browser it should be logged there. Jaime Metcher -Original Message- From: Kris Jones [mailto:[EMAIL PROTECTED] Sent: Saturday, 7 April 2007 6:58 AM To: CF-Talk Subject: Re: cfcontent excel session and url variables Hi William, We also use this method for handling excel formatting of reports, although we use the form scope, not the URL. We have also seen the could not open error. After much investigation, we found that this error was due to a CF error that would naturally not propagate through to excel. The way we fixed it was to run the report with the cfcontent/cfheader commented out, and see the actual CF error, fix it, uncomment the cfcontent/cfheader and run it again. In every case, we were able to fix the problem. Usually it was a reference to an undefined variable causing the problem. Also, you should probably wrap your URL variables in a urlencodedformat() for good measure (we also encrypt ours, but depending on your requirements that may not be necessary). Cheers, Kris A question relating to cfcontent and session variables, with a hint of URL variables. We are migrating from a relatively open system to one that has a login and session management. We have stumbled across something that seems to be behaving oddly, though I don't know why. We have a coldfusion page that will generate a report as HTML. If the user selects a button to save it to excel, it runs the same page, but inserts the CFCONTENT TYPE=application/vnd.ms-excel reset=yes CFHEADER NAME=Content-Disposition VALUE=filename=myreport.xls at the top. The only other difference, is the variables to generate are passed through as URL variables. Before adding the session, they worked fine. Now though, and it is not all situations, it almost seems like IE or Excel are trying to open a new instance of IE outside of the session in an attempt to download the file. As I said though, it is not all. This link... reportactionoutput.cfm?DATEPARAMS=Dec 09, 2005DATEPARAMSLENGTH=1reportlevel=Nationalreporttype=ABCreport param=465saveToFile=yes does not work, with excel popping up an error message saying Cold not open http://mysite/reportactionoutput.cfm?DATEPARAMS=Dec 09, 2005DATEPARAMSLENGTH=1reportlevel=Nationalreporttype=ABCreportparam=465 saveToFile=yes Now, if I run a slightly different report type, the exact same url with maybe another parameter like this reportactionoutput.cfm?DATEPARAMS=Dec 09, 2005DATEPARAMSLENGTH=1reportlevel=Nationalfocusstate=CAreporttype=ABCre portparam=465saveToFile=yes It opens fine, no issues. The only thing I found that may fix the problem is changing the spaces in the url variable to %20 This falls into different reports doing different things, not common code so there is a lot of places to change it, with no full assurance that this will fix the issue. Anyone run into anything similar? Thanx! ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274812 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Using CFCs in session scope - need cflock help
It's looking pretty bleak - we can't store CFCs in session because they take too much memory, and we can't instantiate per request because it takes too much CPU.Thank heavens for procedural programming. ;) Seriously, though, I have high hopes of CF8 in this respect. We have the language features for OO, but trying to think OO with one eye on the performance monitor is just a bit too schizoid for me. Now it's up to Adobe to tune the app server. Failing that, you can always write your model in Java. Jaime Metcher -Original Message- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: Saturday, 7 April 2007 6:49 AM To: CF-Talk Subject: RE: Using CFCs in session scope - need cflock help Re-instantiating an object, on each request, can be processor-intensive. I have used session-based CFCs for a couple of years and have had no problems. I have the data and the methods all in a nice, neat package. M!ke -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Friday, April 06, 2007 2:15 PM To: CF-Talk Subject: Re: Using CFCs in session scope - need cflock help Well, it's doesn't make any programmatic sense for a start. They are static providing a common layer of functionality, to put them into a scope other than application or server (to a degree) just doesn't make any sense. They can be very memory intensive so giving each user their own session CFC which is identical to ever other users doesn't make any sense as it would be needless consumption of memory space. You also cannot use replication with them in session scope (this may have been fixed in CF7/JRun updater, I know it was true before) ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274813 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Verity exclude sub-directories?
We do this by actually removing the excluded keys from the search collection after it is built, like this: cfloop list=#stDS.txtExclusions# index=txtExclude delimiters=#chr(13)##chr(10)# cfset txtCriteria = Replace (txtExclude, \, \\, ALL) cfsearch name=qryDeleteKeys collection=#stDS.txtCollectionName# type=simple criteria=CF_KEY SUBSTRING #txtCriteria# cfindex collection=#stDS.txtCollectionName# action=delete query=qryDeleteKeys key=KEY /cfloop Jaime Metcher -Original Message- From: Josh Knopp [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 March 2007 6:40 AM To: CF-Talk Subject: Re: Verity exclude sub-directories? I am extremely new to Verity searching - today is literally my first day. So there may be more graceful ways to solve this conundrum, but here's what I have... I have subdirectories called 'admin' and 'includes' that I do not want showing up in search results, so at the top of the search results page, I have: CFSEARCH NAME=Search_mySite COLLECTION=mySite CRITERIA=#FORM.Search_Term# NOT /admin/ NOT /includes/ Seems to work great. Good luck, Josh Knopp AMS, Inc. I'm working with Verity and have a questionis there a way to exclude certain sub-directories from being indexed in the collection? I have a few 'procedure' directories that I don't want coming up in the user search. Thanks for your help! Deborah ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo. cfm ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274046 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: You think you know OOP.. but you don't
Jon, Yes - it's called Smalltalk ;P Also, check out Nando's series of articles http://aria-media.com/blog/index.cfm/oo-in-cf Seriously, I agree there's a lot of crap to learn, although my crap list is different. And IMHO, a lot of the crap is there because a) J2EE has a lot of stuff to support highly specific use cases surrounding distributed transactions and the performance and reliability issues thereof and b) ColdFusion has some serious performance problems as an OO language in that you are very restricted in the number of objects you can reasonably instantiate. So you *do* know OOP - what you're seeing is OOP PLUS the Java baggage PLUS the performance workarounds. I.e. we're not in Kansas anymore. Jaime -Original Message- From: Jonathan Block [mailto:[EMAIL PROTECTED] Sent: Friday, 23 March 2007 5:16 AM To: CF-Talk Subject: You think you know OOP.. but you don't Why do so many articles get published in the CFMX world about OOP. I've read though several, not going to mention names here... but you read it and it makes you think.. wow .. i thought I understood OOP but maybe I don't. Factories... abstraction... models... patterns... that's too much crap for someone to learn. I feel like anybody who's trying to learn CFMX need not worry about whether or not they know OOP or any of these crazy buzzwords. If we think OOP is important, or any other buzz word for that matter, we really aught to make a simple application that shows you the recommended way to do something in CFMX. Is there such a resource? Jon ~| Macromedia ColdFusion MX7 Upgrade to MX7 experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273473 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: CFCs and the THIS scope
Well, it seems to me that both forms are being handled by a new instance of temp. update1 stores the value in that new instance, which is garbage collected some time after the POST request terminates. update2 stores the value in the prexisting instance which has been placed in the session scope, which of course hangs around for future reference. Jaime Metcher -Original Message- From: joe smiths [mailto:[EMAIL PROTECTED] Sent: Friday, 9 March 2007 4:36 AM To: CF-Talk Subject: CFCs and the THIS scope Given the files below - why does update1() fail to update the cfc property? file TEMP.CFM: cfoutput cfif not isDefined(session.temp) cfset session.temp=#createObject('component','temp')# /cfif html head titletemp/title /head body form method=post action=temp.cfc?method=update1 update1: select name=tableName onChange=this.form.submit() option/option option cfif session.temp.tableName eq table1selected/cfiftable1/option option cfif session.temp.tableName eq table2selected/cfiftable2/option option cfif session.temp.tableName eq table3selected/cfiftable3/option /select /form form method=post action=temp.cfc?method=update2 update2: select name=tableName onChange=this.form.submit() option/option option cfif session.temp.tableName eq table1selected/cfiftable1/option option cfif session.temp.tableName eq table2selected/cfiftable2/option option cfif session.temp.tableName eq table3selected/cfiftable3/option /select /form session.temp.tableName=#session.temp.tableName# /body /html /cfoutput file TEMP.CFC: cfcomponent cfset this.tableName= cffunction name=update1 access=remote cfargument name=tableName required=yes cfset this.tableName=arguments.tableName cflocation url=temp.cfm addToken=no /cffunction cffunction name=update2 access=remote cfargument name=tableName required=yes cfset session.temp.tableName=arguments.tableName cflocation url=temp.cfm addToken=no /cffunction /cfcomponent ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272058 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Coldfusion Server Issues
What could cause cross-interference between sites? Some ideas: 1. Contention for shared resources e.g. you keep a file open somewhere, or each site has a logging thread that keeps a lock on some table. 2. An insidious one can be where you inadvertently use the same application name, so the two sites keep blowing away and reinitializing the shared scopes. 3. Mapping - you've got a mapping for one site that's a real directory in the other site. The mapping takes precedence, so you're executing code in the wrong context. 4. Memory overload - if you're loading a lot of data into shared scopes, the GC could be thrashing. I'd highly recommend a management tool like Fusion Reactor. The ability to look into the guts of a running thread can clear the fog in a microsecond. Jaime Metcher -Original Message- From: Chris Musial [mailto:[EMAIL PROTECTED] Sent: Friday, 9 March 2007 4:04 AM To: CF-Talk Subject: Coldfusion Server Issues I have been experiencing issues (slowness, high thread counts, constant crashes, etc) on a shared server for about 2 weeks now. I got another server, transferred one site (the largest one) to it...everything seemed to be working fine. The troubled server was running like it should and the new server was running well too. I moved another site from the previously troubled server to the new server today and now i am experiencing problems with the new server. High thread counts, slower, and a crash. Everything seems to be running ok on the new server now...but im afraid its going to crash again. Any ideas what can be causing high thread counts and slowness? ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272059 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: udf var
No need to var arguments. Jaime Metcher -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Wednesday, 7 March 2007 10:05 AM To: CF-Talk Subject: udf var I haven't built a simple udf in forever, but decided to do one for my trimming of formfields. I tried sticking a cfset var form = right above the loop, but I get an error: Cannot declare local variable FORM twice. cfcomponent cffunction name=cleanFormfields access=public returntype=struct cfargument name=form cfloop list=#ARGUMENTS.FORM.fieldnames# index=thisfield cfset FORM[thisfield] = Trim(ARGUMENTS.FORM[thisfield]) /cfloop cfreturn form /cffunction /cfcomponent Am I not supposed to var this one? Thanks, Will ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271817 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Fizzbuzz. Simple programming problems.
Guess. Code it. Show the customer. Only then will you learn the truth - which is not what they said, it's what they thought they said...or what they would have said if they'd thought about it...which until now they haven't, but now they finally have. In this example, there is no customer, so there is no truth. Only a spec, which is an entirely different thing. Jaime Metcher -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: Wednesday, 28 February 2007 11:40 PM To: CF-Talk Subject: RE: Fizzbuzz. Simple programming problems. I think this is a classic case where interpretation can lead to various results. Without concise details about the desires results, a developer can have different views. -Original Message- From: Cutter (CFRelated) [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 28, 2007 8:34 AM To: CF-Talk Subject: Re: Fizzbuzz. Simple programming problems. Which, in a literal since, says that you would print 'Fizz' instead of the number, but print 'Buzz' and 'FizzBuzz' with the number. Cutter _ http://blog.cutterscrossing.com Paul Vernon wrote: snip I don't see anything in the spec that says instead of snip It's on line three below... Here's the specific one he mentioned: Write a program that prints the numbers from 1 to 100. But for multiples of three print Fizz instead of the number. For the multiples of five print Buzz. For numbers which are multiples of both three and five print FizzBuzz. From that I'd say Andy is correct in his interpretation of the requirements. Paul ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271229 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Referencing a CFC above the calling file.
Ben, I think the technique is very cool. I know what you say is true. My old brain keeps slipping back to the days of C and telling me that cfinclude includes the *code* of the included template in the including template. But no, it *calls* the code and includes the *output*. So my C brain says thats twisted - that's a bug - but my CF brain says Cool technique, Ben - wish I'd thought of it. Jaime -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Friday, 9 February 2007 7:17 AM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. Jamie, Twisted. I don't see how. As far as bug. I would say not at all. Many things in ColdFusion are based on a path relative the CURRENT template, NOT the base template path. Creating CFCs is one of them (others being CFInclude paths, CFModule paths). This just uses that architecture to the advantage of child directories. I would say this is not a bug at all. ... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Jaime Metcher [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 06, 2007 7:34 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. Ben, That's quite twisted. I'd even call it a bug. I wish I'd thought of it. This probably doesn't help Andy, but the way I deal with this is to use IIS virtual directories, not CF mappings, and remove all IIS permissions to the virtual directory. This addresses Peter Bell's security concerns - the web server can't see the CFCs under any circumstances, but the CF server will quite happily find them and read them. Jaime Metcher -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, 7 February 2007 9:14 AM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. Andy, I know that you already found a solution, but you might want to ake a peek at this one. I never used mapped paths and here is a solution that I have used before: http://www.bennadel.com/blog/348-Creating-ColdFusion-Components-In-Paren t-Directories-From-Sub-Directories-Without-Mapped-Paths.htm OR: http://www.bennadel.com/index.cfm?dax=blog:348.view Just thought you might be curious... . Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 2:55 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. That's what I needed Doug. Thanks a lot for finding it! andy -Original Message- From: Doug Bezona [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 1:49 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. No, it's quite relevant. From the docs: If you use a cfinvoke or cfobject tag, or the CreateObject function, to access the CFC from a CFML page, ColdFusion searches directories in the following order: 1. Local directory of the calling CFML page 2. Web root 3. Directories specified on the Custom Tag Paths page of ColdFusion MX Administrator Note #2 - if it doesn't find it in the directory of the calling page, it next starts at the web root and works from there. If the component is outside of the web root, you're out of luck without a mapping - you can't do the equivalent of ../. All of the lookups are forward only. -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 2:36 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. Well, it's sort of irrelevant that it's outside the web root (or is it). The important thing is that the CFC exists ABOVE the calling page. How can you create a path using dot notation to a file that's above your calling page? ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269236 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Referencing a CFC above the calling file.
Ben, That's quite twisted. I'd even call it a bug. I wish I'd thought of it. This probably doesn't help Andy, but the way I deal with this is to use IIS virtual directories, not CF mappings, and remove all IIS permissions to the virtual directory. This addresses Peter Bell's security concerns - the web server can't see the CFCs under any circumstances, but the CF server will quite happily find them and read them. Jaime Metcher -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Wednesday, 7 February 2007 9:14 AM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. Andy, I know that you already found a solution, but you might want to ake a peek at this one. I never used mapped paths and here is a solution that I have used before: http://www.bennadel.com/blog/348-Creating-ColdFusion-Components-In-Paren t-Directories-From-Sub-Directories-Without-Mapped-Paths.htm OR: http://www.bennadel.com/index.cfm?dax=blog:348.view Just thought you might be curious... ... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 2:55 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. That's what I needed Doug. Thanks a lot for finding it! andy -Original Message- From: Doug Bezona [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 1:49 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. No, it's quite relevant. From the docs: If you use a cfinvoke or cfobject tag, or the CreateObject function, to access the CFC from a CFML page, ColdFusion searches directories in the following order: 1. Local directory of the calling CFML page 2. Web root 3. Directories specified on the Custom Tag Paths page of ColdFusion MX Administrator Note #2 - if it doesn't find it in the directory of the calling page, it next starts at the web root and works from there. If the component is outside of the web root, you're out of luck without a mapping - you can't do the equivalent of ../. All of the lookups are forward only. -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 2:36 PM To: CF-Talk Subject: RE: Referencing a CFC above the calling file. Well, it's sort of irrelevant that it's outside the web root (or is it). The important thing is that the CFC exists ABOVE the calling page. How can you create a path using dot notation to a file that's above your calling page? ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268921 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: moving from CF 4.5 to 7.0
There's an Adobe document called cfmx7_migrating.pdf. We basically just worked through it. Every issue we had was described in this document - things like cfmail, cfdirectory, TimeFormat etc. I might add we only needed a dozen changes in several thousand modules. The only thing we found hard to find by examining the code was the change in the structure dot notation handling - in 4.5 if you forgot to do a StructNew(), then cfset a.b = c, you end up with a variable whose name is a.b. In 6 7 you get an error telling you a is not a struct. Let me know if you want me to email you a copy of the document. Jaime Metcher -Original Message- From: Nathan C. Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, 6 February 2007 8:31 AM To: CF-Talk Subject: RE: moving from CF 4.5 to 7.0 I'm in the process of doing this now. And 4.0 to 6.1 before that - on another box. For the most part the update is going well. I have a few niggling details with how variables are referenced, but that has been the biggest issue to date. The code-scanner in the administrator can be helpful but it will not catch everything. It will probably depend a lot on how many less obscure features you use too - if any. The one that reads and writes windows registry is the one that comes to mind. -Nate -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 3:15 PM To: CF-Talk Subject: RE: moving from CF 4.5 to 7.0 No personal experience, but I think the info you find about 4.5 to MX or especially 6.1 would translate well. I think 7.0 was mostly about adding features and fixing bugs, not a big rewrite of the code base. Mark -Original Message- From: So Kenfused [mailto:[EMAIL PROTECTED] Sent: Monday, February 05, 2007 2:49 PM To: CF-Talk Subject: moving from CF 4.5 to 7.0 Just started a new job and they are looking at moving from CF 4.5 to CF7. We do have a Dev box, so we can play a little before doing it on the production boxes. I'm finding several posts about going from 4.5 to 5, or MX and the issues people ran into however, I am wondering if anyone who has made the jump from 4.5 to 7 can provide details to any issues they might have experienced. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268766 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Eclipse/CFEclipse problem???
Maybe unrelated, but there is a current issue with cfscript that produces these symptoms. http://trac.cfeclipse.org/cfeclipse/report/1 Jaime Metcher -Original Message- From: Jason Holden [mailto:[EMAIL PROTECTED] Sent: Monday, 5 February 2007 8:35 AM To: CF-Talk Subject: Re: Eclipse/CFEclipse problem??? I'm having a small problem with Eclipse/CFEclipse. Anytime I type the world parent into the editor it causes Eclipse to freeze. javaw.exe pegs my CPU at 100% and I have to forcefully kill the process and restart Eclipse. Has anyone else had this problem? UPDATE: This is not just associated with typing parent, i guess it was just a coiencedence that it happened each time. I'm trying edit javascript and after a few minutes of editing the Eclipse IDE becomes unstable and javaw.exe uses 100% of the CPU. ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268618 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4