Re: JVM configuration Problem

2011-04-06 Thread Carl Meyer

Perhaps NewGen perhaps PermGen. What does JVM logging that is partly enabled 
indicate? What JVM version? It is JRun that is CPU bound?

You have some very specific JVM arguments there. Couple things I note with New 
/ Young Generation and Permanent Generation. Sometimes with a largish initial 
heap memory configuration ie bigger than 1Gb (Xms) I have seen Java not settle 
to a good workable value, you may do well to specify a size. The value depends, 
you could try -Xmn148m. There is no setting for initial Permanent Generation so 
you could add –XX:PermSize=192m .

JVM logging seems to be partly there (-XX:+PrintGCDetails 
-XX:+PrintGCTimeStamps) – what is your thoughts on the two logging switches 
without the output to a log file (eg -XX:+PrintGCDetails -XX:+PrintGCTimeStamps 
-XX:+PrintHeapAtGC -verbose:gc -Xloggc:cfjvmGC.log)?

I guess you are on CF9.0.1 64 bit? Would that be JVM version 1.6.0_17?

HTH, Carl.


> My CPU is running almost 100%. I am using windows 7 64 bit 6G ram. I 
> have the following arguments set but it is still slow.
> 
> Please help
> 
> java.args=-server  -Xms1224m -Xmx1224m -Dsun.io.useCanonCaches=false 
> -XX:MaxPermSize=250m -XX:TargetSurvivorRatio=50 
> -XX:+UseConcMarkSweepGC -XX:CompileThreshold=1 -XX:+UseParNewGC 
> -XX:+CMSIncrementalMode  -XX:+AggressiveOpts -XX:ThreadStackSize=128k 
> -XX:+DisableExplicitGC -XX:CMSInitiatingOccupancyFraction=80  
> -Dcoldfusion.classPath={application.home}/../lib/updates,{application.
> home}/../lib,{application.home}/../gateway/lib/,{application.home}/..
> /wwwroot/WEB-INF/flex/jars,{application.home}/..
> /wwwroot/WEB-INF/cfform/jars
> -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xbatch -Dcoldfusion.
> rootDir={application.home}/../ -Dcoldfusion.libPath={application.
> home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,
> {application.home}/../lib,{application.home}/../gateway/lib/,
> {application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/..
> /wwwroot/WEB-INF/cfform/jars 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343593
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Storing Arrays or Structures in a database

2011-04-06 Thread denstar

I was mostly just being pedantic.  :)  It works fine out of the box
most the time.  And for the rest of the time, there's json.cfc, as
Andrew mentioned.  :)

No joke that it's way better than WDDX.  Three cheers for JSON!  Hip, hip, hip!

:den "the pelvis" uno

-- 
It is veneer, rouge, aestheticism, art museums, new theaters, etc.
that make America impotent. The good things are football, kindness,
and jazz bands.
George Santayana

On Wed, Apr 6, 2011 at 6:33 PM, Michael Grant wrote:
>
> Given. I have a tendency to always use parseInt anyway, so I don't generally
> suffer that woe.
> However your point is well taken... a teeny bit of fuss, with a pinch of
> muss.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343592
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Storing Arrays or Structures in a database

2011-04-06 Thread Michael Grant

Given. I have a tendency to always use parseInt anyway, so I don't generally
suffer that woe.
However your point is well taken... a teeny bit of fuss, with a pinch of
muss.


On Wed, Apr 6, 2011 at 8:12 PM, denstar  wrote:

>
> On Wed, Apr 6, 2011 at 5:54 PM, Michael Grant wrote:
> >
> > And you can pass it back and forth between cf and js with no fuss or
> muss.
> >
>
> Well, besides the weird "is it a string or a number" type of deal that
> can change 8 to 8.0 and a few other oddities.  ;)
>
> :Den
>
> --
> It is easier to make a saint out of a libertine than out of a prig.
> George Santayana
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343591
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Storing Arrays or Structures in a database

