tag:blogger.com,1999:blog-30202438209389594322024-02-10T03:52:18.230-06:00Code Fusion - All purpose Symbolic Instruction CodeDiscussions on ColdFusion, Flex, Web Architecture and other technologies that power the web, our minds, and our lives.Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-3020243820938959432.post-75301138770858022262012-11-09T23:09:00.003-06:002012-11-09T23:09:50.185-06:00ActiveMQ 5.3 vs. 5.7I have been reviewing the latest features of <a href="http://activemq.apache.org/" target="_blank">ActiveMQ</a> 5.7. There are features in 5.7 that are not in the 5.3 version that I'm most familiar with.<br />
Features like:<br />
<ul>
<li>Message Priority</li>
<li>Web Sockets</li>
<li>Delay and Schedule Message Delivery</li>
<li>Cluster and Failover </li>
<li><a href="http://activemq.apache.org/new-features.html" target="_blank">more</a></li>
</ul>
I did some comparisons of ActiveMQ version <b>5.3</b> vs. <b>5.7</b> on the following local machine:<br />
Intel Core i7 Q720 @ 1.6GHz with 8gb ram on 64 bit Windows 7 Ultimate.<br />
<br />
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Verdana, sans-serif; font-size: 13.63636302947998px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 0px; margin-right: 1.5em; margin-top: 1.5em; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<strong>Scenario 1</strong>: Producing and Consuming small 'hi' test messages of the amount of 10K on<span class="Apple-converted-space"> </span><strong>5.7</strong><span class="Apple-converted-space"> </span>ActiveMQ versions locally using ONE consumer with<span class="Apple-converted-space"> </span><strong>transacted<span class="Apple-converted-space"> </span></strong>messages (activemq-all-5.7.0.jar).</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Verdana, sans-serif; font-size: 13.63636302947998px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 0px; margin-right: 1.5em; margin-top: 1.5em; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<strong>Scenario 2</strong>: Producing and Consuming small 'hi' test messages of the amount of 10K on<span class="Apple-converted-space"> </span><strong>5.3<span class="Apple-converted-space"> </span></strong>ActiveMQ versions locally using ONE consumer with<span class="Apple-converted-space"> </span><strong>transacted<span class="Apple-converted-space"> </span></strong>messages. (activemq-all-5.3.0.jar)</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Verdana, sans-serif; font-size: 13.63636302947998px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 0px; margin-right: 1.5em; margin-top: 1.5em; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<strong>Scenario 3</strong>: Producing and Consuming small 'hi' test messages of the amount of 10K on <strong>5.7 </strong>ActiveMQ versions locally using ONE consumer with<span class="Apple-converted-space"> </span><strong>NON<span class="Apple-converted-space"> </span></strong>transacted messages. (activemq-all-5.7.0.jar)Results:</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Verdana, sans-serif; font-size: 13.63636302947998px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 0px; margin-right: 1.5em; margin-top: 1.5em; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<strong>Scenario 4</strong>: Producing and Consuming small 'hi' test messages of the amount of 10K on <strong>5.3 </strong>ActiveMQ versions locally using ONE consumer with<span class="Apple-converted-space"> </span><strong>NON<span class="Apple-converted-space"> </span></strong>transacted messages. (activemq-all-5.3.0.jar)Results:</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Verdana, sans-serif; font-size: 13.63636302947998px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 0px; margin-right: 1.5em; margin-top: 1.5em; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<table border="1" cellpadding="1" cellspacing="1" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Verdana, sans-serif; font-size: 13.63636302947998px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; overflow: auto; table-layout: fixed; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; width: 610.9090576171875px; word-spacing: 0px;"><tbody>
<tr><td style="background-color: lightgrey;">Transacted</td><td style="background-color: lightgrey;">Producing 10,000 Messages</td><td style="background-color: lightgrey;">Consuming 10,000 Messages</td><td style="background-color: lightgrey;">Active MQ Version</td></tr>
<tr><td><span style="line-height: 16.799999237060547px;">Scenario 1 </span></td><td><span style="background-color: yellow;">1.8 Seconds (avg)</span></td><td>113 Seconds (avg)</td><td>5.7</td></tr>
<tr><td>Scenario 2 </td><td>2.8 Seconds (avg)</td><td style="background-color: yellow;">110 Seconds (avg)</td><td><span class="Apple-converted-space"></span><span style="background-color: paleturquoise;"></span>5.3</td></tr>
<tr><td style="background-color: lightgrey;">Non-Transacted</td><td style="background-color: lightgrey;"> </td><td style="background-color: lightgrey;"> </td><td style="background-color: lightgrey;"> </td></tr>
<tr><td>Scenario 3 </td><td>2.8 Seconds (avg)</td><td>12.3 Seconds (avg)</td><td>5.7</td></tr>
<tr><td>Scenario 4 </td><td><span style="background-color: yellow;">2.0 Seconds (avg)</span></td><td style="background-color: yellow;">9.3 Seconds (avg)</td><td><span style="background-color: paleturquoise;"></span><span style="background-color: paleturquoise;"></span>5.3</td></tr>
</tbody></table>
<br />
<br class="Apple-interchange-newline" />
<b>Conclusion</b>: Speed isn't sufficient enough to warrant an upgrade in this case as they both are basically running at the same pace, however the most interesting part I saw here was the speed differences between Transacted messages (slower) and Non-Transacted Messages. By a multiplier of about 10X, transacted message consumption through the ColdFusion Gateway slows down. Its worth asking yourself "Can I handle a loss of messages?" at this speed difference.<br />
<br class="Apple-interchange-newline" />
The stability of the two of them should be similar but we will have a chance to put 5.7 to the test soon enough. If you're seeing some strange issues in production like we are where ActiveMQ gets into a 'stalled' state where its neither producing, nor allowing consumption of messages in it's queues, you are not alone. I've seen graphs that have shown ActiveMQ in this state and a restart is the only thing that brought it back to life (5.3). After churning through millions of messages a day, I'd guess something might hit a breaking point, but hopefully 5.7 will give us a bit more stability over the long haul. Better monitoring of the queue counts need to be in place for us to reliably use 5.3 now, however I like it for it's features, ease of use and integration with ColdFusion (thanks <a href="http://www.corfield.org/blog/post.cfm/ColdFusion_8_and_ActiveMQ_JMS" target="_blank">Sean Corfield </a>for the Gateway and Documentation!).Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0tag:blogger.com,1999:blog-3020243820938959432.post-61202481011620489772012-11-09T22:37:00.000-06:002012-11-09T23:13:10.283-06:00Hung Threads using ActiveMQ and ColdFusionI have been working with the ActiveMQ gateway for years now, and I just had to dig deeper as we encounter odd states with ActiveMQ over time in production. After starting and stopping a cfGateway in the cfadmin 2x, I do a thread dump on the server and see that there are 4 threads that have been generated as a result. The more times you start/stop, the more threads seem to stick around indefinitely (forever from what I see). Is it possible there's some leak here or close not being properly called through cfadmin to Gateway? I'm using cf9 local dev and activemq 5.7 but 5.3 also suffers from the same thing (threads pile up on start/stop). At times I've also seen the Consumer Count not match the number of consumers that should be listed using ActiveMQ 5.3 and cf8 i.e. if there are 16 consumers, I've seen 32. I shut the 16 off, and 16 still remain as 'registered' consumers (which may tell me that these background threads are alive, yet dead, as they typically never take any messages.<br />
<br />
Thread Dump:<br />
<br />
<a href="http://3.bp.blogspot.com/-2vi8H8bVqO4/UJ3iMwSRNcI/AAAAAAAAA1A/VBLcsJkGckw/s1600/ScreenShot097.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-2vi8H8bVqO4/UJ3iMwSRNcI/AAAAAAAAA1A/VBLcsJkGckw/s1600/ScreenShot097.jpg" /></a><code><br /><br />
</code>
Anyone else have this problem or can confirm that this is a similar behavior to what you're seeing?<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-iWX6MGoDAIY/UJ3iB8iJaSI/AAAAAAAAA04/odi4_WqF5zk/s1600/ScreenShot096.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-iWX6MGoDAIY/UJ3iB8iJaSI/AAAAAAAAA04/odi4_WqF5zk/s1600/ScreenShot096.jpg" /></a></div>
Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0tag:blogger.com,1999:blog-3020243820938959432.post-83455743196518350072011-11-01T21:52:00.000-05:002012-05-08T21:37:53.807-05:00Deploying Cold Fusion to Google's App Engine and Big Table<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">At the ColdFusion User Group in Minneapolis Wednesday November 3, 2011 I will be presenting on the topic of "Deploying Cold Fusion to Google's App Engine and Big Table".</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Learn the basics of app engine, the deployment methodologies required to develop a Cold Fusion application with Open Bluedragon on gae, and the nuances of working with 'big table', Googles distributed object data store.</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Visit <a href="http://colderfusion.com/">ColderFusion.com</a> to RSVP!</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Looking forward to seeing you there</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Update:</span><br />
<span class="Apple-style-span" style="font-family: Verdana, sans-serif;">Those interested in the files (pdf, some code minus the jar files) can download it <a href="http://dl.dropbox.com/u/3858686/CFUG-OpenBDGAE.zip" target="_blank">here</a>. If you're looking for the magic bits for the working OpenBD version, see the pdf link for the enlist project link.</span>
<!-- Kevin Penny Buffalo MN -->Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com523 Empire Dr, St Paul, MN 55103, USA44.962399 -93.09951844.9609945 -93.1019855 44.9638035 -93.097050500000009tag:blogger.com,1999:blog-3020243820938959432.post-87227297174243888562011-01-24T16:54:00.000-06:002011-01-24T16:54:27.653-06:00(Minneapolis) Application Architect / Developer Job - Jobs2Web, Inc.<div style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;"><strong>Location:</strong> Minnetonka, MN, USA</div><div style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;">Are you looking for an opportunity to maximize your career with one of Minnesota’s fastest growing internet startups? Jobs2Web is one of the few venture backed Minnesota startups which made the Inc 500 list in 2009 and 2010 for our fast growth, and now we’re looking to expand our team of passionate professionals in the human capital software marketplace.</div><div style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;">Jobs2Web helps employers maximize their interactive recruiting strategy using our recruitment marketing platform. The Jobs2Web platform helps major employers to attract, capture, and communicate with quality talent all while measuring recruiting effectiveness using our patent-pending solutions which dramatically reduce dependency on expensive and less effective sourcing mediums.</div><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px;">Working within our company will put you close to our award winning technology that combines the best of recruiting and marketing solutions including Search Engine Marketing (SEO), SEM (Pay-Per-Click), Social Networks and Social Media Marketing, and Email Marketing.</span><div style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;"></div><div style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;">The <b>Architect / Developer</b> enhances and maintains the Jobs2Web Recruitment Marketing Platform and associated applications.</div><div style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;"><b>Specifically, the Application Architect / Developer role will have impact through these responsibilities:</b></div><ul style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px;"><li>Create and maintain the application architecture for the Jobs2Web platform, provide application architecture guidance to the development group and other Jobs2Web departments, and engage in hands-on development as required.</li>
<li>Participate in a dynamic team environment, including frequent team feedback, collaboration, training and code review.</li>
<li>Professionally communicate with our internal clients, including Client Services and Sales.</li>
<li>Demonstrate ability to manage multiple priorities in a fast-paced environment.</li>
</ul><div style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;"><b>Desired Qualifications and Competencies:</b></div><ul style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px;"><li>Bachelors Degree or equivalent work experience, with at least 7 years of application development experience required.</li>
<li>Experience with Java required. Desired areas of expertise include<ul><li>Java EE 6</li>
<li>Apache Solr/Lucene</li>
<li>JMS</li>
<li>JPA/Hibernate</li>
<li>GlassFish 3</li>
<li>JSF</li>
<li>EJB 3.1</li>
</ul></li>
<li>Experience in creation and maintenance of enterprise-grade application architecture, including SOA and messaging systems is required</li>
<li>Experience in SQL language and database technologies required.</li>
<li>Application of OO principles and use of best practices in web development required, with a strong background in application architecture.</li>
<li>ColdFusion MX experience desired, with experience using application frameworks and ColdFusion components.</li>
<li>Exposure to Adobe Flex 3 applications desired.</li>
<li>Competent in use of HTML, XML, CSS, and AJAX technologies.</li>
<li>Experience working in an Agile Scrum environment is desired.</li>
<li>Proficient in use of source control, defect management, and release management tools.</li>
<li>Consistently demonstrates strong team and individual performance.</li>
<li>Effective written and oral communication skills as well as strong interpersonal skills are essential.</li>
<li>Builds positive and effective relationships with individuals both internal and external to the organization.</li>
<li>Staffing/HR industry knowledge a plus.</li>
</ul><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px;"><br />
</span><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px;">Jobs2Web is an entrepreneurial employer that challenges and rewards all employees to succeed at every opportunity! Your talents are fully utilized as we are building this rapidly growing business. Our competitive market driven package includes a total rewards package of competitive pay, bonus, health insurance coverage, 401(k), career development, a very exciting marketplace and a really great work culture.</span><div class="job-location" style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;"><br />
<strong>Nearest Major Market:</strong> Minneapolis<br />
<strong>Job Segments:</strong> Architecture, ColdFusion, Computer, Creative, Database, Developer, Engineer, Engineering, Information Technology, Interactive Marketing, Java, Legal, Marketing, Patent, Product Development, Programmer, QA, Quality, Quality Assurance, Research, SEO, SQL, Technology, Web Design, XML</div><div class="job-location" style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;"><br />
</div><div class="job-location" style="font-family: Verdana, Arial, Helvetica, sans-serif, Myuen, Gulim; font-size: 11px; line-height: 15px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 5px;"><a href="http://careers.jobs2web.com/job/Minnetonka-Application-Architect-Developer-MN-55343/1095982/?utm_source=codefusionllc">Apply Now</a> </div>Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0tag:blogger.com,1999:blog-3020243820938959432.post-38736746317507790782010-11-03T00:44:00.000-05:002010-11-03T00:44:47.152-05:00mxUnit Testing with Hudson CI Server @ CFUG MinneapolisI'll be speaking Wednesday Nov 3, 2010 @ the <a href="http://www.colderfusion.com/">ColdFusion User Group</a> in St. Paul/Minneapolis on mxUnit Testing with Hudson Continuous Integration Server.<br />
<br />
I'll be talking about basic Assertions, as well as going into some advanced mocking topics with the new 2.x release of the mxUnit Framework.<br />
The second part of the evening we'll look at the Hudson Server to help execute our Unit Tests and provide jUnit reports that show execution trends as well as some special surprises.<br />
<br />
See you there!Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0tag:blogger.com,1999:blog-3020243820938959432.post-56900363772022118592010-08-25T16:33:00.001-05:002010-08-25T16:35:21.748-05:00JDBC Connection String and Unicode<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">So we have a SQL Server 2005 JDBC Driver in production using the type 4 driver from Microsoft (Not the DataDirect Driver that ships with ColdFusion 8 Enterprise) and have it configured using the JDBC URL to specify the Host and some other parameters. You do this by going into your ColdFusion Administrator and under Data & Services - Data Sources - Entering in a new connection specifying a Name and choosing 'Other' as the Driver:</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">Format: </span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><i>jdbc:sqlserver://xxx.xxx.xxx.xxxx;</i></span><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; border-collapse: collapse; font-family: 'Segoe UI', Verdana, Arial; line-height: 18px;"><i>databaseName=MyDatabase;</i></span><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><i>applicationName=Myclient;responseBuffering=adaptive;loginTimeout=5;lockTimeout=60000</i></span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_zaIJDxUOIzI/THWIUF35jhI/AAAAAAAAAFU/JKjwRppce9A/s1600/ScreenShot057.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><img border="0" height="403" src="http://1.bp.blogspot.com/_zaIJDxUOIzI/THWIUF35jhI/AAAAAAAAAFU/JKjwRppce9A/s640/ScreenShot057.png" width="640" /></span></a></div><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">Now the problem was that we had some other 'Connection String' information under the 'Advanced Settings' for this connection that we had configured to turn Unicode characters OFF for this dsn (thus using asii characters and varchar vs. unicode and nvarchar). This was for performance as we had varchar fields on columns, and when we use cfquery param, and cf_sql_varchar, the dsn connection setting drives whether you are sending 'varchar(8000)' (non-unicode) or a' nvarchar(4000)' parameter to the database.</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">Database Indexes: If your index has to convert this nvarchar type to a varchar type of the column, then it will more than likely skip using the index all together and you loose the benefit of having an index on that column in your database (i.e. an email address field).</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">With Profiling ON we were able to watch the requests come through by manipulating the jdbc URL connection string as </span><a href="http://msdn.microsoft.com/en-us/library/ms378857(SQL.90).aspx"><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">follows</span></a><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">:</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">sendStringParametersAsUnicode=false will send the cfquery param data through as a <b>varchar(8000)</b> field</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">sendStringParametersAsUnicode =true (which is the </span><u><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">default</span></u><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">) will send it through as a <b>nvarchar(4000)</b> field</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">What we noticed is that those types of queries with:</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><i><<span class="Apple-style-span" style="color: red;">cfqueryparam</span> <span class="Apple-style-span" style="color: #0b5394;">value</span>="#arguments.email#" <span class="Apple-style-span" style="color: #0b5394;">cfsqltype</span>="cf_sql_varchar"></i></span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><i></i> would not use the index.</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">Another thing we noticed was that we had <i>specified </i></span><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><i>sendStringParametersAsUnicode=false</i> in the 'Connection String' area under Advanced Settings. This was </span><b><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">NOT being taken into effect</span></b><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"> when sending parameterized queries to the db. We HAD to move this string into the JDBC URL portion in order for it to work. Bug in ColdFusion?? We're not sure, but we hope this helps someone out there.</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">This is how the dsn should look:</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/_zaIJDxUOIzI/THWLmlzCNnI/AAAAAAAAAFk/775mGxsIV8k/s1600/ScreenShot061.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="148" src="http://4.bp.blogspot.com/_zaIJDxUOIzI/THWLmlzCNnI/AAAAAAAAAFk/775mGxsIV8k/s640/ScreenShot061.png" width="640" /></a></div><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<div class="separator" style="clear: both; text-align: center;"></div><span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><br />
</span>Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com1tag:blogger.com,1999:blog-3020243820938959432.post-72238147828912561322010-02-19T10:47:00.004-06:002010-02-19T10:53:45.984-06:00Executing Remote MXUnit Tests in CFBuilder/CFEclipseI had some interesting problems the other week while working on some <a href="http://www.model-glue.com/">Model-Glue</a> (gesture) RemoteService requests. I had posted to the Model-Glue Google Group about a few <a href="http://groups.google.com/group/model-glue/browse_thread/thread/788964fee8232d3b?pli=1">things</a> I ran into when using the AbstractRemotingService.cfc, and getting url variables to work properly through the <a href="http://groups.google.com/group/model-glue/browse_thread/thread/84fb5302952ca087/16c0584120de087c?lnk=gst&q=penny#16c0584120de087c">service</a>, which they have addressed (Thank you!).<br />
<br />
Obviously you need to read the wiki <a href="http://docs.model-glue.com/wiki/HowTos/HowToUseRemoting#Remoting">documentation</a> first.<br />
<br />
When you Create your RemoteService.cfc that exists at the root of your application, which will be your remoting front controller if you will, you need to tell it where your main model-glue template file is located. (download the zip file from www.model-glue.com and find the modelglueapplicationtemplate directory for the sample RemotingService.cfc)<br />
<br />
Once you have a simple working version up / running by calling /RemotingService.cfc?method=executeEvent&event=my.event&format=json and pass in the data you need to, then you need a good way to test it right? If you use <a href="http://www.mxunit.org/">MXUnit</a> then you have more than likely configured your IDE to execute these tests.<br />
<br />
Figure 1.0<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/_zaIJDxUOIzI/S36-baoJfMI/AAAAAAAAAFM/V5fq1KGzgVE/s1600-h/ScreenShot038.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/_zaIJDxUOIzI/S36-baoJfMI/AAAAAAAAAFM/V5fq1KGzgVE/s320/ScreenShot038.jpg" /></a></div><br />
<br />
ISSUE:<br />
The thing I ran into was that I was using model-glue's event security where I could specify certain events to be 'authentication' needed etc. My remoting service was calling an event that required prior authorization (i.e. session.isLoggedin() or some other means). Now, when I executed a test for this event in mxUnit through the Eclipse plugin for mxunit, it would Fail the test and kept telling me I was unauthorized to execute this event etc, and return the source code for my login screen instead (which would be correct if I was not logged in). However in my unit Test, I was making sure to Call my AuthorizationFacade and log me in in the 'setup' method and verified that 'isLoggedIn()' returned true.<br />
<br />
RESOLUTION:<br />
So in my unit test I am doing a cfhttp 'post' (or now that they supported url variables better in the service a 'get' ) request to the RemoteService.cfc passing in my data. HOWEVER, I needed to also pass in the following through my cfhttp call:<br />
<br />
<br />
<cfhttpparam ....="formfield" name="CFIDE" value="#cookie.CFIDE#"> <br />
<cfhttpparam ....="formfield" name="CFTOKEN" value="#cookie.CFTOKEN#"> <br />
<cfhttpparam ....="formfield" name="JSESSIONID" value="#session.sessionid#"> <br />
<br />
Once this was in place, the calls worked as expected, and returned proper json data.Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0tag:blogger.com,1999:blog-3020243820938959432.post-59403712237465347952009-11-20T09:41:00.005-06:002009-12-09T16:24:52.975-06:00Mpls CFUG - Active MQ, Cluster Messaging, Topics andI'll be presenting at the Minneapolis / St. Paul ColdFusion User Group again in December on Active MQ, Topics, Queues and Cluster Messaging for those interested. I'd love to pack the room before Christmas and show off all the exciting things Apache's Active MQ messaging can do with your ColdFusion applications, especially as it relates to cluster messaging. I'll be doing live demo's and code shows, as well as discussing how our company has used these techniques to help us address things like cache updating/invalidating, message driven events, maintenance queues, workflow etc.<br />
<br />
Visit the <a href="http://www.colderfusion.com">ColderFusion.com</a> website for more details but hope to see you out December 2, 1009, in the mean time, check out my <a href="http://codefusionllc.blogspot.com/2009/11/new-bluetooth-keyboard.html">new keyboard</a>!<br />
<br />
Updated: Download the code samples and <a href="http://www.megaupload.com/?d=QV5501F6" target="_blank">presentation (+code)</a> (requires activemq and blazeds deployed on tomcat as separate downloads) OR download the Entire thing with blazeDS, tomcat, amq and code in one large 200MB <a href="http://www.megaupload.com/?d=ZU77B0TG" target="_blank">file</a>Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com4tag:blogger.com,1999:blog-3020243820938959432.post-42089727327415920372009-11-20T09:29:00.006-06:002009-11-20T09:40:01.636-06:00New Bluetooth KeyboardI broke down and got one of the new <a href="http://www.amazon.com/b/?node=384082011&tag=jamieanddanie-20">Logitech deNovo Edge Keyboards</a> from Amazon this week. I'm just breaking it in but so far it's very sweet. The sleek lazer cut plexiglass and brushed aluminum frame is very 'edgy', and at 11 mm thick, you'll feel like your on a laptop even when docked. It's even got a little touchpad so you can throw your mouse out if you want (but I wouldn't recommend that as the left/right click buttons are not large enough to make it full time usable). It will be perfect for the home theater remote keyboard when you have a PC hooked up to your system.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://ecx.images-amazon.com/images/I/41V9aDwUJBL._SL500_AA280_.jpg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 280px; height: 280px;" src="http://ecx.images-amazon.com/images/I/41V9aDwUJBL._SL500_AA280_.jpg" border="0" alt="" /></a><br /><br />As you could tell from a prior <a href="http://codefusionllc.blogspot.com/2009/05/coldfusion-developers-keybard.html">post</a>, I was wearing the 'C' letter out on my last keyboard, and having a quieter keyboard with cool functionality was something I was definitely interested in.<br />If you're out shopping this <a href="http://www.amazon.com/b/?node=384082011&tag=jamieanddanie-20">Black Friday</a>, maybe you'll get lucky and see one on sale, but <a href="http://www.amazon.com/b/?node=384082011&tag=jamieanddanie-20">Amazon </a>has it for a discount right now.<br />Happy coding - !Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com1tag:blogger.com,1999:blog-3020243820938959432.post-62103775916858624052009-09-23T23:12:00.005-05:002009-09-23T23:20:03.646-05:00Model Glue - Variable CTRLINST is undefinedI'm playing around with Model Glue 3 (gesture) and event-types and message handling etc, and I ran across a nasty little productivity stopper.<br /><br />I had defined an 'init' method which did nothing in my Model-Glue Controller for one of my controllers. I was getting a very obscure 'Variable CTRLINST is undefined.' message as a result.<br /><br /><div class="mycode"><cffunction name="init" output="false" access="public" returntype="void" hint=""><br /> <cfreturn /><br /> </cffunction></div><br /><br />Removing the 'init' method from the controller solved the problem, and the error message went away - leaving me to run my application once again.<br /><br />I had become so accustomed to putting an 'init' method regardless in all cfc's that If I had not had some prior controller code to look at - I would have been sitting on this error for a long time.<br /><br />Hope this helps someone out there - Maybe a more appropriate message here would help (framework guys).Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com4tag:blogger.com,1999:blog-3020243820938959432.post-83903046732093019292009-08-24T08:30:00.002-05:002009-08-24T08:34:24.456-05:00100+ Downloads for CFProperty Inspector ColdFusion Builder ExtensionI made it past the 100+ downloads barrier for the <a href="http://labs.adobe.com/technologies/coldfusionbuilder/">ColdFusion Builder</a> (pre-release) IDE with my <a href="http://cfpropertyextension.riaforge.org/index.cfm">CFProperty Inspector</a> Extension. Thanks to all who've downloaded it and found it useful. Not bad numbers (10% download to view ratio) considering the IDE is not going to be released for another month or more.<br /><br />Keep an eye open for more updates on the future as requests come in for the next version of the extension which allows you to write cfproperty tag meta data to existing components.Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0tag:blogger.com,1999:blog-3020243820938959432.post-14194377540963416682009-07-23T11:06:00.005-05:002009-08-07T10:07:39.546-05:00Search Engine Death Match (Pt. 3) MPLS CFUGI'll be speaking to the Minneapolis/St. Paul ColdFusion User Group (CFUG) on Aug. 6, 2009 about the Solr Integration in ColdFusion 9 (Centaur Beta). If you're in the area we'd love to see you, session starts at 6:30 - more information at <a href="http://www.colderfusion.com">ColderFusion.com</a>.<br /><br />Preview:<br />Search Engine Death Match: Solr (Luncene) vs. Verity<br /><br />Search is King. <br />See how the 2 engines that ship with ColdFusion 9 stack up. <br />Learn more about the newly integrated Solr (based on Java Lucene) engine and how it stacks up against Verity. <br />Listen to real world stories about Solr's performance in a large scale Enterprise application. <br />Preview the features of Solr in Centaur Beta and determine if you're company could benefit from a better, more scalable, more reliable search solution.<br /><br /><a href="http://colderfusion.com/presentations/penny/Solr_vs_Verity.pdf">Here is a preview of the session</a> (pdf).<br /><br />Hope you see you there!Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com1tag:blogger.com,1999:blog-3020243820938959432.post-56613030073964950772009-07-09T09:44:00.008-05:002009-07-11T21:58:30.612-05:00cf_PropertyInspector Bolt Extension Released!Version 1 of the cf_PropertyInspector ColdFusion Builder/Bolt Extension for your IDE has been released on <a href="http://cfpropertyextension.riaforge.com">riaforge</a> (pending).<br /><br />Features Include:<br />For ease of Flex Integration, CFProperty tags are needed to have your methods available to ActionScript classes. Also complex webservices need this metadata defined for them. With existing components already created, having to go back in and add in all these cfproperty tags for all your 'accessors' is a pain. How about just right clicking -> 'Inspect CFC' and be done with it?? Best used if components exist under your webroot.<br /><br />Features:<br />- Searching subdirectories<br />- Alpha sorting properties<br />- Wverwriting/keeping existing properties<br />- Lower case properties<br />- Exclusion of Methods (i.e getInstance, getBinaryNull etc)<br /><br /><br />Version 2 of this application will include the following:<br />- Backups of cfc's before modification<br />- Fine Tune properties before wizard completes<br />- Mapping support if your components are not located under your webroot.<br /><br /><br />Requirements:<br />ColdFusion 8+<br />ColdFusion Builder (Beta 2+) Build: 240677<br /><br />Download NOW Available on riaforge.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zaIJDxUOIzI/SlYC7udxRgI/AAAAAAAAAD0/PLAY86-RgGU/s1600-h/step1.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 343px;" src="http://4.bp.blogspot.com/_zaIJDxUOIzI/SlYC7udxRgI/AAAAAAAAAD0/PLAY86-RgGU/s400/step1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472031912216066" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zaIJDxUOIzI/SlYDAjAMNzI/AAAAAAAAAD8/cGj6P-OE6FQ/s1600-h/step2.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 338px;" src="http://3.bp.blogspot.com/_zaIJDxUOIzI/SlYDAjAMNzI/AAAAAAAAAD8/cGj6P-OE6FQ/s400/step2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472114734708530" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zaIJDxUOIzI/SlYDE8AS1AI/AAAAAAAAAEE/3-wmzn5Sx0s/s1600-h/step3.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 338px;" src="http://2.bp.blogspot.com/_zaIJDxUOIzI/SlYDE8AS1AI/AAAAAAAAAEE/3-wmzn5Sx0s/s400/step3.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472190165505026" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zaIJDxUOIzI/SlYDI7IhktI/AAAAAAAAAEM/3w8ZyWKWLxg/s1600-h/step4.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 338px;" src="http://1.bp.blogspot.com/_zaIJDxUOIzI/SlYDI7IhktI/AAAAAAAAAEM/3w8ZyWKWLxg/s400/step4.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472258651067090" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zaIJDxUOIzI/SlYDNS3kkvI/AAAAAAAAAEU/yGqbHaaPZXo/s1600-h/step5.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 338px;" src="http://2.bp.blogspot.com/_zaIJDxUOIzI/SlYDNS3kkvI/AAAAAAAAAEU/yGqbHaaPZXo/s400/step5.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472333741888242" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zaIJDxUOIzI/SlYDQ_3sO7I/AAAAAAAAAEc/ati0wdTvSw0/s1600-h/step6.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 341px; height: 400px;" src="http://4.bp.blogspot.com/_zaIJDxUOIzI/SlYDQ_3sO7I/AAAAAAAAAEc/ati0wdTvSw0/s400/step6.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472397361593266" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zaIJDxUOIzI/SlYDUbZsEWI/AAAAAAAAAEk/XB0WG1A7VxE/s1600-h/step7.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 264px;" src="http://2.bp.blogspot.com/_zaIJDxUOIzI/SlYDUbZsEWI/AAAAAAAAAEk/XB0WG1A7VxE/s400/step7.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472456291553634" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zaIJDxUOIzI/SlYDXqYysgI/AAAAAAAAAEs/VofXtY5x8o4/s1600-h/step8.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 199px;" src="http://1.bp.blogspot.com/_zaIJDxUOIzI/SlYDXqYysgI/AAAAAAAAAEs/VofXtY5x8o4/s400/step8.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472511853933058" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zaIJDxUOIzI/SlYDbU8DcxI/AAAAAAAAAE0/A3FnxrWp9Yk/s1600-h/step9.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 199px;" src="http://1.bp.blogspot.com/_zaIJDxUOIzI/SlYDbU8DcxI/AAAAAAAAAE0/A3FnxrWp9Yk/s400/step9.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472574815728402" /></a><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zaIJDxUOIzI/SlYDfCD9OxI/AAAAAAAAAE8/xIOiP1WUlxk/s1600-h/step10.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 264px;" src="http://2.bp.blogspot.com/_zaIJDxUOIzI/SlYDfCD9OxI/AAAAAAAAAE8/xIOiP1WUlxk/s400/step10.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472638468078354" /></a><br /><br />Final Result!<br/><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zaIJDxUOIzI/SlYDihIaaHI/AAAAAAAAAFE/IGbDhzEsZts/s1600-h/step11.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 150px;" src="http://1.bp.blogspot.com/_zaIJDxUOIzI/SlYDihIaaHI/AAAAAAAAAFE/IGbDhzEsZts/s400/step11.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5356472698347874418" /></a>Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com2tag:blogger.com,1999:blog-3020243820938959432.post-12357857881638840522009-05-17T00:41:00.007-05:002009-05-17T01:08:04.228-05:00Disable CFC Type Check ProofI usually question a lot of the things I hear, and this one I just had to set the record straight. I can stand being corrected on things when I'm proven wrong so I'm hoping this will come across as simply a clarification and not any kind of 'I told you so'.<br /><br />But in the CFADmin in CF8 'Settings' there is a <span style="font-weight:bold;">'Disable CFC type Check'</span> option that allows you to turn ON the ability to ignore the argument 'types' of CFC's. For example, if I have a component of type 'com.adobe.reactor' and I pass that to a method expecting a 'com.adobe.transfer', if this option is ON, then there would be NO type checking and the argument would be successfully passed in (I'd assuming something else would fail after that however).<br /><br />At <span style="font-weight:bold;"><a href="http://www.cfobjective.com/" target="_blank">cfObjective</a> </span>this year it was stated at a session that if this option was turned ON, a datatype like 'numeric' would be able to accept a 'string' value as there would be no type checking. This is simply not true<br /><br />Proof:<br /><br />Visit your cfadmin and turn ON the 'Disable CFC Type Check' option and restart your server.<br />Run the following script:<br /><br /><div class="mycode"><br /><cffunction name="test" output="false" access="public" returntype="any" hint=""><br /> <cfargument name="num" type="com.adobe.transfer" required="true"><br /> <cfreturn><br /></cfreturn><br /><br /><cfset x="test('hi')"><br /><cfdump var="#x#"><br /></div><br /><br />You'll notice that this works just fine. Notice that I'm passing a string of 'hi' into the test method that is expecting a 'com.adobe.transfer' object. This works just fine with Disable CFC Type Checking ON as it simply treats the argument type as an 'ANY' type.<br /><br />The CFAdmin states:<br /><blockquote>"When checked, UDF arguments of CFC type is not validated. The arguments are treated as type "ANY". Use this setting in a production environment only."</blockquote><br /><br />In this case 'com.adobe.transfer' is a UDF or user defined argument - I defined it in a directory of com/adobe/transfer.cfc.<br /><br />However, when I change my test method to accept a 'numeric' value instead of this UDF value, you will see it will throw an exception:<br /><br /><div class="mycode"><br /><cffunction name="test" output="false" access="public" returntype="any" hint=""><br /> <cfargument name="num" type="numeric" required="true"><br /> <cfreturn><br /></cfreturn></div><br /><br />"The NUM argument passed to the test function is not of type numeric." <br /><br />This proves that ONLY UDF arguments are changed to 'ANY' types when 'Disable CFC Type Check' is turned ON in cfadmin (oh no I've gone cross eyed)<br /><br />Imagine the security holes created by such an option if indeed the native datatypes were all treated as 'ANY'? SQL Injection could occur if you had typed the cfargument as a 'numeric' datatype. A malicious user could simply pass in a string value and bypass your initial line of attack - that being your cfargument data type. This would not be a good situation (more information on security and cfml see Jason Dean's blog at <a href="http://www.12Robots.com" target="_blank">12Robots.com</a>).<br /><br />The fact is, regardless of whether or not 'Disable CFC Type Check' is ON or OFF in your CFAdmin Setttings, native Datatypes still need to be adhered to, or an exception will be thrown.Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com2tag:blogger.com,1999:blog-3020243820938959432.post-45015216137895566992009-05-04T09:24:00.005-05:002010-09-08T15:37:28.928-05:00A ColdFusion Developers Keyboard<a href="http://3.bp.blogspot.com/_zaIJDxUOIzI/Sf77hwtb4oI/AAAAAAAAADs/14OOqo2fPyQ/s1600-h/P1010036_sm.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5331975566282973826" src="http://3.bp.blogspot.com/_zaIJDxUOIzI/Sf77hwtb4oI/AAAAAAAAADs/14OOqo2fPyQ/s400/P1010036_sm.JPG" style="cursor: pointer; float: left; height: 300px; margin: 0pt 10px 10px 0pt; width: 400px;" /></a>How can you tell what kind of developer you are by your Keyboard?? <br />
<br />
Check out my keyboard - Notice the 'C' key is all but worn right off - This has been from about 2 years of programming on this external keyboard - My previous laptop was the same way!<br />
<br />
Just for fun, shoot me a picture of your keyboard - whether ColdFusion Programmer, .Net Programmer or dba (would your 'S' key be worn down from all the SELECTS?).<br />
<br />
EnjoyCode Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com6tag:blogger.com,1999:blog-3020243820938959432.post-40000777256604628742009-05-01T13:50:00.006-05:002009-05-01T14:41:21.463-05:00Clustered Application Needs Re-Loading? Here's HowA question came up at last years <a href="http://www.cfObjective.com">cfObjective</a> in Mike Brunt's presentation about reloading your application/model/ColdSpring config in mid-flight on a clustered application (your application has 2 or more CF instances running it). <br />We've spent some time investigating on our own and mostly just ignoring the issue and going through the tedious process of RDP-ing into the server and MMC-ing into each Servers Services Panel and restarting each instance and verifying they come back online - staggering them throughout a period of time until all cluster members were synced. This sucks.<br /><br />Some of the proposed solutions included:<br />1.) Using ActiveMQ and a CF Gateway to Broadcast a 'reload' message and have the cluster members stagger their execution of it so they all don't reload at once (taking the app offline) via a thread sleep randomly based on the JVM instance etc.<br />2.) Appreloading via the url X times until you think you've HIT them all <br />3.) <a href="http://bhlms.fltr.ucl.ac.be/cfdocs/htmldocs/help.html?content=webservmgmt_3.html" target="_blank">Use JRun's internal Web Server</a> <br /><br />I figured I'd give number 3 a try as I knew it would be the quickest and easiest to implement if it worked. Turns out it does.<br /><br />What would happen is this: each CF instance has it's own dedicated IP and port that is running the application that can be accessed via a browser or over http (which can get automated but we'll get into that later).<br /><br />The IP:Port is normally used if you wanted to get to a particular cluster members cfide to do some configurations etc i.e. 127.0.0.1:8303/cfide/administrator/index.cfm. However, if you browse to just 127.0.0.1:8303, you'll notice a nice directory structure that comes form your installation instance directory i.e. C:\JRun4\servers\{instancename}\cfusion.ear\cfusion.war if on Jrun.<br /><br />So what we'll do is modify your jrun-web.xml file by adding the virtual root path to your application AND make sure if you use a separte jvm.config for your instance, that the default jvm.config is the same (more on that later).<br /><br />Navigate to C:\JRun4\servers\{instancename}\cfusion.ear\cfusion.war\WEB-INF and open jrun-web.xml (if you don't have one you can try borrowing one from the default cfusion instance).<br /><br />Add the following to the file and save:<br /><div class="mycode"><virtual-mapping><br /> <resource-path>/</resource-path><br /> <system-path>C:/webroot/approot</system-path><br /></virtual-mapping></div><br /><br />This will make JRUN's internal web server root be your application's root directory.<br /><br />Restart your CF instance.<br /><br />If you are like most shops and use some kind of query parameter to execute your application reload procedure i.e. ?reloadsite=true or the like, then you can execute it via the ip:port?param and reload each cluster member by changing your ip:port.<br /><br />Advanced Note: if you're like us and have a separate jvm configured for your CF instances (different than the stock jvm.config found in c:\JRun4\bin) then you'll need to make sure that <br />a.) either the jvm.config is the same as your CF Instance jvmconfig file<br />b.) make the jvm.config (default) the same as the CFInstance jvmconfig file, and then reconfigure that instance to use the 'jvm.config' file. This is key, as the internal JRun webserver will use the default jvm.config on startup, so if you have separated these jvm's out, reloading your app from ip:port will do nothing, as you have only just setup 2 separate jvm's running your application, and the one has NO knowledge of the other.<br /><br />This is one method anyway - just make sure you have tested this thoroughly, especially if you have environment specific configurations that get loaded up depending on the url - as the IP address block may load up an unexpected set of configuration data from your application.<br /><br />We'll be trying this out over the next few weeks and likely integrate it into the application in some kind of threaded reload routine if some configuration needs to be done mid-flight.<br /><br />Enjoy!Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com3tag:blogger.com,1999:blog-3020243820938959432.post-82408617300550230642009-05-01T08:49:00.004-05:002009-05-01T09:54:10.563-05:00Search Engine Death Match - Solr Wins (Pt. 2)<span style="font-weight:bold;">Abstraction:</span><br />They key to the integration of <a target="_blank" href="http://lucene.apache.org/solr/">Solr</a> and removal of Verity in our model was to abstract the search functionality of the application. The process started by creating a 'CollectionManager' which held the methods that were needed to interact with the Verity Server through cfsearch and consolodated all calls to 'cfsearch' through this service. <br /><br /><span style="font-weight:bold;">Coldspring:</span><br />Once that was done and working fine - we were ready to dive into Solr and figure out the nuances of the product and ultimately create a 'SolrManager' which would replace the collectionManager. Since we were using ColdSpring, this was a mere class path change in the coldspring.xml and that was it (I love <a target="_blank" href="http://www.coldspringframework.org">ColdSpring</a>).<br /><span style="font-weight:bold;"><br /><br />Solr Data-Config:</span><br />I'll get a more formalized presentation together about swapping out Verity in favor of Solr, but in general, our data was in a SQL Database vs. xml etc, so we used the 'data-config.xml' to basically come up with our main query that populates the index (each solr instance has a single instance or collection vs. verity where there is 1 verity and many collections) as well as delta and delete queries for updating and removal of the collection data through JDBC. This <a target="_blank" href="http://wiki.apache.org/solr/DataImportHandler?highlight=(data-config)#head-5ced7c797f1014ef6e8326a34c23f541ebbaadf1">data-config.xml</a> file is simply an xml file in which you write sql to select your columns based on some criteria. <br />Note: it's best to have <span style="font-style:italic;">created, lastmodified, id, active</span> columns in your database table you wish to index, as this will help Solr in determining what data has changed, and what has been deleted. Hint: keep these queries simple and use a 'view' if your sql is complex at all, as it will hide the complexity, making the file easier to read, and abstract the data in a way that you can change the view w/o having to change the data-config.xml file each time. It's also worth pointing out that the 'server time' should be exactly the same on both your database and solr machine (if not on the same box) as Solr stores internally the last time it indexed your data in a value referenced in your sql as '${dataimporter.last_index_time}'. <br />** If you have a 'smalldatetime' value for lastmodified where sql will 'round' the seconds of the field, then you may run into issues where Solr won't pick up on changes that have happened since it's last_index_time as compared to your database timestamps etc.<br /><br /><span style="font-weight:bold;">Solr Schema:</span><br />This is basically the data definition in a single <a target="_blank" href="http://wiki.apache.org/solr/SchemaXml?highlight=(schema)">schema.xml</a> of your data. You define your 'fields' which are your columns of data from the data-config and the datatypes etc. This is very flexible including the ability to 'group' multiple fields together as a single field (copyfield) as well as defining what is the default field that's searched on if none is specified in the field (i.e. search for 'MN jobs' could search job titles, job desc, locations etc).<br /><br /><span style="font-weight:bold;">Solr Config:</span><br />There was a one line change here just to tell Solr to use the data-config for it's data:<br /><blockquote><requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"><br /> <lst name="defaults"><br /> <str name="config">data-config.xml</str> <br /> </lst><br /> </requestHandler></blockquote><br /><br /><span style="font-weight:bold;">ColdFusion:</span><br />Wayne Graham has published an open source component out there at <a target="_blank" href="http://www.riaforge.org">Ria Forge</a> to assist in the low level cfhttp calls called <a target="_blank" href="http://solcoldfusion.riaforge.org/">SolManager</a>. I've added this as a helper to my main 'SolrManager' component and i just call it to do the cfhttp calls to Solr and then I can do what I need with the data it returns.<br />Since the data is returned as xml, and the 'schema' of the data defines which columns / nodes are returned, I then have full control over the result. I convert the xml to a query using query new, xmlparse, and xmlsearch - and for our purpose as long as the query is in the same format as the one returned by a cfsearch through verity, the application won't know any difference.<br /><br />Performance:<br />FAST! Solr does it's own caching and warming of searches and results and from my metrics, depending on the xml result set (which can EASILY be adjusted to limit the size of the xml as a '&rows=x' query string attribute in the search string) the performance is negligible if not better across the board for searches.<br /><br />There's a lot more to discuss such as <a target="_blank" href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">search syntax</a>, <a target="_blank" href="http://wiki.apache.org/solr/SolrReplication">replication</a>, admin dashboard etc, but I'll leave a few stones un-turned for you to dive in and get your feet wet. They have good documentation on the site as well as an Extremely easy and efficient Jetty package that you can start up, execute a few commands on through a <a target="_blank" href="http://lucene.apache.org/solr/tutorial.html">tutorial</a> on their site, and get a feel for what to expect.<br /><br />All in all, we were to the point where Verity was NO LONGER AN OPTION or a viable solution for our company and was causing nearly hourly baby sitting, so this solution was implemented JIT (Just in Time) and has saved us from feeling the effects of daily search stress.<br /><br />Have fun and stay tuned for a full run down with code samples at <a target="_blank" href="http://www.colderfusion.com">MN CFUG</a> soon.Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com1tag:blogger.com,1999:blog-3020243820938959432.post-42376984769918751312009-04-30T09:41:00.002-05:002009-04-30T09:49:36.202-05:00Search Engine Death Match - Solr WinsIt's now been over a month since we rolled out our Lucene / Solr powered search engine replacement for Verity in our application and let me sum it up this way: Zero maintenance.<br /><br />Even though the OEM Verity licensing states 250K record max, we ran into a ceiling on a few of our machines when the number of Verity collections reached 82-88. We were doing constant rcadmin fixes to drop the thread counts for each collection down to 2 from 3 - but on each restart or at random points in time, the thread counts would return to 3. Instability and random collection switches were the main reasons we moved off the platform, and we'll never look back.<br /><br />Solr took some configuration, but it was more than flexible enough for our needs, and with the delta updates and deletes, it made the maintenance near zero.<br /><br />As far as parsing the resulting xml, that was done efficiently through coldfusion's xmlparse and xmlsearch to walk the nodes and return a 'like' verity recordset to the application. With ColdSpring we were able to swap out implementations easily and everything just worked. Great planning and execution resulted in a seamless rollout with Solr being run on RedHat on a dedicated machine.<br /><br />I will most likely do a presentation at our next/upcoming CFUG (ColdFusion User Group) in Minneapolis/St.Paul in the near months about the transition and talk about integration points before ColdFusion 9 comes out and makes it all available with a single tag ;)<br /><br /><a href="http://lucene.apache.org/solr/">Long Live Open Source software</a>Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com3tag:blogger.com,1999:blog-3020243820938959432.post-8168715684078690632009-02-03T11:57:00.012-06:002009-02-03T12:45:37.162-06:00Query of Queries is Inconsistent (Adobe CFML Runtime)I've never been a big fan of a half baked solution, but I will acknowledge that coldfusion's <a href="http://livedocs.adobe.com/coldfusion/8/htmldocs/using_recordsets_8.html">query of queries</a> has come a long way from it's beginning and does do a good job on simple queries to get data from an existing query.<br /><br />However, there are times when it simply sucks at doing what you think it should do, especially when it comes to multiple tables and joins, as well as converting datatypes to be alike.<br /><br />I'll show a few examples of it's inconsistencies and attempt to point out some problems with it's implementation.<br /><br /><span style="font-weight:bold;">Example 1:</span> Q-of-Q (Query of Queries) and Proper variable scoping inside a cffunction.<br /><br />When inside a cffunction you always want to fully qualify your variables as best practice. If it's an arguments, prepend the value with 'arguments.' etc. The same goes for Q-of-Q. But I will show you where q-of-q forces you to break it's own best practice advice by not allowing you to do this simple task.<br /><br />I will be referencing the following 2 queries:<br /><br /><div class="mycode"><!--- Test Query 1 ---><br /><cfset q = QueryNew('id,name','Integer,varchar')><br /><cfset queryaddrow(q,1) ><br /><cfset querysetCell(q,'id',1,1) ><br /><cfset querysetcell(q,'name','test',1) ><br /><br /><!--- Test Query 2 ---><br /><cfset q2 = QueryNew('id,age','Integer,Integer')><br /><cfset queryAddRow(q2,1) ><br /><cfset querySetCell(q2,'id',1,1) ><br /><cfset querySetCell(q2,'age',33,1) ></div><br /><br />This is a simple query that creates a single row of data<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zaIJDxUOIzI/SYiHfyrsmyI/AAAAAAAAADE/EKQeVEZcDQ0/s1600-h/query2.GIF"><img style="cursor:pointer; cursor:hand;width: 74px; height: 66px;" src="http://2.bp.blogspot.com/_zaIJDxUOIzI/SYiHfyrsmyI/AAAAAAAAADE/EKQeVEZcDQ0/s400/query2.GIF" border="0" alt=""id="BLOGGER_PHOTO_ID_5298633941852134178" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zaIJDxUOIzI/SYiHbqtL-wI/AAAAAAAAAC8/nQt5yqbczG0/s1600-h/query1.GIF"><img style="cursor:pointer; cursor:hand;width: 83px; height: 65px;" src="http://4.bp.blogspot.com/_zaIJDxUOIzI/SYiHbqtL-wI/AAAAAAAAAC8/nQt5yqbczG0/s400/query1.GIF" border="0" alt=""id="BLOGGER_PHOTO_ID_5298633870991424258" /></a><br /><br />What I'm going to do is merge the results of these 2 queries (as one may have come from a cfdirectory, and the other from a cfsearch, or cfquery etc).<br /><br />My method takes 2 query arguments and joins them - but for now I'll just return the value of the 1st argument 'qry'.<br /><br /><div class="mycode"><cffunction name="merge" output="false" access="public" returntype="query" hint=""><br /> <cfargument name="qry" type="query" required="true"/><br /> <cfargument name="qry2" type="query" required="true"/><br /> <cfset var Private=StructNew()><br /> <br /> <cfquery name="private.q" dbtype="query"><br /> <span style="font-weight:bold;">select *<br /> from arguments.qry </span><br /> </cfquery><br /> <br /> <cfreturn private.q /><br /></cffunction></div><br /><br />Resulting in a simple query returned - nothing special.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zaIJDxUOIzI/SYiI6rx5BOI/AAAAAAAAADM/yck9ZYG4-CE/s1600-h/result1.GIF"><img style="cursor:pointer; cursor:hand;width: 257px; height: 162px;" src="http://2.bp.blogspot.com/_zaIJDxUOIzI/SYiI6rx5BOI/AAAAAAAAADM/yck9ZYG4-CE/s400/result1.GIF" border="0" alt=""id="BLOGGER_PHOTO_ID_5298635503367161058" /></a><br /><br />Now when i wish to merge the 2 queries - I would assume that I could do something like this then if 'arguments.qry' worked to reference the qry argument.<br /><div class="mycode"> <cffunction name="merge" output="false" access="public" returntype="query" hint=""><br /> <cfargument name="qry" type="query" required="true"/><br /> <cfargument name="qry2" type="query" required="true"/><br /> <cfset var Private=StructNew()><br /> <br /> <cfquery name="private.q" dbtype="query"><br /> <span style="font-weight:bold;">select *<br /> from arguments.qry, arguments.qry2<br /> where arguments.qry.id = arguments.qry2.id</span><br /> </cfquery><br /> <br /> <cfreturn private.q /><br /></cffunction></div><br /><br />WRONG! <br />Query Of Queries syntax error.<br />Encountered "arguments . qry .. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition, <br /><br />Ok fine - I won't use proper best practices and just reference the query w/o the arguments proper fully scoped value.<br /><br /> <div class="mycode"> <cffunction name="merge" output="false" access="public" returntype="query" hint=""><br /> <cfargument name="qry" type="query" required="true"/><br /> <cfargument name="qry2" type="query" required="true"/><br /> <cfset var Private=StructNew()><br /> <br /> <cfquery name="private.q" dbtype="query"><br /> <span style="font-weight:bold;">select *<br /> from qry, qry2<br /> where qry.id= qry2.id</span><br /> </cfquery><br /> <br /> <cfreturn private.q /><br /></cffunction></div><br /><br />Results: works fine<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zaIJDxUOIzI/SYiJ08diKEI/AAAAAAAAADU/5sgxjHa7kp8/s1600-h/result2.GIF"><img style="cursor:pointer; cursor:hand;width: 338px; height: 164px;" src="http://4.bp.blogspot.com/_zaIJDxUOIzI/SYiJ08diKEI/AAAAAAAAADU/5sgxjHa7kp8/s400/result2.GIF" border="0" alt=""id="BLOGGER_PHOTO_ID_5298636504277592130" /></a><br /><br /><span style="font-weight:bold;">Example 2:</span> Using QofQ (query of queries) to reference a column from the table using dot notation<br /><br />The <a href="http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_17.html">ColdFusion LiveDocs</a> states the following:<br /><blockquote>Example<br /><br />If a structure named A contains a field named B, which contains a table named Products, you can refer to the table with dot notation, as follows:<br /><div class="mycode"><br />SELECT tape_ID, length<br />FROM A.B.Products;<br /></div><br /></blockquote><br /><br />The 'structure' in my case is 'arguments', the field name is 'id', and the table name is 'qry'. With that in mind:<br /><br />A=arguments<br />B=id<br />Products=qry<br /><br />Therefore you could deduce that the following is true:<br /><br /><div class="mycode"><br />SELECT id, name<br />FROM <span style="font-weight:bold;">arguments.id.qry </span><br /></div><br /><br />Results:<br /><br />Query Of Queries syntax error.<br />Encountered ". Incorrect Select List, Incorrect select column, arguments.id cannot be followed by '.' <br /><br /><br />However, you would normally reference this data as 'arguments.qry.id'.<br /><br />Results:<br /><br />Query Of Queries syntax error.<br />Encountered ". Incorrect Select List, Incorrect select column, arguments.qry cannot be followed by '.' <br /><br />The kicker is - Neither of these work.Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com2tag:blogger.com,1999:blog-3020243820938959432.post-35100893100690182252009-01-28T22:10:00.000-06:002009-01-28T22:25:50.741-06:00Killer WDDX - Beware!I came across a rather interesting 'feature' tonight while working on some logging and alerting processes. We have data in a structure that holds raw information about various processes that have occurred. In one of the structure keys there is an XMLObject (coldfusion parsed xml object). See the code snippet below and DO NOT run this on production equipment!!<br /><br /><blockquote><cfset stcStruct = StructNew()/><br /><br /><cfset xmlDoc = "<myxml><name>Kevin Penny</name></myxml>"><br /><cfset stcStruct.xml = xmlParse(xmlDoc)/><br /><cfset stcStruct.id = 1><br /><br /><cfwddx action="cfml2wddx" input="#stcStruct#" output="tmp"/></blockquote><br /><br />This takes a Structure, adds a key of 'xml' and places a parsed xml object in it's position. I'm then serializing the data into wddx via cfwddx as cfml2wddx.<br /><br />I originally thought it was the date fields that I had in the structure, so I removed those, but the problem was the xml object's serialization.<br /><br />Here's the error I get along with a partial dump:<br />java.lang.StackOverflowError<br /><br />....<br />at java.beans.Introspector.instantiate(Introspector.java:1438)<br /> at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:410)<br /> at java.beans.Introspector.<init>(Introspector.java:359)<br /> at java.beans.Introspector.getBeanInfo(Introspector.java:222)<br /> at java.beans.Introspector.<init>(Introspector.java:368)<br /> at java.beans.Introspector.getBeanInfo(Introspector.java:222)<br /> at java.beans.Introspector.<init>(Introspector.java:368)<br /> at java.beans.Introspector.getBeanInfo(Introspector.java:222)<br /> at java.beans.Introspector.<init>(Introspector.java:368)<br /> at java.beans.Introspector.getBeanInfo(Introspector.java:222)<br /> at java.beans.Introspector.<init>(Introspector.java:368)<br /> at java.beans.Introspector.getBeanInfo(Introspector.java:222)<br /> at java.beans.Introspector.<init>(Introspector.java:368)<br /> at java.beans.Introspector.getBeanInfo(Introspector.java:222)<br /> at java.beans.Introspector.getBeanInfo(Introspector.java:208)<br /> at coldfusion.wddx.BeanSerializer.writeObject(BeanSerializer.java:48)<br /> at coldfusion.wddx.WddxOutputStream.writeObject(WddxOutputStream.java:310)<br /> at coldfusion.wddx.BeanSerializer.writeObject(BeanSerializer.java:120)<br /> at coldfusion.wddx.WddxOutputStream.writeObject(WddxOutputStream.java:310)<br /> at coldfusion.wddx.BeanSerializer.writeObject(BeanSerializer.java:120)<br /> at coldfusion.wddx.WddxOutputStream.writeObject(WddxOutputStream.java:310)<br /><br />I've submitted this as a bug to Adobe #<span style="font-weight:bold;">75230</span>.Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com4tag:blogger.com,1999:blog-3020243820938959432.post-15985102533339798232009-01-14T09:32:00.001-06:002009-01-14T09:35:36.196-06:00Update to CFPROPERTY Inspector UtilityI implemented a new UI for the <a href="http://cfproperty.riaforge.org/index.cfm?event=action.download">CFPROPERTY Inspector</a> as well as small bug fixes etc.<br /><br />I used the JQuery tab UI which helps the flow of the steps being that the process is just one large form. Here are the new screen shots.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zaIJDxUOIzI/SW4F98kF64I/AAAAAAAAACc/Ot22yp0ixK0/s1600-h/tab1.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 97px;" src="http://1.bp.blogspot.com/_zaIJDxUOIzI/SW4F98kF64I/AAAAAAAAACc/Ot22yp0ixK0/s320/tab1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5291173173994580866" /></a><br /><br/><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zaIJDxUOIzI/SW4GD-83iiI/AAAAAAAAACk/h-_jXDVrLoc/s1600-h/tab2.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 137px;" src="http://3.bp.blogspot.com/_zaIJDxUOIzI/SW4GD-83iiI/AAAAAAAAACk/h-_jXDVrLoc/s320/tab2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5291173277714582050" /></a><br /><br/><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zaIJDxUOIzI/SW4GI4LV6yI/AAAAAAAAACs/LNVQqupRbE4/s1600-h/tab3.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 121px;" src="http://1.bp.blogspot.com/_zaIJDxUOIzI/SW4GI4LV6yI/AAAAAAAAACs/LNVQqupRbE4/s320/tab3.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5291173361795590946" /></a><br /><br/><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zaIJDxUOIzI/SW4GO-u3efI/AAAAAAAAAC0/U-D2hgWB_Co/s1600-h/tab4.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 201px;" src="http://3.bp.blogspot.com/_zaIJDxUOIzI/SW4GO-u3efI/AAAAAAAAAC0/U-D2hgWB_Co/s320/tab4.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5291173466634418674" /></a>Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0tag:blogger.com,1999:blog-3020243820938959432.post-13663001491973518112009-01-06T09:59:00.000-06:002009-01-06T10:04:27.141-06:00CFProperty Inspector on RiaForgeI've released the CFPROPERTY Inspector on riaforge and google code for those interested in it.<br /><br /> <blockquote>This Utility is designed to introspect components and auto-create CFPROPERTY tags based on the function meta data. <br />Specify the mapping to your components, and choose which cfc's you want to have CFPROPERTY Tags defined on them as well as what properties of your components that you wish to have CFPROPERTY tags defined for. (for assisting in getting your components well defined for Flex integration etc.) </blockquote><br /><br />For Screen Shots and more checkout <a href="http://cfproperty.riaforge.org/">cfproperty.riaforge.org</a> and to download the code visit Google Code <a href="http://cfproperty-inspector.googlecode.com/svn/trunk/cfproperty.zip">here</a>.<br /><br/><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zaIJDxUOIzI/SWOAtP83F4I/AAAAAAAAACM/XptGLxCTBJs/s1600-h/step1.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 221px;" src="http://1.bp.blogspot.com/_zaIJDxUOIzI/SWOAtP83F4I/AAAAAAAAACM/XptGLxCTBJs/s320/step1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5288211902327363458" /></a><br /><br/><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zaIJDxUOIzI/SWOA1205sqI/AAAAAAAAACU/hzw1N0D1-Gk/s1600-h/step2.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 225px;" src="http://2.bp.blogspot.com/_zaIJDxUOIzI/SWOA1205sqI/AAAAAAAAACU/hzw1N0D1-Gk/s320/step2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5288212050201916066" /></a><br /><br/><br /><br />Let me know what you think.Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0tag:blogger.com,1999:blog-3020243820938959432.post-89271324152721165562008-12-16T20:10:00.000-06:002008-12-16T20:20:20.180-06:00Manipulating CFC Properties through getMetaData<p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">I started toying with the idea of creating a generic utility that would populate a cfc with ‘property’ as in cfproperty data and I have something work now – (this would make the compatibility between flex and the model that much better and more ‘well defined’)</p><p class="MsoNormal"><br /><o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Would this be of benefit to us – i.e. running our model through it which would then create all cfproperty tags for a given object based on the getter methods w/in the object – and determine datatype of string, numeric etc – based on the getter methods data etc – <o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><br /></p><p class="MsoNormal">What sort of things do I have to be careful of ??<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><b style=""><br /></b></p><p class="MsoNormal"><b style="">Order</b> of the cfproperty tags counts right – and <b style="">Case sensitivity</b> of the names obviously ??<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><br /></p><p class="MsoNormal">So the process would either do it alpha – or by order that was returned by getMetaData on the object – <o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">An interesting thing happens however when I’m doing this – I could actually build this into coldspring likely where these properties are autogenerated on the fly and never actually have to exist w/in the cfc<span style=""> </span>(written back to the cfc)</p><p class="MsoNormal"><br /><o:p></o:p></p> <p class="MsoNormal">The strange thing happened was this:<o:p></o:p></p> <p class="MsoNormal">Once I do a create object on a cfc – I can dump<span style=""> </span>it and it shows that there are NO properties defined in the meta data – which is good<o:p></o:p></p> <p class="MsoNormal"><br /></p><p class="MsoNormal">So I run it through my process where I’m introspecting the cfc and create this ‘properties’ key and append the array to this key.</p><p class="MsoNormal"><br /><o:p></o:p></p> <p class="MsoNormal">This works well and now a side by side before and after shows the left object with NO properties and the right with Properties – great.<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><br /></p><p class="MsoNormal">However the next time I run it – the left side also shows that the object now HAS properties – <o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">This is strange – b/c cfproperty tags don’t actually exist in the cfc – but yet I’m able to fake cf (caching likely) into thinking / assigning these properties to the object.</p><p class="MsoNormal"><br /><o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><span style=""> </span>For Example:<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Here my Job Object has NO cfproperty tags:<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} </style> <![endif]--><span style=";font-family:";font-size:11;" ><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"> <v:f eqn="sum @0 1 0"> <v:f eqn="sum 0 0 @1"> <v:f eqn="prod @2 1 2"> <v:f eqn="prod @3 21600 pixelWidth"> <v:f eqn="prod @3 21600 pixelHeight"> <v:f eqn="sum @0 0 1"> <v:f eqn="prod @6 1 2"> <v:f eqn="prod @7 21600 pixelWidth"> <v:f eqn="sum @8 21600 0"> <v:f eqn="prod @7 21600 pixelHeight"> <v:f eqn="sum @10 21600 0"> </v:formulas> <v:path extrusionok="f" gradientshapeok="t" connecttype="rect"> <o:lock ext="edit" aspectratio="t"> </v:shapetype><v:shape id="Picture_x0020_4" spid="_x0000_i1025" type="#_x0000_t75" alt="" style="'width:9in;height:79.5pt'"> <v:imagedata src="file:///C:\DOCUME~1\penny\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.jpg" href="cid:image003.jpg@01C95FBA.39C4E2D0"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zaIJDxUOIzI/SUhgff7v9tI/AAAAAAAAABo/EZgafTB0H1I/s1600-h/1.JPG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 49px;" src="http://3.bp.blogspot.com/_zaIJDxUOIzI/SUhgff7v9tI/AAAAAAAAABo/EZgafTB0H1I/s400/1.JPG" alt="" id="BLOGGER_PHOTO_ID_5280576657356224210" border="0" /></a><br /><o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal">I’m going to make ColdFusion ‘think’ it has these properties defined on it by manipulating the metadata about the object.<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Simple App/UI<o:p></o:p></p> <p class="MsoNormal"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zaIJDxUOIzI/SUhgpwFG-dI/AAAAAAAAABw/HL1ANItP4FU/s1600-h/2.JPG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 222px;" src="http://4.bp.blogspot.com/_zaIJDxUOIzI/SUhgpwFG-dI/AAAAAAAAABw/HL1ANItP4FU/s400/2.JPG" alt="" id="BLOGGER_PHOTO_ID_5280576833489140178" border="0" /></a></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /><o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">There are No properties on the left – <span style=""> </span>On the right below, shows the ‘manipulated’ meta data based on the getter methods in the object.<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zaIJDxUOIzI/SUhgxFOSVfI/AAAAAAAAAB4/Nhuk8zPeFZo/s1600-h/3.JPG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 361px;" src="http://1.bp.blogspot.com/_zaIJDxUOIzI/SUhgxFOSVfI/AAAAAAAAAB4/Nhuk8zPeFZo/s400/3.JPG" alt="" id="BLOGGER_PHOTO_ID_5280576959423862258" border="0" /></a></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /><o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Now after I run this again – you see both left and right are identical (cached metadata about the object)<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zaIJDxUOIzI/SUhg4CC_MCI/AAAAAAAAACA/mMz1byNG2JM/s1600-h/4.JPG"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 363px;" src="http://2.bp.blogspot.com/_zaIJDxUOIzI/SUhg4CC_MCI/AAAAAAAAACA/mMz1byNG2JM/s400/4.JPG" alt="" id="BLOGGER_PHOTO_ID_5280577078830247970" border="0" /></a></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /></p><p class="MsoNormal"><br /><o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">The left side ‘thinks’ that the object now has these properties available to it- which if called or introspected by Flex, they should be available.<o:p></o:p></p> <p class="MsoNormal">This feels a bit like cheating, but if it doesn’t work – we can always complete this thought by having the process ‘write’ the cfproperty tags back to the object.<o:p></o:p></p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal">Interesting huh? <o:p></o:p></p>Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0tag:blogger.com,1999:blog-3020243820938959432.post-41815606381919101152008-11-10T20:18:00.000-06:002008-11-10T20:25:43.271-06:00JRun4 wsconfig Error Loading jvm.dllRecently I attempted to patch our JRun4 servers with updater 7. Unfortunately after the fact, I found out that there is <a href="http://www.adobe.com/support/documentation/en/jrun/4/updater7/releasenotes_4_updater7.pdf">no 64 bit installer for it</a> on windows. "64-bit Support – JRun4 Updater 7 provides 64-bit support on Solaris-SPARC. <span style="font-weight: bold;">Other 64-bit operating systems including Windows 64-bit and Solaris-x86 64-bit are not supported.</span>"<br /><br />So after a quick panic attack and reverting to the backed up copy (yes I did back up some recommended things) I felt that I was out of the woods. Twas not the case.<br /><br />The next time I went to add a site to the Coldfusion instance through wsconfig command line - I received a dreaded "Error Loading jvm.dll". So I could no longer add sites and associate them to the webserver etc.<br /><br />Here was the old version:<br />wsconfig.exe -ws IIS -site "jobs-jobs.com" -coldfusion -server "cfcluster" -v -ws64 -norestart<br />(Error Loading jvm.dll)<br /><br />The new version of this has be using another <a href="http://livedocs.adobe.com/jrun/4/Installing_JRun/servconf3.htm">technique</a> using a java properties file instead. :<br />java -jar wsconfig.jar -f c:\j2w_IISconfig\jrun.properties<br /><br />This called a jrun.properties file that had the arguments that i was executing directly to the wsconfig.exe prior<br /><br />The Properties looks somehing like this:<br /><br />ws=IIS<br />site=jobs-jobs.com<br />ws64=true<br />norestart=true<br />server=cfcluster<br />coldfusion=true<br /><br />Bingo - Hope this helps some other soul out there - as it stopped me in my tracks for a bit.Code Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com1tag:blogger.com,1999:blog-3020243820938959432.post-51293749598729507032008-10-30T10:16:00.000-05:002008-10-30T10:21:59.787-05:00Separating the JVM config files - A Cluster ConversationI had an interesting discussion with a fellow who was looking to solidify his stand with his boss on jvm configuration separation and the need for it. Below is the IM conversation the ensued - I think it helps to show some of the various points that could be made arguing FOR having the separation of the config files per logical JVM (names changed to protect the innocent and guilty)<br /><br />[09:20] cluster_help: Hello, i was just talkin to Jared about some jvm clustering stuff and he said you were way smarter than him on that stuff<br />[09:20] kpenny: sure ok -<br />[09:20] cluster_help: we're setting up a few clustered instances for a large app on a single vmware box<br />[09:21] kpenny: cool - 32 bit?<br />[09:21] cluster_help: i know i should have each instance running its own jvm config so we (yeah, 32) can lower the max heap etc so all the instances aren't trying to use ALL the available memory<br />[09:22] cluster_help: i can find lots of posts and articles on HOW. Do you know of any that mention WHY?<br />[09:22] cluster_help: need to help my infrastructure guy convince his boss<br />[09:22] kpenny: so 'why' separate the instances?<br />[09:22] cluster_help: load balance and failover<br />[09:23] cluster_help: its a custom installation of our main app for a large, high traffic customer<br />[09:23] cluster_help: we're isolating them from all our "regular" customers<br />[09:23] kpenny: yup - both excellent reasons - keep the app UP -<br />[09:24] kpenny: so you'll have x vm's<br />[09:24] cluster_help: yea<br />[09:24] cluster_help: and a gig of RAM to allocate among them<br />[09:25] kpenny: i also recommend if you have say 8 processor box - not to give each vm virtual procs that add up t o 8<br />[09:25] kpenny: as the ESX host for example would need cpu 2<br />[09:25] cluster_help: right, it is an ESX host<br />[09:25] kpenny: k - we noticed that when we dedicated 2 cores per vm<br />[09:25] kpenny: we were cpu strapped -<br />[09:26] kpenny: also you have to think about memory utilization - if you have 4g ram on each vm<br />[09:26] kpenny: and only a single jvm - likely the jvm max is 1.2G -<br />[09:26] kpenny: and the os isn't going to use 2.8g ram<br />[09:26] cluster_help: u know of anything published anywhere that describes WHY its a good idea to lower the max (allocate memory judiciously) across each instance<br />[09:26] kpenny: so you're also leveraging your hardware better<br />[09:26] cluster_help: right<br />[09:27] kpenny: describe - lower the max -<br />[09:27] cluster_help: when you create new instances, they all use the same jvm.config, so they all get allocated whatever the default is<br />[09:27] kpenny: right - separating them gives you more control that's all<br />[09:28] kpenny: and also allows you to do custom class paths<br />[09:28] kpenny: etc, as your apps grow -<br />[09:28] cluster_help: so you create a sep jvm.config for each instance, and lower the max heap size, so they all aren't trying to use all the available<br />[09:28] kpenny: and/or as you allocate resources - you have more granular control<br />[09:28] kpenny: well even though you're using the same jvm.config<br />[09:28] kpenny: its still a separate unique jvm<br />[09:28] kpenny: that they are running w/in -<br />[09:28] kpenny: which can be a misconception -<br />[09:29] kpenny: the jvm.config just configures the values for each of the individual jvms in use -<br />[09:29] kpenny: by separating out the configs, then you're able to have more control over 1 jvm out of the 4 say<br />[09:29] kpenny: vs. one change in one file for 'all' jvms<br />[09:30] cluster_help: roger that. but other than the obvious, if you have 8 instances and 8 x maxheap ends up being more than the available memory on the host, don't you risk having a problem?<br />[09:31] kpenny: yes<br />[09:31] kpenny: that's when you'd need either 64 bit - or multiple machines - etc -<br />[09:31] kpenny: but yeah you never wanna allocate 2 much<br />[09:31] cluster_help: so why my infrastructure guy's boss is looking for is a technote or a blog post or something that says you SHOULD lower the max in the .config<br />[09:31] kpenny: but with separation of the configs you can control that -<br />[09:32] kpenny: well really the max should be determined by the app<br />[09:32] cluster_help: yeah. Like I told my boss, I know HOW to do it. (I did it yesterday on my laptop!)<br />[09:32] kpenny: so if you have large mem requirements -<br />[09:32] kpenny: then it should be higher - i guess i'd say there's no set rule - just<br />[09:32] kpenny: that depending on performance tsting what's best for the app at a given time -<br />[09:33] kpenny: i.e. if you have multiple applications using frameworks and cs etc -<br />[09:34] cluster_help: here's the background on my company - the dev manager and the infrastructure manager constantly bicker and fight little political battles. the infrastucture guy and me have about 10 years of exp in each of our areas of expertise<br />[09:34] cluster_help: but both our bosses want us to prove via external sources what we recommend<br />[09:34] kpenny: ok -<br />[09:35] cluster_help: and I am saying, and my infrastructure guy concurs, that we need sep config files for each instance in the cluster, (for granular control) of the max memory allocations<br />[09:35] kpenny: whats your max set to now - ? and is there a memory problem i.e. using 2 much memory<br />[09:35] cluster_help: but we need to show them WHY we recommend that<br />[09:35] cluster_help: the cluster isn't even in production yet, this is a first time set up<br />[09:35] cluster_help: we're actually clustering the staging env first for load testing<br />[09:36] cluster_help: then we'll do it in production<br />[09:36] cluster_help: we've never clustered or had very good front end load balancing here<br />[09:36] kpenny: i guess one more good point to throw in the mix is this<br />[09:37] kpenny: some apps perform better on different jvm versions - heck even sun vs. ibm etc -<br />[09:37] kpenny: so - with that - w/o granular control you're stuck using the same version that all other apps are using<br />[09:37] kpenny: in a single config -<br />[09:37] kpenny: vs what we went through were were we had an app that uses coldspringn and<br />[09:37] cluster_help: right<br />[09:38] kpenny: benefited from the bug fix in 1.6.v10<br />[09:38] kpenny: so we were able to just change that config and run the app<br />[09:38] kpenny: others can use stock or whatever<br />[09:38] cluster_help: this is going to be 3 or 4 instances of a single app deployed as an .ear<br />[09:38] kpenny: so 3 jvm's<br />[09:38] kpenny: clustered?<br />[09:39] kpenny: i guess i'd argue for it having the separation b/c it's easier to do it from the start -<br />[09:39] kpenny: and you really can't predict how things will be configured 5 months from now -<br />[09:39] kpenny: it's not a big deal to separate them -<br />[09:39] kpenny: and you can always do it at a later date if needed 2<br />[09:40] cluster_help: yeah<br />[09:40] cluster_help: but as far as you know, there isn't anything out there in a kb article or a tech note that says WHY you should do it that way, its just kind of a common knowledge/common sense thing?<br />[09:41] kpenny: well i know for dev its essential<br />[09:41] kpenny: for reasons like control over debugging ports<br />[09:41] kpenny: and you're likely working with multiple applications each with their own requirements<br />[09:42] kpenny: so for dev i'ts a no brainer - but if you have production separated out where x apps are all on y vm's etc.<br />[09:42] kpenny: and the other ones are on separate ones and they never cross over<br />[09:42] kpenny: then you can likely get away with stock setup<br />[09:42] kpenny: however -<br />[09:42] kpenny: we have some 'maintenance' things that happen with the app<br />[09:42] kpenny: and we found it most beneficial to have this as a separate instace - even though tis the same app -<br />[09:43] kpenny: but run schedules through it -<br />[09:43] kpenny: for batch processes etc - off on it's own - which<br />[09:43] kpenny: has it's own requirements for mem etc -<br />[09:43] kpenny: and we benefited from having them separate configs<br />[09:43] kpenny: also -<br />[09:43] kpenny: if you wanted to setup a scheduler 'instance' where all it did is kick off<br />[09:43] kpenny: cf schedules to your app<br />[09:43] kpenny: you don't wanna allocate 512 mb ram for that guy<br />[09:44] kpenny: likely small 128 via config<br />[09:44] kpenny: and run it alongside or whatever -<br />[09:44] kpenny: so there are many use cases - and they all depend on your preference<br />[09:44] kpenny: debugging locally with multiple instances w/o having separate jvm configs is impossible<br />[09:44] kpenny: so that's #1 reason I started doing it -<br />[09:45] kpenny: then after that i noticed all these other possibilities<br />[09:45] cluster_help: right, but if we're doing the multiple instances so we can have load balance and failover, each instance should be set to the max we can afford given the machines total available RAM and taking into account the OS's needs and stuff like that?<br />[09:45] cluster_help: in a production environment?<br />[09:46] kpenny: if you're app performs best with the max at that level -<br />[09:46] kpenny: some apps won't -<br />[09:46] kpenny: and typically if you allocate over what 1.8gb?<br />[09:46] kpenny: the service won't start?<br />[09:46] cluster_help: so really the load testing we're going to do will let us know if the settings will work<br />[09:46] kpenny: yup<br />[09:46] cluster_help: i think its 1.2gb.<br />[09:46] kpenny: right ok -<br />[09:47] kpenny: yeah try it at various levels -<br />[09:47] cluster_help: cool - hey, thanks for the info man, it really helps<br />[09:47] kpenny: np - ! best of luck -<br />[09:47] cluster_help: thanks, i appreciate itCode Fusion, LLC (Kevin Penny)http://www.blogger.com/profile/01462721460414469270noreply@blogger.com0