2011-04-06 Thread Andrew Scott

Well I prefer the json.cfc that has been floating around for a while, it
doesn't suffer those problems.

Regards,
Andrew Scott
http://www.andyscott.id.au/


> -Original Message-
> From: denstar [mailto:valliants...@gmail.com]
> Sent: Thursday, 7 April 2011 10:12 AM
> To: cf-talk
> Subject: Re: Storing Arrays or Structures in a database
> 
> Well, besides the weird "is it a string or a number" type of deal that can
> change 8 to 8.0 and a few other oddities.  ;)
> 
> :Den
> 
> --


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343590
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Storing Arrays or Structures in a database

2011-04-06 Thread denstar

On Wed, Apr 6, 2011 at 5:54 PM, Michael Grant wrote:
>
> And you can pass it back and forth between cf and js with no fuss or muss.
>

Well, besides the weird "is it a string or a number" type of deal that
can change 8 to 8.0 and a few other oddities.  ;)

:Den

-- 
It is easier to make a saint out of a libertine than out of a prig.
George Santayana

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343589
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Storing Arrays or Structures in a database

2011-04-06 Thread Michael Grant

And you can pass it back and forth between cf and js with no fuss or muss.

On Wed, Apr 6, 2011 at 6:09 PM, Andrew Scott wrote:

>
> If anyone is on ColdFusion 8+ then instead of wddx one might use Json
> instead, as it has a smaller footprint than WDDX does.
>
> Regards,
> Andrew Scott
> http://www.andyscott.id.au/
>
> > -Original Message-
> > From: Jeff Garza [mailto:j...@garzasixpack.com]
> > Sent: Thursday, 7 April 2011 8:10 AM
> > To: cf-talk
> > Subject: RE: Storing Arrays or Structures in a database
> >
> >
> > True.  I used wddx to serialize some multidimensional arrays just the
> other
> > day...
> >
> > Jeff
> >
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343588
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Storing Arrays or Structures in a database

2011-04-06 Thread Andrew Scott

If anyone is on ColdFusion 8+ then instead of wddx one might use Json
instead, as it has a smaller footprint than WDDX does.

Regards,
Andrew Scott
http://www.andyscott.id.au/

> -Original Message-
> From: Jeff Garza [mailto:j...@garzasixpack.com]
> Sent: Thursday, 7 April 2011 8:10 AM
> To: cf-talk
> Subject: RE: Storing Arrays or Structures in a database
> 
> 
> True.  I used wddx to serialize some multidimensional arrays just the
other
> day...
> 
> Jeff
> 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343587
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Storing Arrays or Structures in a database

2011-04-06 Thread Jeff Garza

True.  I used wddx to serialize some multidimensional arrays just the other
day...

Jeff 

-Original Message-
From: Bobby Hartsfield [mailto:bo...@acoderslife.com] 
Sent: Wednesday, April 06, 2011 2:39 PM
To: cf-talk
Subject: RE: Storing Arrays or Structures in a database


Assuming you are dealing with one dimensional arrays, sure, converting it to
a list could work.

.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com

-Original Message-
From: Jeff Garza [mailto:j...@garzasixpack.com]
Sent: Wednesday, April 06, 2011 2:02 PM
To: cf-talk
Subject: RE: Storing Arrays or Structures in a database


Arrays are easy as you can simply use Arraytolist() to convert it to a
delimited text string and then use ListtoArray() to convert back once you
get it out.  Though, CF has some really nice list functions, so you might
not even have to do that.  Also, select boxes return comma separated lists
back to CF when a form is submitted (ditto for checkboxes with the same
name)... So that might work in your favor.  

For structures though, WDDX is your friend, and quite easy to do...

Try 

Then stuff workweekXML into the database field.

When you retrieve the data back out of the database, use cfwddx again to
convert back to a CF structure



Just make sure that your db field can handle a decent sized chunk of data,
especially if  you are allowing user defined data in this column as the WDDX
format can get kinda bloated.


-Original Message-
From: Adam Bourg [mailto:adam.bo...@gmail.com] 
Sent: Wednesday, April 06, 2011 10:41 AM
To: cf-talk
Subject: Storing Arrays or Structures in a database


I've got really large sets of data that are related to each day of the week
and the hour. Rather then creating a massive table containing these values,
I have stored them in a Structure, but I can't seem to get Structures or
Arrays to insert into a database. How can I store an array or structure in a
MS 2008 SQL server? 

Array Code: 



// 7 days, day 0 = Mon, Day 7 = sun
workWeek=["t","t","f","t","f","t","f"];


 






 INSERT INTO
mod_employmentAppProfile(
name, 
workWeekendsEvenings
)
VALUES ( 
#ARGUMENTS.name#,
#ARGUMENTS.workWeek#
)










~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343586
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Storing Arrays or Structures in a database

2011-04-06 Thread Bobby Hartsfield

Assuming you are dealing with one dimensional arrays, sure, converting it to
a list could work.

.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com

-Original Message-
From: Jeff Garza [mailto:j...@garzasixpack.com] 
Sent: Wednesday, April 06, 2011 2:02 PM
To: cf-talk
Subject: RE: Storing Arrays or Structures in a database


Arrays are easy as you can simply use Arraytolist() to convert it to a
delimited text string and then use ListtoArray() to convert back once you
get it out.  Though, CF has some really nice list functions, so you might
not even have to do that.  Also, select boxes return comma separated lists
back to CF when a form is submitted (ditto for checkboxes with the same
name)... So that might work in your favor.  

For structures though, WDDX is your friend, and quite easy to do...

Try 

Then stuff workweekXML into the database field.

When you retrieve the data back out of the database, use cfwddx again to
convert back to a CF structure



Just make sure that your db field can handle a decent sized chunk of data,
especially if  you are allowing user defined data in this column as the WDDX
format can get kinda bloated.


-Original Message-
From: Adam Bourg [mailto:adam.bo...@gmail.com] 
Sent: Wednesday, April 06, 2011 10:41 AM
To: cf-talk
Subject: Storing Arrays or Structures in a database


I've got really large sets of data that are related to each day of the week
and the hour. Rather then creating a massive table containing these values,
I have stored them in a Structure, but I can't seem to get Structures or
Arrays to insert into a database. How can I store an array or structure in a
MS 2008 SQL server? 

Array Code: 



// 7 days, day 0 = Mon, Day 7 = sun
workWeek=["t","t","f","t","f","t","f"];


 






 INSERT INTO
mod_employmentAppProfile(
name, 
workWeekendsEvenings
)
VALUES ( 
#ARGUMENTS.name#,
#ARGUMENTS.workWeek#
)








~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343585
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Storing Arrays or Structures in a database

2011-04-06 Thread Bobby Hartsfield

Just talked about this today with a colleague. Convert it to JSON and store
that. When you need to use it, get it from the database and "deseralize" it.

.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com

-Original Message-
From: Adam Bourg [mailto:adam.bo...@gmail.com] 
Sent: Wednesday, April 06, 2011 1:41 PM
To: cf-talk
Subject: Storing Arrays or Structures in a database


I've got really large sets of data that are related to each day of the week
and the hour. Rather then creating a massive table containing these values,
I have stored them in a Structure, but I can't seem to get Structures or
Arrays to insert into a database. How can I store an array or structure in a
MS 2008 SQL server? 

Array Code: 

 

// 7 days, day 0 = Mon, Day 7 = sun
workWeek=["t","t","f","t","f","t","f"];


 







INSERT INTO mod_employmentAppProfile(
name, 
workWeekendsEvenings
)
VALUES ( 
#ARGUMENTS.name#,
#ARGUMENTS.workWeek#
) 






~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343584
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Referencing Variables

2011-04-06 Thread Bobby Hartsfield

Nope. Just like the error says, you need a constant value for the
returntype. Variables are not allowed.

.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com

-Original Message-
From: Hunsaker, Michael Scott [mailto:mhuns...@indiana.edu] 
Sent: Wednesday, April 06, 2011 2:38 PM
To: cf-talk
Subject: Referencing Variables


Hello -

I hope someone can shed some light on this... and if it's possible.  Here is
a small chunk of code:


  


In the "returntype", I would like to reference a variable instead of
hardcode the component reference.  So, I would like to end up with this:


  


I get an error of "This expression must have a constant value."  Is this
possible?  I would appreciate any help!

Mike

Mike Hunsaker
Systems Analysis Application Development
Kelley School of Business
Bloomington, IN 47405-1703
mhuns...@indiana.edu
(812) 855-7024





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343583
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


loss of session vars if url is rewriten - cf9, jBoss

2011-04-06 Thread Morchella Deliciosa

Hey guys. Long time no post. Any help and or advice would be greatly 
appreciated. i will respond as time allows.
this one has got me scratching my head.
Upgrading from cf 7 to 9. from webSphere to jBoss.

jboss-5.0.1.GA, apache2-2.2.10-2.24.5 
Jboss one box Apache on another..

if we use default (long and ugly) url our sessions are fine and persist.
if we re-write the url to make it pretty, before it hits the browser then we 
loose scope.

I know this has got to work for thousands of other apps...

---
###newest working
RewriteCond %{SERVER_NAME}= ^(.*)(cda-dev)
RewriteCond %{REQUEST_URI}= !^Rule_1
RewriteCond %{REQUEST_URI}= !^/cfmx02/(.*)
RewriteCond %{REQUEST_URI}= ^/=
RewriteRule ^/(.*) /cfmx02/cda/ [PT,QSA,L]

RewriteCond %{SERVER_NAME}= ^(.*)(cda-dev)
RewriteCond %{REQUEST_URI}= !^Rule_2
RewriteCond %{REQUEST_URI}= !^/cfmx02/(.*)
RewriteCond %{REQUEST_URI}= !^/server-status(.*)
RewriteCond %{REQUEST_URI}= !^/jmx-console/(.*)
RewriteCond %{REQUEST_URI}= ^/(.*)$
RewriteRule ^/(.*) /cfmx02/cda/$1 [PT,QSA,L]

JkMount /jmx-console/* jmx_console
JkMount /cfmx02/* load_balancer

---
System Information
Server Details
Server Product  ColdFusion
Version 9,0,1,274733  
Edition Enterprise  
Operating SystemUNIX  
OS Version  2.6.32.27-0.2-default  
Adobe Driver Version4.0 (Build 0005)  
---
application.cfm




  
  


  



---

Thanks! 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343582
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


JVM configuration Problem

2011-04-06 Thread erik tom

My CPU is running almost 100%. I am using windows 7 64 bit 6G ram. I have the 
following arguments set but it is still slow.

Please help

java.args=-server  -Xms1224m -Xmx1224m -Dsun.io.useCanonCaches=false 
-XX:MaxPermSize=250m -XX:TargetSurvivorRatio=50 -XX:+UseConcMarkSweepGC 
-XX:CompileThreshold=1 -XX:+UseParNewGC -XX:+CMSIncrementalMode  
-XX:+AggressiveOpts -XX:ThreadStackSize=128k -XX:+DisableExplicitGC 
-XX:CMSInitiatingOccupancyFraction=80  
-Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars
-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xbatch 
-Dcoldfusion.rootDir={application.home}/../ 
-Dcoldfusion.libPath={application.home}/../lib 
-Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343581
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Storing Arrays or Structures in a database

2011-04-06 Thread John Blayter

Another way to do it is to serialize the object in a base64 string.
I've had some great success using this method to persist complex
objects to the database.


function serializeObject(object){
var local   = structNew();
local.byteOut   = createObject("java", "java.io.ByteArrayOutputStream");
local.byteOut.init();
local.objOut= createObject("java", "java.io.ObjectOutputStream");
local.objOut.init(local.byteOut);
local.objOut.writeObject(arguments.object);
local.objOut.close();
return toBase64(local.byteOut.toByteArray());
}

function deserializeObject(objectString){
var local = structNew();
local.inputStream = createObject("java", 
"java.io.ByteArrayInputStream");
local.objIn = createObject("java", "java.io.ObjectInputStream");
local.returnObj = "";
local.inputStream.init(toBinary(arguments.objectString));
local.objIn.init(local.inputStream);
local.returnObj = local.objIn.readObject();
local.objIn.close();
return local.returnObj;
}


I've been using this in http://sessionswap.riaforge.org/ for a long time.


John Blayter
Land line: 303.731.3009
Mobile: 303.325.1979
http://www.blayter.com/john/

Denver ColdFusion User Group Manager
http://denvercfug.org/



On Wed, Apr 6, 2011 at 12:02 PM, Jeff Garza  wrote:
>
> Arrays are easy as you can simply use Arraytolist() to convert it to a
> delimited text string and then use ListtoArray() to convert back once you
> get it out.  Though, CF has some really nice list functions, so you might
> not even have to do that.  Also, select boxes return comma separated lists
> back to CF when a form is submitted (ditto for checkboxes with the same
> name)... So that might work in your favor.
>
> For structures though, WDDX is your friend, and quite easy to do...
>
> Try 
>
> Then stuff workweekXML into the database field.
>
> When you retrieve the data back out of the database, use cfwddx again to
> convert back to a CF structure
>
>  output="localStructVariable">
>
> Just make sure that your db field can handle a decent sized chunk of data,
> especially if  you are allowing user defined data in this column as the WDDX
> format can get kinda bloated.
>
>
> -Original Message-
> From: Adam Bourg [mailto:adam.bo...@gmail.com]
> Sent: Wednesday, April 06, 2011 10:41 AM
> To: cf-talk
> Subject: Storing Arrays or Structures in a database
>
>
> I've got really large sets of data that are related to each day of the week
> and the hour. Rather then creating a massive table containing these values,
> I have stored them in a Structure, but I can't seem to get Structures or
> Arrays to insert into a database. How can I store an array or structure in a
> MS 2008 SQL server?
>
> Array Code:
>
> 
> 
> // 7 days, day 0 = Mon, Day 7 = sun
> workWeek=["t","t","f","t","f","t","f"];
> 
>
> 
>        
>    
> 
>
>  hint="Injects the Employee App form data">
>
>  INSERT INTO
> mod_employmentAppProfile(
>        name,
>        workWeekendsEvenings
> )
> VALUES (
>        #ARGUMENTS.name#,
>    #ARGUMENTS.workWeek#
> )
> 
>
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343580
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Referencing Variables

2011-04-06 Thread Matt Quackenbush

No, that is not possible.  Nor would you want it to be.  If you are
returning an object, then set returntype="any".  If you are returning a
string, set it to returntype="string".


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343579
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Referencing Variables

2011-04-06 Thread Hunsaker, Michael Scott

Hello -

I hope someone can shed some light on this... and if it's possible.  Here is a 
small chunk of code:


  


In the "returntype", I would like to reference a variable instead of hardcode 
the component reference.  So, I would like to end up with this:


  


I get an error of "This expression must have a constant value."  Is this 
possible?  I would appreciate any help!

Mike

Mike Hunsaker
Systems Analysis Application Development
Kelley School of Business
Bloomington, IN 47405-1703
mhuns...@indiana.edu
(812) 855-7024



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343578
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Storing Arrays or Structures in a database

2011-04-06 Thread Carl Von Stetten

Keep in mind that WDDX adds quite a bit of extra "stuff" around your 
data as compared to JSON.  For example, take this ColdFusion array:



Here is the serialized JSON version:

["John","Paul","George","Ringo"]

Here is the WDDX version:

JohnPaulGeorgeRingo

The larger the array or structure, the bigger the "bloat" from WDDX, and 
the more database space required to store it.  This needs to be 
considered when designing your database columns.

HTH,
Carl

On 4/6/2011 10:52 AM, Michael Grant wrote:
> Serialize them as JSON or WDDX and store them as text.
>
> On Wed, Apr 6, 2011 at 1:41 PM, Adam Bourg  wrote:
>
>> I've got really large sets of data that are related to each day of the week
>> and the hour. Rather then creating a massive table containing these values,
>> I have stored them in a Structure, but I can't seem to get Structures or
>> Arrays to insert into a database. How can I store an array or structure in a
>> MS 2008 SQL server?
>>
>> Array Code:
>>
>> 
>> 
>> // 7 days, day 0 = Mon, Day 7 = sun
>> workWeek=["t","t","f","t","f","t","f"];
>> 
>>
>> 
>> 
>> 
>> 
>>
>> > hint="Injects the Employee App form data">
>>
>> 
>> INSERT INTO mod_employmentAppProfile(
>> name,
>> workWeekendsEvenings
>> )
>> VALUES (
>> #ARGUMENTS.name#,
>> #ARGUMENTS.workWeek#
>> )
>> 
>>
>>
>>
>>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343577
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Storing Arrays or Structures in a database

2011-04-06 Thread Jeff Garza

Arrays are easy as you can simply use Arraytolist() to convert it to a
delimited text string and then use ListtoArray() to convert back once you
get it out.  Though, CF has some really nice list functions, so you might
not even have to do that.  Also, select boxes return comma separated lists
back to CF when a form is submitted (ditto for checkboxes with the same
name)... So that might work in your favor.  

For structures though, WDDX is your friend, and quite easy to do...

Try 

Then stuff workweekXML into the database field.

When you retrieve the data back out of the database, use cfwddx again to
convert back to a CF structure



Just make sure that your db field can handle a decent sized chunk of data,
especially if  you are allowing user defined data in this column as the WDDX
format can get kinda bloated.


-Original Message-
From: Adam Bourg [mailto:adam.bo...@gmail.com] 
Sent: Wednesday, April 06, 2011 10:41 AM
To: cf-talk
Subject: Storing Arrays or Structures in a database


I've got really large sets of data that are related to each day of the week
and the hour. Rather then creating a massive table containing these values,
I have stored them in a Structure, but I can't seem to get Structures or
Arrays to insert into a database. How can I store an array or structure in a
MS 2008 SQL server? 

Array Code: 



// 7 days, day 0 = Mon, Day 7 = sun
workWeek=["t","t","f","t","f","t","f"];


 






 INSERT INTO
mod_employmentAppProfile(
name, 
workWeekendsEvenings
)
VALUES ( 
#ARGUMENTS.name#,
#ARGUMENTS.workWeek#
)






~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343576
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


re: Storing Arrays or Structures in a database

2011-04-06 Thread Jason Fisher

Serialize with WDDX or JSON, I would say.  Those are complex variable types 
which need to be serialized into strings before insertion into a DB.



From: "Adam Bourg" 
Sent: Wednesday, April 06, 2011 1:49 PM
To: "cf-talk" 
Subject: Storing Arrays or Structures in a database

I've got really large sets of data that are related to each day of the week 
and the hour. Rather then creating a massive table containing these values, 
I have stored them in a Structure, but I can't seem to get Structures or 
Arrays to insert into a database. How can I store an array or structure in 
a MS 2008 SQL server? 

Array Code: 

 

// 7 days, day 0 = Mon, Day 7 = sun
workWeek=["t","t","f","t","f","t","f"];


 







INSERT INTO mod_employmentAppProfile(
name, 
workWeekendsEvenings
)
VALUES ( 
#ARGUMENTS.name#,
#ARGUMENTS.workWeek#
) 




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343575
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Storing Arrays or Structures in a database

2011-04-06 Thread John M Bliss



On Wed, Apr 6, 2011 at 12:41 PM, Adam Bourg  wrote:

>
> I've got really large sets of data that are related to each day of the week
> and the hour. Rather then creating a massive table containing these values,
> I have stored them in a Structure, but I can't seem to get Structures or
> Arrays to insert into a database. How can I store an array or structure in a
> MS 2008 SQL server?
>
> Array Code:
>
> 
> 
> // 7 days, day 0 = Mon, Day 7 = sun
> workWeek=["t","t","f","t","f","t","f"];
> 
>
> 
>
>
> 
>
>  hint="Injects the Employee App form data">
>
> 
> INSERT INTO mod_employmentAppProfile(
>name,
>workWeekendsEvenings
> )
> VALUES (
>#ARGUMENTS.name#,
>#ARGUMENTS.workWeek#
> )
> 
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343574
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Storing Arrays or Structures in a database

2011-04-06 Thread Michael Grant

Serialize them as JSON or WDDX and store them as text.

On Wed, Apr 6, 2011 at 1:41 PM, Adam Bourg  wrote:

>
> I've got really large sets of data that are related to each day of the week
> and the hour. Rather then creating a massive table containing these values,
> I have stored them in a Structure, but I can't seem to get Structures or
> Arrays to insert into a database. How can I store an array or structure in a
> MS 2008 SQL server?
>
> Array Code:
>
> 
> 
> // 7 days, day 0 = Mon, Day 7 = sun
> workWeek=["t","t","f","t","f","t","f"];
> 
>
> 
>
>
> 
>
>  hint="Injects the Employee App form data">
>
> 
> INSERT INTO mod_employmentAppProfile(
>name,
>workWeekendsEvenings
> )
> VALUES (
>#ARGUMENTS.name#,
>#ARGUMENTS.workWeek#
> )
> 
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343573
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Storing Arrays or Structures in a database

2011-04-06 Thread Adam Bourg

I've got really large sets of data that are related to each day of the week and 
the hour. Rather then creating a massive table containing these values, I have 
stored them in a Structure, but I can't seem to get Structures or Arrays to 
insert into a database. How can I store an array or structure in a MS 2008 SQL 
server? 

Array Code: 

 

// 7 days, day 0 = Mon, Day 7 = sun
workWeek=["t","t","f","t","f","t","f"];


 







INSERT INTO mod_employmentAppProfile(
name, 
workWeekendsEvenings
)
VALUES ( 
#ARGUMENTS.name#,
#ARGUMENTS.workWeek#
) 




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343572
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Solr Errors

2011-04-06 Thread Raymond Camden

There was definitely fixes for Solr indexing, which I don't
necessarily think will help you, but as a general rule I tend to
recommend getting up to the latest/greatest.


On Wed, Apr 6, 2011 at 8:36 AM, Mary Jo Sminkey  wrote:
>
>>Well, technically yes - there was a CHF after 901.
>
> Sorry, I meant for Solr in particular. I can try the hot fix (don't recall if 
> I installed it or not) but I'm not seeing anything listed that would effect 
> Solr:
>
> http://kb2.adobe.com/cps/862/cpsid_86263.html
>
>
> MJS
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343571
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Solr Errors

2011-04-06 Thread Mary Jo Sminkey

>Well, technically yes - there was a CHF after 901.

Sorry, I meant for Solr in particular. I can try the hot fix (don't recall if I 
installed it or not) but I'm not seeing anything listed that would effect Solr:

http://kb2.adobe.com/cps/862/cpsid_86263.html


MJS 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343570
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm