<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5463773326793563699</id><updated>2011-11-27T16:23:50.512-08:00</updated><category term='Billing'/><category term='Crystal Reports'/><category term='Orphan'/><category term='FTP Client'/><category term='Java Performance'/><category term='Performance'/><category term='SQL'/><category term='Using the right technology'/><category term='Tweak'/><category term='Technology'/><category term='Crystal User Session'/><category term='Template Method Pattern'/><category term='Schemaless Database'/><category term='Hibernate'/><category term='Developing iPhone App'/><category term='Delete'/><category term='I18N'/><category term='I18N Bundle'/><category term='Checksum'/><category term='Oracle'/><category term='SOA'/><category term='Test'/><category term='Font'/><category term='JProfiler'/><category term='Debug Mode'/><category term='Jakarta Commons'/><category term='WS'/><category term='Reporting'/><category term='IT Process'/><category term='MyEclipse'/><category term='all-delete-orphan'/><category term='FTP'/><category term='Software Design'/><category term='Virus'/><category term='Schema Free Database'/><category term='Solaris'/><category term='Presentation'/><category term='Egoless Programing'/><category term='Test Case'/><category term='Sofrware Architecture'/><category term='Solaris 10'/><category term='Chart'/><category term='Apache'/><category term='JUnit'/><category term='Linux Scripting'/><category term='Using Technology'/><category term='Design Patterns'/><category term='Good Programming Practice'/><category term='Mobile'/><category term='Font Change'/><category term='JFreeChart'/><category term='Component Design'/><category term='JBoss'/><category term='Script'/><category term='Worm'/><category term='MySQL'/><category term='QA'/><category term='Jakarta Commons Net'/><category term='synchronized'/><category term='Six Sigma'/><category term='BPM'/><category term='iPhone Mobile Camp Atlanta'/><category term='Code Quality'/><category term='Solaris Install'/><category term='Java'/><category term='Rally WS API'/><category term='Web Service'/><category term='NoSQL'/><category term='Set'/><category term='CouchDB'/><category term='Pattern'/><category term='BO XI Java SDK'/><category term='Cascade'/><category term='Malware'/><category term='Web Service Performance'/><category term='Batch Mode'/><category term='iPhone'/><category term='Tweaking Web Service'/><category term='Agile'/><category term='Oracle BRM Portal Java PCM SDK'/><category term='Database'/><category term='Rally'/><category term='Singleton'/><category term='session'/><category term='Internationalization'/><category term='Chain'/><category term='Update'/><category term='Shell Scripting'/><category term='XP Programming'/><category term='Chain of Responsibility'/><category term='LegentTitle'/><title type='text'>Code Crawler</title><subtitle type='html'>This blog is all about Java/J2EE Technologies, SDLC Methodologies, Integrating Applications, New Technology Trends, Optimizing Codes, OOAD/OOP Subjects and other platforms and tools I've had experience with to share.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-477470583007618745</id><published>2011-01-17T12:30:00.000-08:00</published><updated>2011-01-17T12:30:34.914-08:00</updated><title type='text'>Issue on starting RabbitMQ 2.2.0 After Installation via MacPorts</title><content type='html'>I used MacPorts to install RabbitMq 2.2.0 on &amp;nbsp;my Mc OS X (Snow Leopard) laptop. After installing I tried running the command sudo rabbitmq-server and I get an error saying there's already a rabbitmq process running. The startupitem.log from /opt/local/var/log/rabbitmq indicated the broker started successfully, using the domain localhost. I was expecting it to use the domain mycomputername since that is what i have configured in my /etc/hosts file. I cannot connect to the node rabbit@mycomputername when I try to run the command rabbitmqctl. Somehow rabbitmq-server is using localhost domain while rabbitmqctl is using mycomputername domain.&lt;br /&gt;&lt;br /&gt;Did more digging and found out that the daemon generated by MacPorts after it installed RabbitMQ was getting spawned when my computer starts up. But the problem is it's using localhost as the domain instead of mycomputername. When I try to kill that spawned process, rabbitmq automatically re-starts and now using the node rabbit@mycomputername. So I can now use rabbitmqctl command and query the rabbitmq server. To permanently fix the issue, I have to remove the plist file org.macports.rabbitmq-server.plit which defines the start/stop behavior of rabbitmq-server which is registered as a global daemon process that will automatically kick-off when my computer boots up.&lt;br /&gt;&lt;br /&gt;After removing the plist file, and manually starts rabbitmq by typing sudo rabbitmq-server, I no longer see any errors. I wasn't sure why MacPorts generated that plist file that always uses localhost as it's domain instead of mycomputername when it starts rabbitmq-server initially.&lt;br /&gt;&lt;br /&gt;If your erl_crash.dump file contains the string below you might have the same problem. Either check to see if you have configured your /etc/hosts file properly or that you are having the exact same problem I just came across with.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;no_hosts_file&lt;br /&gt;'Warning: No HOSTSFILE specified!'&lt;br /&gt;address&lt;br /&gt;'Warning: No NAMESERVER or RESOLVFILE specified!'&lt;br /&gt;&lt;br /&gt;Glad I can start playing around with RabbitMQ!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-477470583007618745?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/477470583007618745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2011/01/issue-on-starting-rabbitmq-220-after.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/477470583007618745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/477470583007618745'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2011/01/issue-on-starting-rabbitmq-220-after.html' title='Issue on starting RabbitMQ 2.2.0 After Installation via MacPorts'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-7340877527224395035</id><published>2010-11-30T19:28:00.000-08:00</published><updated>2010-11-30T19:28:45.558-08:00</updated><title type='text'>Working as a Consultant</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Wearing many hats at work is what interest interest me with my job. Being a Consultant definitely provides that. Meeting clients, talking about their needs, identifying technology platform, designing the system and managing a development team are just about the things I've enjoyed doing.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Developing a system in-house for a client makes the development and management effort very interesting but I find there are two most critical things that needs to happen before a single code is written as shown below.&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Validating verbal and written client's development platform&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Knowing how your client's think, how your client's work, and what makes them happy.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Asking a client's system environment &amp;nbsp;is not enough to produce a product's platform development. One should consider validating the client's environment by developing a dummy framework built according the to their system specification. Try dropping that framework onto their server and start running some dummy test cases. This will validate the version of the programming language being used, modules installed, security restrictions and some unknown and known incompatibilities. Some client's environment are tightly secured even down to the smallest feature of an application and sometimes this is what makes developing/deploying an application difficult. Validating an environment by writing a sample framework is the surest way to know exactly the platform one should be developing on.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Now, another interesting thing to note is that when you understand who your clients are and how they think, it makes it a lot easier to work with them and &amp;nbsp;one can pretty much predict how the application should be designed and created. Carefully listen to what they need and how it should be incorporated to the application. The culture of the company reflects on their personality and this is what drives what they produce and use. A consultant should be able to identify and classify business functions that are most critical, important and least important.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-7340877527224395035?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/7340877527224395035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2010/11/working-as-consultant.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/7340877527224395035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/7340877527224395035'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2010/11/working-as-consultant.html' title='Working as a Consultant'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-5377668912682792745</id><published>2010-11-30T19:27:00.000-08:00</published><updated>2010-11-30T19:27:50.593-08:00</updated><title type='text'>Internationalizing Java Web Applications Part I</title><content type='html'>&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;Internationalizing an application can become a daunting task. Specially if the application already existed for quite some time. What more if the business decides to support a huge number of languages? There are several things to consider to ensure that the application displays the correct translation according to its locale. This is just the minimum list but there might be some other stuff to consider. Let's start with the list below.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;The Setup:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;1. Windows Server&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;2. Windows XP Client Machine&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;3. Java Web Application&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;4. SQL Server 2005&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;5. Firefox/IE&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;1. Browser Support&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;2. OS and Microsoft Office Language Settings&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;4. Database Internationalization Support&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;6. i18n Bundle - Property Files and Data&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;7. Font Support (Highlight If Text is embedded in an image)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;8. UTF-8 Encoding&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;9. JSON element/data Encoding/Decoding&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;10. The Locale class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;b&gt;Browser Support&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;This is the easiest to figure out. Lots of browsers out there supports tons of languages. It's just a matter of choice.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;b&gt;OS and MS Office Language Settings&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;b&gt;1. OS Server&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;The operating system should have been installed with the languages the users are interested in. At least the english (en_US) language and make it the default language. You can check what the OS supports by checking the Regional and Language Options if your server is Windows based. There you can see Standards and Formats of the currency, number and time from the Regional Options tab. While the Languages tab shows the option to choose what Text Services and Input Languages to use and allows one to install East Asian Language Support and this is really important specially if we are working with Chinese, Japanese or Korean language.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;Now for an Application Testing Environment that supports many different languages, the server can have the English [United States] setting from Regional Options and leave the other properties unchanged. If Japanese, Chinese or Korean or any East Asian Language is needed for the application, then the East Asian Language Support must be installed.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;To test if the language settings are correct, drop a text file that contains data with the language of interest to the server. Open the file. If the data is in Chinese, then the text characters should show up as Chinese characters. Otherwise, the language settings aren't right.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;b&gt;2. OS Client&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;On the client side, there must also be Language settings that needs to be done. The OS should also have come installed with other languages. But the East Asian Language is by default not installed. This must be installed if Japanese, Chinese or Korean needs to be supported.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;b&gt;3. Microsoft Office&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;Apparently, Microsoft Office needs to be tweaked to properly display East Asian characters. No tweaking is necessary for other languages. Just go to Microsoft Office Tools and click on Microsoft Office Language Settings. There you can enable other languages for proper viewing of data.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;b&gt;Database Internationalization Support&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;All major database products supports internationalization. It should be able to support Unicode characters or the literal character of that language (by using the prefix 'N' when inserting data into the database).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;&lt;b&gt;I18N Bundle&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: small;"&gt;&lt;span style="font-size: 13px;"&gt;All internationalized app have i18n bundle which is used for displaying the appropriate label, description or error message to the application. This bundle is basically a jar file containing all the supported languages or locales. The files in that jar are properties file of the form I18N_locale.properties (i.e. I18N_en_US.properties for English US). So each properties file is composed of a key/value pair. If this is done right, then you avoid a lot of translation issues. The number of keys from the default locale, say en_US should match the number of keys in the other locales. The value for each key must be translated for its target locale.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-5377668912682792745?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/5377668912682792745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2010/11/internationalizing-java-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/5377668912682792745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/5377668912682792745'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2010/11/internationalizing-java-web.html' title='Internationalizing Java Web Applications Part I'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-3520153529014869648</id><published>2010-03-04T20:09:00.000-08:00</published><updated>2010-03-04T20:09:12.146-08:00</updated><title type='text'>Atlanta ITARC 2010</title><content type='html'>One of the presentations that really got me the most was from Bill Cason's Enterprise Architecture 2.0. He works for Troux Company. I thought he was phenomenal in terms of unveiling key ideas in making an IT organization successful in meeting business needs.&lt;br /&gt;&lt;br /&gt;He didn't talk about technologies and trends but mainly focused on how should an enterprise architect treat his relationship with the business people and how he should realize things that matters most to the business. Here are some concepts he shared worth noting.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;10 Critical Success Factors For Enterprise Architecture&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Seek expert help to setup an Enterprise Architecture practice&lt;/li&gt;&lt;li&gt;Have Executive Sponsorship&lt;/li&gt;&lt;li&gt;Clear Roll-out Plan&lt;/li&gt;&lt;li&gt;Strong Internal Program Leadership&lt;/li&gt;&lt;li&gt;Focus on Enterprise Architecture Adoption Process&lt;/li&gt;&lt;li&gt;Laser-focus on business value&lt;/li&gt;&lt;li&gt;Leverage the wider data team&lt;/li&gt;&lt;li&gt;Automate the data collection process&lt;/li&gt;&lt;li&gt;Market your success internally&lt;/li&gt;&lt;li&gt;Flexible Enterprise Architecture Technology to enable successful Enterprise Architecture&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;10 Lessons Learned&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Focus on what is important to the business &lt;b&gt;NOW&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Align with allies, don't waste time with disbelievers&lt;/li&gt;&lt;li&gt;Seek funded, complex initiatives&lt;/li&gt;&lt;li&gt;Careful when "moving cheese". Consider politics in play.&lt;/li&gt;&lt;li&gt;Create sustainable process&lt;/li&gt;&lt;li&gt;Publicize your results&lt;/li&gt;&lt;li&gt;Recognize stakeholder needs&lt;/li&gt;&lt;li&gt;Avoid being the bottleneck. Federate and participate.&lt;/li&gt;&lt;li&gt;Leverage established best practices&lt;/li&gt;&lt;li&gt;Implement incrementally&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Also, IT must show cost transparency and must know what compliance the business supports.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-3520153529014869648?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/3520153529014869648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2010/03/atlanta-itarc-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/3520153529014869648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/3520153529014869648'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2010/03/atlanta-itarc-2010.html' title='Atlanta ITARC 2010'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-3219463628728615610</id><published>2010-02-09T07:17:00.000-08:00</published><updated>2010-02-09T07:33:52.638-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Shell Scripting'/><category scheme='http://www.blogger.com/atom/ns#' term='MySQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Script'/><category scheme='http://www.blogger.com/atom/ns#' term='Batch Mode'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux Scripting'/><title type='text'>Executing MySQL Scripts in Batch Mode</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;I wrote a script that would accept a file path and traverse through the directory tree to search for files with extension *.sql and load those sql scripts into MySQL and run them.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;My *.sql files are basically scripts that builds database tables.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Here's what I've done;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;################################################################################&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;# Reads the specified directory and traverses for the sql script files.&lt;br /&gt;# The first argument($1) is the target directory to be searched.&lt;br /&gt;&lt;br /&gt;#Read the files in the directory and generate the table creation statements separating them using the semi-colon delimiter&lt;br /&gt;# If there are sub-directories, they will be traversed and all files ending in '.sql' will be processed&lt;br /&gt;source_queries=""&lt;br /&gt;source_command="source "&lt;br /&gt;echo "argument passed $1"&lt;br /&gt;&lt;br /&gt;for file in $(find $1 -type f -iname '*.sql'); do&lt;/span&gt;    &lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;source_queries="${source_queries}${source_command}${file};"&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;# Uncomment to printout generated queries/statements for debugging purposes&lt;br /&gt;# echo "printing statements generated ${source_queries}"&lt;br /&gt;&lt;br /&gt;# Connect to the database using the 'stratus' database and execute the query statements generated&lt;br /&gt;# This can be run on the background as well&lt;br /&gt;&lt;br /&gt;echo "Executing database tables creation scipt......."&lt;br /&gt;mysql -u myuser --password=mypassword --database=mydatabase -e "${source_queries}"&lt;br /&gt;echo "script completed...."&lt;br /&gt;#################################################################################&lt;/span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;Say if there's 1 script file with filename create_person_table.sql under the target directory /opt/db_scripts the resulting mysql command would look like this&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;mysql -u myuser --password=mypassword --database=mydatabase -e "source&amp;nbsp;/opt/db_scripts/create_person_table.sql"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;If there are multiple sql files the clause on the '-e' option would look like this&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;mysql -u myuser --password=mypassword --database=mydatabase -e "source&amp;nbsp;/opt/db_scripts/create_person_table.sql;source&amp;nbsp;/opt/db_scripts/create_employee_table.sql"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-3219463628728615610?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/3219463628728615610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2010/02/executing-mysql-scripts-in-batch-mode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/3219463628728615610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/3219463628728615610'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2010/02/executing-mysql-scripts-in-batch-mode.html' title='Executing MySQL Scripts in Batch Mode'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-2952313219691146392</id><published>2010-02-06T13:07:00.000-08:00</published><updated>2010-02-06T13:08:31.086-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Test Case'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Test'/><category scheme='http://www.blogger.com/atom/ns#' term='JUnit'/><title type='text'>JUnit</title><content type='html'>The setup() and tearDown() methods of the TestCase class apparently behaves differently from what some people would have thought. If these methods are used in a test class, one would think that it would be only called once for the lifetime of the test class. But it is not the case.&lt;br /&gt;&lt;br /&gt;To illustrate this further, lets consider the sample code below. It's main purpose is to show how the methods above behaves when the test case is run.&lt;br /&gt;&lt;br /&gt;Say we have this test class:&lt;br /&gt;&lt;br /&gt;1.public class TestPerson extends TestCase{&lt;br /&gt;2. &amp;nbsp; &amp;nbsp; &amp;nbsp; private Person person;&lt;br /&gt;3.&lt;br /&gt;4. &amp;nbsp; &amp;nbsp; &amp;nbsp; protected void setup(){//create Greg&lt;br /&gt;5. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;person&amp;nbsp;= new Person("Greg");&lt;br /&gt;6. &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;7.&lt;br /&gt;8. &amp;nbsp; &amp;nbsp; &amp;nbsp; protected void tearDown(){&lt;br /&gt;9. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;person&amp;nbsp;= null;&lt;br /&gt;10. &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;11.&lt;br /&gt;12. &amp;nbsp; &amp;nbsp; &amp;nbsp; public void testCreateChild(){&lt;br /&gt;13. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;person.createChild("Nimfa");&lt;br /&gt;14. &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;15.&lt;br /&gt;16 &amp;nbsp; &amp;nbsp; &amp;nbsp; public void testMarrySomebody(){&lt;br /&gt;17. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; person.getMarriedTo("Laila");&lt;br /&gt;18. &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;19.}&lt;br /&gt;&lt;br /&gt;When this test case is run, here's what's going to happen:&lt;br /&gt;&lt;br /&gt;1. At line 2, the&amp;nbsp;person&amp;nbsp;variable is declared and initialized&lt;br /&gt;2. At line 4, setup() method is called&lt;br /&gt;3. At line 12, &amp;nbsp;testCreateChild() method is called (assuming this is the first method called)&lt;br /&gt;4. At line 8, &amp;nbsp;tearDown() method is called&lt;br /&gt;5. At line 2,&amp;nbsp;the&amp;nbsp;person&amp;nbsp;variable is declared and initialized again&lt;br /&gt;6. At line 4,&amp;nbsp;setup() method is called is called again&lt;br /&gt;7. At line 16,&amp;nbsp;&amp;nbsp;testMarrySomebody() is called&lt;br /&gt;8.&amp;nbsp;At line 8, &amp;nbsp;tearDown() method is called&lt;br /&gt;&lt;br /&gt;After code execution, Greg will loose a child names Nimfa then get married to Laila instead of having both the child and getting married. Sad story....&lt;br /&gt;&lt;br /&gt;Here's the explanation. In a nutshell, the number of test methods we have, in this case two(testCreateChild() and&amp;nbsp;testMarrySomebody()), is directly proportional to the calls of the setup() and tearDown() methods and to the declaration and initialization of the member attributes. The variable&amp;nbsp;person&amp;nbsp;will be instantiated again with a new Person object but with the same value which is 'Greg' for each method loosing the previous state of the child created. Greg will always end up getting married and not having a child.&lt;br /&gt;&lt;br /&gt;If the intention on line 5 is to create an object which has a state consistent across all test methods, then it is a problem, since JUnit will basically create a new object per test methods. Object state maybe different from each test methods. The best approach would be to not use the setup() but instead initialize the object in the test method itself. So the object(s) initialized at the &lt;b&gt;setup() method is never reused to the rest of the test methods&lt;/b&gt;. The tearDown() method is not necessary since it's just destroying the created object unless, a specific resource(i.e. database connection, etc.) needs to be released and should be called here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-2952313219691146392?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/2952313219691146392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2010/02/junit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/2952313219691146392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/2952313219691146392'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2010/02/junit.html' title='JUnit'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-1644716413128622703</id><published>2010-02-02T13:57:00.000-08:00</published><updated>2010-02-06T13:09:14.413-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QA'/><category scheme='http://www.blogger.com/atom/ns#' term='Code Quality'/><category scheme='http://www.blogger.com/atom/ns#' term='Egoless Programing'/><category scheme='http://www.blogger.com/atom/ns#' term='Good Programming Practice'/><category scheme='http://www.blogger.com/atom/ns#' term='XP Programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Agile'/><title type='text'>Ten Commandments of Egoless Programming</title><content type='html'>A friend from work forwarded this information to me, which hed extracted from a TechRepublic article and I thought it was pretty interesting. I'm the Apache Software Foundation Group follows this very much, as it reflects how good their software products are and its free!!!&lt;br /&gt;&lt;br /&gt;Here are the 10 Commandments of Egoless Programming, my friend willingly shared.&lt;br /&gt;&lt;br /&gt;1. Understand and accept that you will make mistakes.&lt;br /&gt;2. You are not your code.&lt;br /&gt;3. No matter how much "karate" you know, someone else will always know more.&lt;br /&gt;4. Don't rewrite code without consultation.&lt;br /&gt;5. Treat people who know less than you with respect, deference, and patience.&lt;br /&gt;6. The only constant in the world is change.&lt;br /&gt;7. The only true authority stems from knowledge, not from position.&lt;br /&gt;8. Fight for what you believe, but gracefully accept defeat.&lt;br /&gt;9. Don't be "the guy in the room."&lt;br /&gt;10. Critique code instead of people-be kind to the coder, not to the code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-1644716413128622703?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/1644716413128622703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2010/02/ten-commandments-of-egoless-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/1644716413128622703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/1644716413128622703'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2010/02/ten-commandments-of-egoless-programming.html' title='Ten Commandments of Egoless Programming'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-6750766044013997416</id><published>2010-01-08T11:43:00.000-08:00</published><updated>2010-02-06T13:09:44.288-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Solaris Install'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris 10'/><title type='text'>Installing Solaris 10 Software Companion CD from ISO Image</title><content type='html'>&lt;span style="font-family: inherit;"&gt;To install the software companion from an iso image on a solaris machine follow this steps:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;1. Type the command&amp;nbsp;&lt;/span&gt;&lt;span style="color: #39352e; line-height: 21px;"&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;lofiadm -a /export/temp/software.iso&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;. This command creates a block device from a file which can be mounted. The block device will look something like this &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;/dev/lofi/1&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt;&lt;span style="font-family: inherit;"&gt;2. Mount the block device by typing this command&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;mount -F hsfs -o ro /dev/lofi/1 /mnt&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;. We are mounting a file system of type hsfs(High Sierra File System) which is basically a representation of our iso image (compact disc). We can also use the cdfs(Compact Disc File System) if the file is being mounted from a cdrom. The &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;ro &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;option basically means its a read-only.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt;&lt;span style="font-family: inherit;"&gt;3. You can install one package at a time, but for the purpose of this demo, I'm gonna install all of the packages. Next step is to create an &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;admin &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;file&amp;nbsp;say on this path /var/tmp/&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;admin&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;. The admin file should be created by root user. It contains the following:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;span style="line-height: 21px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;mail=&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;conflict=nocheck&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;setuid=nocheck&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;action=nocheck&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;partial=nocheck&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;instance=overwrite&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;idepend=nocheck&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;rdepend=nocheck&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;space=check&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;br /&gt;Now this will install the packages without having the user interact with the package installation.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt;&lt;span style="font-family: inherit;"&gt;4. Change directory to the location of the software companion packages relevant to your architecture. In my case I'll be installing it on a Solaris 10 OS. After changing to that directory it should look something like this&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;/mnt/Solaris_Software_Companion/Solaris_sparc/Packages&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt;&lt;span style="font-family: inherit;"&gt;5. As a root, execute this command &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;pkgadd -a /var/tmp/admin -d&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-family: inherit;"&gt;/mnt/Solaris_Software_Companion/Solaris_sparc/Packages&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;. The &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: inherit;"&gt;-a&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;option overrides the default admin file with the one we just created.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt;&lt;span style="font-family: inherit;"&gt;6. Once it executes, it will display all the available packages to be installed and will asks you to install a package or all of the packages. Choose 'all'. Installation will proceed to run.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e;"&gt;&lt;span style="line-height: 21px;"&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family: inherit;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #39352e; font-family: monospace; font-size: small;"&gt;&lt;span style="font-size: 13px; line-height: 21px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-6750766044013997416?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/6750766044013997416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2010/01/installing-solaris-10-software.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/6750766044013997416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/6750766044013997416'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2010/01/installing-solaris-10-software.html' title='Installing Solaris 10 Software Companion CD from ISO Image'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-3363246808915581414</id><published>2010-01-01T15:44:00.000-08:00</published><updated>2010-01-09T14:04:13.060-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Schema Free Database'/><category scheme='http://www.blogger.com/atom/ns#' term='NoSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Schemaless Database'/><category scheme='http://www.blogger.com/atom/ns#' term='CouchDB'/><title type='text'>Installing CouchDB Version 0.10.1 On Fedora 4</title><content type='html'>I've heard about the hype on CouchDB from this link&amp;nbsp;&lt;a href="https://nosqleast.com/2009/#speaker/miller"&gt;NoSQL&lt;/a&gt;&amp;nbsp;and the design behind it is pretty interesting. It's a different kind of database that doesn't use schemas at all. Built on Erlang which is a well known language solid enough to handle a grand scale of processes without sacrificing performance. Its data structure is a B-tree and uses MapReduce to traverse it at an incredible speed. CouchDB is document based and provides the option of &lt;br /&gt;working online and offline. With its interesting characteristics, I decided to install it on my Fedora machine.&lt;br /&gt;&lt;br /&gt;Here are the dependencies I've installed (assuming everything was a downloaded source):&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;1. curl-7.19&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;2. SpiderMonkey - js-1.7.0&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;3. ICU - icu4c-4_2_1&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;4. Erlang OTP - otp_src_R13B03&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;5. autoconf-2.13&lt;br /&gt;&lt;br /&gt;Somebody had provided a script to properly and easily wire SpiderMonkey with CouchDB as can be seen from&amp;nbsp;&lt;a href="http://74.125.47.132/search?q=cache:http://dt.in.th/2008-03-03.spidermonkey-linux.html"&gt;http://74.125.47.132/search?q=cache:http://dt.in.th/2008-03-03.spidermonkey-linux.html&lt;/a&gt;. This is our script:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;#!/bin/bash&lt;br /&gt;if test "$USER" = root; then&lt;br /&gt;    wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz -O- | tar xvz&lt;br /&gt;    cd js/src&lt;br /&gt;    make -f Makefile.ref&lt;br /&gt;    mkdir -p /usr/include/smjs/ -v&lt;br /&gt;    cp *.{h,tbl} /usr/include/smjs/ -v&lt;br /&gt;    cd Linux_All_DBG.OBJ&lt;br /&gt;    cp *.h /usr/include/smjs/ -v&lt;br /&gt;    mkdir -p /usr/local/{bin,lib}/ -v&lt;br /&gt;    cp js /usr/local/bin/ -v&lt;br /&gt;    cp libjs.so /usr/local/lib/ -v&lt;br /&gt;else&lt;br /&gt;    echo "You must be root. Try sudo $0"&lt;br /&gt;fi&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To ensure that CouchDB will compile properly, use the options --with-js-lib and --with-js-include when installing it. Type the command couchdb to run it. Then try to run this command curl http://127.0.0.1:5984/. You should see something like this&amp;nbsp;{"couchdb":"Welcome","version":"0.10.1"} as the response. This means that the database was successfully installed.&lt;br /&gt;&lt;br /&gt;Futon is a great web interface to the database. Be sure to run all tests from Futon. If the URL used to access Futon is say http://localhost:5984/_utils, there are 3 tests that will fail - oauth, replication and security_validation. This is a known issue for some common network configurations. My setup is basically a Windows XP accessing&amp;nbsp;thru Futton the&amp;nbsp;CouchDB server instance &amp;nbsp;which is installed on a Fedora machine. Both machines are connected via a router without any DNS configurations. Whatever the network configuration is, this URL will always work and all tests passes - http://127.0.0.1:5984/_utils.&lt;br /&gt;&lt;br /&gt;I prefer a different ip address used to access Futon so I went ahead and updated two configuration files which are default.ini and local.ini. The settings from local.ini will override the default.ini. Depending on your installation of CouchDB, these files can be found at /usr/local/etc/couchdb directory. Change the binding address to suit your needs.&lt;br /&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;br /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-3363246808915581414?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/3363246808915581414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2010/01/installing-couchdb-version-0101-on.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/3363246808915581414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/3363246808915581414'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2010/01/installing-couchdb-version-0101-on.html' title='Installing CouchDB Version 0.10.1 On Fedora 4'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-5506774658614626286</id><published>2009-12-22T21:10:00.000-08:00</published><updated>2010-02-06T13:10:08.439-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Malware'/><category scheme='http://www.blogger.com/atom/ns#' term='Virus'/><category scheme='http://www.blogger.com/atom/ns#' term='Checksum'/><category scheme='http://www.blogger.com/atom/ns#' term='Worm'/><title type='text'>Checksum App for Windows is a Worm!</title><content type='html'>Do not download the Checksum App from this site http://corz.org/windows/software/checksum/ . Once downloaded and run, a worm is loaded! Please see the image below. I'm glad I had my Lavasoft Ad-Aware running. Somehow my McAfee didn't detect it.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_DCF0BWyN09g/SzGmNdH7NTI/AAAAAAAABFY/Rqgf-3XuoFk/s1600-h/checksum_4_win_with_worm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_DCF0BWyN09g/SzGmNdH7NTI/AAAAAAAABFY/Rqgf-3XuoFk/s640/checksum_4_win_with_worm.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;span id="goog_1261544883320"&gt;&lt;/span&gt;&lt;span id="goog_1261544883321"&gt;&lt;/span&gt;&lt;a href="http://www.blogger.com/"&gt;&lt;/a&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;br /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;input id="gwProxy" type="hidden" /&gt;&lt;input id="jsProxy" onclick="jsCall();" type="hidden" /&gt;&lt;br /&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-5506774658614626286?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/5506774658614626286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/12/checksum-app-for-windows-is-worm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/5506774658614626286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/5506774658614626286'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/12/checksum-app-for-windows-is-worm.html' title='Checksum App for Windows is a Worm!'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_DCF0BWyN09g/SzGmNdH7NTI/AAAAAAAABFY/Rqgf-3XuoFk/s72-c/checksum_4_win_with_worm.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-4572832973984185032</id><published>2009-11-14T16:12:00.000-08:00</published><updated>2010-02-06T13:10:58.232-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='I18N Bundle'/><category scheme='http://www.blogger.com/atom/ns#' term='I18N'/><category scheme='http://www.blogger.com/atom/ns#' term='Internationalization'/><title type='text'>Internationalizing Numbers and Dates in Java</title><content type='html'>&lt;div&gt;&lt;b&gt;Locale&lt;/b&gt;&lt;/div&gt;It's easy to be tempted to find a tool that can do a specific job. Consider formatting Dates and Numbers for different countries. If you do find a tool, great, but that's just making your application dependent on another tool and redundant since Java already provides you an API that does the job. There's a ton of language support that Java provides. If Klingon would become a language in the future, I'm sure Java will support it, hopefully here on earth.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A Locale in Java is a representation of the Language and the Country. It's also a class. Their's two properties of it that is a must - language id and country code each of which consists of&amp;nbsp;2 characters. Say if you have the German language, the locale is "&lt;b&gt;de&lt;/b&gt;". If the language is still German but of the country Austria then the locale is "&lt;b&gt;de_at&lt;/b&gt;". Locale for United States would be "&lt;b&gt;en_US&lt;/b&gt;". There's a lot of websites that explains the different locales in different countries so I'm gonna leave it out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When instantiating a Locale take its important to note what arguments are being passed to its constructor. I've come across a bug in one of the applications I've worked at where a line of code was passing a language id of this form languageId_countryCode where in fact it should only be languageId. If you need to pass both to the constructor, separate those two values out. See example below.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Locale germanLanguageId = new Locale("de_at"); // wrong assignment of locale value.&lt;/div&gt;&lt;div&gt;Locale germanLanguageId = new Locale("de"); // correcet assignment.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If both the language id and country code is needed then it should look like this.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Locale germanLanguageIdAndCountryCode = new Locale("de", "at");&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Localized Or Internationalized Date&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This is pretty straight forward. Just use the DateFormat class and pass in the right locale to get the right date display as shown below. When you actually want to get an instance of that class, use the factory method getDateInstance(int style, Locale locale).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Date date = new Date(); // Now the date can be of any type as long as its an object.&lt;/div&gt;&lt;div&gt;DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, locale);&lt;/div&gt;&lt;div&gt;String internationalizedDateString =&amp;nbsp;dateFormat.format(date);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now depending on your current Locale, let's say we are using the german language id &lt;b&gt;de&lt;/b&gt;, their date would actually be in this format. This is due to the fact that we chose the format type SHORT.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;dd.mm.yyyy // so for todays date in german it would be 14.11.2009, thank goodness I decided not to write&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // this yesterday!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now for locale &lt;b&gt;en_US &lt;/b&gt;it would be 11/14/2009. Of course the code will take care of doing the formatting for whatever locale the application is supporting.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Localized or Internationalized Number&lt;/b&gt;&lt;/div&gt;&lt;div&gt;First thing to do is to always define the pattern of the number that we would like to show in different locales. When I say pattern, its how many zeros do we want to show and if we don't want to show anything is the value of the number is equal to zero, etc. The DecimalFormat class has a method applyPattern(String pattern) where we can plugin the pattern we want. We can get an instance of this class by using the factory method of NumberFormat and cast it to DecimalFormat as shown below.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;float aNumber = 1,500.98;&lt;/div&gt;&lt;div&gt;&lt;div&gt;DecimalFormat decimalFormat = (DecimalFormat)NumberFormat.getInstance(locale); //factory method&lt;/div&gt;&lt;div&gt;decimalFormat.applyPattern("#,##0.00"); //our cool pattern&lt;/div&gt;&lt;div&gt;String internationalizedAndFormattedNumber = decimalFormat.format(aNumber&amp;nbsp;);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now the pattern &lt;b&gt;#,##0.00&lt;/b&gt; means that the grouping of the number is in thousand. The hash sign is any digit, where if its zero it won't display that number. The zero in the pattern is a digit, where if its zero, it would display as 0. We are also restricting the number of digits after the decimal to two digits. Say if we have a number 1,450.50 in english locale (en_US), upon formatting this to german (de) it should show up as&lt;/div&gt;&lt;div&gt;1.450,50. The comma becomes as period and the period becomes a comma. Of course, if the number we are trying to format is in millions, then our pattern should look something like this #,###,##0.00.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If the pattern is missing, some numbers get displayed in some other locales and some would display just fine. If our number is 0 to be formatted in german it might appear like this 0.0E3 which just confuses our business people looking at our localized spreadsheet. A pattern must be supplied always to display the right number in the right format. If a number in our localized csv file displays as 12.61 and then opened in excel, that number will be translated into a date equal to December 1967. This is the side effect of not supplying a pattern.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One last tip, if an application is processing data and converting it into CSV for excel viewing, remember to replace &lt;b&gt;all&lt;/b&gt; carriage line feeds or new lines embedded in a String value with an empty String (" "). Say we have the String "The value\n is supposed to be\n entered here". This value should be in one row on a cell right? But with the new line character &lt;b&gt;\n &lt;/b&gt;excel will actually break those strings into 3 rows. It would be&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Cell A&lt;/div&gt;&lt;div&gt;Row 1 &amp;nbsp; &amp;nbsp; The value&lt;/div&gt;&lt;div&gt;Row 2 &amp;nbsp; &amp;nbsp; is supposed to be&lt;/div&gt;&lt;div&gt;Row 3 &amp;nbsp; &amp;nbsp; entered here&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Have fun with I18N !&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-4572832973984185032?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/4572832973984185032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/11/internationalizing-numbers-and-dates-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/4572832973984185032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/4572832973984185032'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/11/internationalizing-numbers-and-dates-in.html' title='Internationalizing Numbers and Dates in Java'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-4011914315975039150</id><published>2009-10-15T09:16:00.000-07:00</published><updated>2009-10-16T07:21:36.390-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cascade'/><category scheme='http://www.blogger.com/atom/ns#' term='Set'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='all-delete-orphan'/><category scheme='http://www.blogger.com/atom/ns#' term='Orphan'/><category scheme='http://www.blogger.com/atom/ns#' term='Delete'/><category scheme='http://www.blogger.com/atom/ns#' term='Update'/><category scheme='http://www.blogger.com/atom/ns#' term='Hibernate'/><title type='text'>Working with Deleting/Updating a Set In Hibernate</title><content type='html'>&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;If a hibernate mapping object contains contains a Set of objects, it's usually configured with the &lt;/span&gt;&lt;/span&gt;&lt;set&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt; attribute 'set'.  If you want hibernate to take care of updating/deleting those objects in the set from the database table, the set attribute cascade must have the value "all-delete-orphan" and properly handled in the code that tries to update it.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;Say our parent object is Car and child objects are of type Part. Our set mapping would be of the form below&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DCF0BWyN09g/StdUONjAG7I/AAAAAAAABFQ/ElxxADkyrHI/s1600-h/hibernate_set.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 301px; height: 105px;" src="http://2.bp.blogspot.com/_DCF0BWyN09g/StdUONjAG7I/AAAAAAAABFQ/ElxxADkyrHI/s400/hibernate_set.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5392871681930828722" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;set name="parts"&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;In order to make the changes to the set elements which are of Part type, the order of the update statements must be of this sequence.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;Car car = manufacturer.getCar();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;//we want to reduce the number of parts say from 10 to 8.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;//If the two parts have the ids 9 and 10, then let's remove it &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;Set&lt;/span&gt;&lt;/span&gt;&lt;part&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt; parts = car.getParts()&lt;/span&gt;&lt;/span&gt;&lt;/part&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;//iterate through the set and grab the objects with ids 9 and 10&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;Part part9 = (Part)iter.next();//assuming this is the 9th object in the set&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;Part part10 = (Part)iter.next();//assuming this is the 10th object in the set&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;parts.remove(part9);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;parts.remove(part10);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;//persist to database to update the records&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;saveOrUpdate(car); //this will merge the differences. the database record will //now have 8 rows instead of 10 for the parts. Also, you can use the merge(car) //method and it will work the same way.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;//if you want to delete all parts since its no longer produced, just do this&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;parts.clear();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;saveOrUpdate(car); //then there will be zero entries for the parts in the database table &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;//When it comes to adding a new part, just add the new part object and persist.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;Part part11 = new Part();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;//...fill properties&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;parts.add(part11);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:georgia;"&gt;saveOrUpdate(car);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/set&gt;&lt;/div&gt;&lt;/div&gt;&lt;/set&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-4011914315975039150?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/4011914315975039150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/10/working-with-deletingupdating-set-iin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/4011914315975039150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/4011914315975039150'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/10/working-with-deletingupdating-set-iin.html' title='Working with Deleting/Updating a Set In Hibernate'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DCF0BWyN09g/StdUONjAG7I/AAAAAAAABFQ/ElxxADkyrHI/s72-c/hibernate_set.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-5249170638833961029</id><published>2009-09-30T18:38:00.000-07:00</published><updated>2009-10-16T07:22:56.382-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Chart'/><category scheme='http://www.blogger.com/atom/ns#' term='Font'/><category scheme='http://www.blogger.com/atom/ns#' term='Font Change'/><category scheme='http://www.blogger.com/atom/ns#' term='JFreeChart'/><category scheme='http://www.blogger.com/atom/ns#' term='Presentation'/><category scheme='http://www.blogger.com/atom/ns#' term='LegentTitle'/><title type='text'>JFreeChart LegendTitle Font Change</title><content type='html'>I've been trying to search the whole day yesterday on how to change the Font for a chart's legend title. JFreeChart doesn't have any good free reference documentation about this use case but I was finally able to figure it out by playing with LegendTitle's methods. The code below works for changing the Font of the current LegendTitle object.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;                LegendTitle legendTitle = chart.getLegend();&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;legendTitle.setItemFont(font);&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;legendTitle.setNotify(true);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The setNotify() method somehow alerts the different objects dependent on the LegentTitle and update it's state. If that is not called, nothing happens. If that method is set to true that means, the current change on the chart, specifically the LegentTitle, call all dependent objects and notify of this change and properly act on it.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-5249170638833961029?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/5249170638833961029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/09/jfreechart-legendtitle-font-change.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/5249170638833961029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/5249170638833961029'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/09/jfreechart-legendtitle-font-change.html' title='JFreeChart LegendTitle Font Change'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-4211482684685783019</id><published>2009-07-20T12:25:00.002-07:00</published><updated>2009-10-16T07:23:30.111-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iPhone Mobile Camp Atlanta'/><category scheme='http://www.blogger.com/atom/ns#' term='iPhone'/><category scheme='http://www.blogger.com/atom/ns#' term='Mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='Developing iPhone App'/><title type='text'>iPhone Mobile Camp Atlanta</title><content type='html'>Last Saturday, July 18th, I went to attend the Mobile Camp Atlanta in Marietta the whole morning. There were alot of presentations to choose from crossing iPhone, Android, Palm-Pre, Windows Mobile, Blackberry development. But I mainly focus my interest in the iPhone seminars. The iPhone Development presentations covered best practices user interface design, Parsing XML, Core Data, JSON, Facebook and Analytics, Push Notification. I've attended all of them except for the last one.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am not an iPhone developer but I'm looking into getting converted before the end of the year. After the end of the presentations, I'm decided to add in my skills Objective C Language which apparently iPhone is using.  I believe phones in the not so distant future will become a critical part of the IT Enterprise Infrastructure in terms of delivering important, well formatted content to the business user or customer. I'm sure iPhone will become a great tool to realize this need.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's what I've taken for each presentations.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;iPhone App Design Best Practices&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1. Be true to the device. Know the capabilities of the hardware and what the API can provide. &lt;/div&gt;&lt;div&gt;2. Read the Human Interface Guidelines provided by Apple.&lt;/div&gt;&lt;div&gt;3. Start designing your app after item 2 &amp;amp; 3 are done.&lt;/div&gt;&lt;div&gt;4. Use DataObjects metaphor.&lt;/div&gt;&lt;div&gt;5. Start button design to 324x80 pixels and load it to a temporary button album in iPhone just to see how it fits.&lt;/div&gt;&lt;div&gt;6. Use a third party tool like iView for viewing prototypes of the interface design. You can also use iPhone Stencil created by Design Commission.&lt;/div&gt;&lt;div&gt;7. Remember that 3G S has warmer color that its predecessors.&lt;/div&gt;&lt;div&gt;8. Perform Paper Prototyping to understand the flow of the application.&lt;/div&gt;&lt;div&gt;9. Native apps are more comfortable with users than browser based ones. Native in this context is Objective C.&lt;/div&gt;&lt;div&gt;10. Do not hardcode the screensize, iPhone itself might change the lcd screensize in the future plus if you are developing on iPod as well. &lt;/div&gt;&lt;div&gt;11. Let the app be customizable by users to make it their own. User experience is a need.&lt;/div&gt;&lt;div&gt;12. Pixel density of iPhone is much higher than what you have in a laptop or desktop. The prototype from the laptop/desktop will look different when viewed from iPhone.&lt;/div&gt;&lt;div&gt;13. As a rule of thumb, always design apps both for iPhone and iPod.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Parsing XML using NSXMLParser&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The NSXMLParser is SAX based parser. It rides on top of Cocoa. This goes hand-in-hand with NSDictionary and NSArray. NSDictionary allows you to store  key/value pair. Like a Map in Java. To manage multiple occurence of same key, which are basically the xml nodes that you are trying to get onto, turn it into an array. This is only true for one level node. For deep level nodes, give the parser a hint then build the array.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Introduction to Core Data&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Core Data in iPhone sense means Persistent Objects. All apps have a delegate. iPhone uses managed object model and context. There are 3 main APIs suitable to perform manipulating persistent objects - NSString, NSArray and NSDictionary.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;JSON in iPhone&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Use the JSON documentation from iPhone Noob. The only thing to do to deserialize JSON objects are to turn them into Dictionaries and Arrays. By the way, the debugging in XCode looks really cool.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;FaceBook Connect in iPhone&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I'm not really intested in developing applications via FaceBook. But if you do, all you  have to do is download t FaceBook Connect Dev and apply to obtain "API Key" and "API Secret".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Analytics for iPhone&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This was mainly a discussion about a product called Flurry, which is a better version of iTunes analytics. This comes close to Google Analytics. The presenter just basically showed us on the web his product he created and it does have much more meaningful data than iTunes does. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-4211482684685783019?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/4211482684685783019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/07/iphone-mobile-camp-atlanta.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/4211482684685783019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/4211482684685783019'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/07/iphone-mobile-camp-atlanta.html' title='iPhone Mobile Camp Atlanta'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-2886611761693546032</id><published>2009-05-12T18:44:00.001-07:00</published><updated>2009-05-24T18:27:34.653-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Component Design'/><category scheme='http://www.blogger.com/atom/ns#' term='Chain'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Design Patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='Sofrware Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='Pattern'/><category scheme='http://www.blogger.com/atom/ns#' term='Template Method Pattern'/><category scheme='http://www.blogger.com/atom/ns#' term='Software Design'/><category scheme='http://www.blogger.com/atom/ns#' term='Chain of Responsibility'/><title type='text'>Using Chain of Responsibility Pattern</title><content type='html'>&lt;div&gt;More than a year ago I was presented with a business requirement that has an accompanying process flow chart. The requirement  was basically validating an Insurance Agent. The following information were used to perform business rules/validation on a specific agent and see if he/she can do business at a certain area, or is able to use current authorization or if his/her current contract is valid. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Authorization&lt;/div&gt;&lt;div&gt;2. Profile&lt;/div&gt;&lt;div&gt;3. Contract&lt;/div&gt;&lt;div&gt;4. Managing Agent&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Looking from the document, there were sets of processes that contains business rules that needs to be performed but each process completion can lead to one or more possible processes to be run. This scenario is depicted below.&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_DCF0BWyN09g/SgopSb0eXeI/AAAAAAAAA8k/Kwotn8NKwgw/s1600-h/Chain_Of_Responsibility_Part_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 172px;" src="http://4.bp.blogspot.com/_DCF0BWyN09g/SgopSb0eXeI/AAAAAAAAA8k/Kwotn8NKwgw/s400/Chain_Of_Responsibility_Part_1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5335122105256009186" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DCF0BWyN09g/Sgosz_5fjUI/AAAAAAAAA80/3No-bG2_H-w/s1600-h/Chain_Of_Responsibility_Part_2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 184px;" src="http://3.bp.blogspot.com/_DCF0BWyN09g/Sgosz_5fjUI/AAAAAAAAA80/3No-bG2_H-w/s400/Chain_Of_Responsibility_Part_2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5335125980411301186" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DCF0BWyN09g/SgowP47HmuI/AAAAAAAAA88/gj7nd_r8AkM/s1600-h/Chain_Of_Responsibility_Part_3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 205px;" src="http://3.bp.blogspot.com/_DCF0BWyN09g/SgowP47HmuI/AAAAAAAAA88/gj7nd_r8AkM/s400/Chain_Of_Responsibility_Part_3.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5335129758110292706" /&gt;&lt;/a&gt;&lt;div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;I chose a pattern to basically build the framework that will allow for easy integration of new processes into the mix and not complicate the validation implementation. If this is to be implemented without a framework, deeply nested if - else statements arises and increases cyclomatic complexity issues. The Chain of Responsibility Pattern seem to perfectly fit this requirement. This pattern comprise of several chains all link together and each chain is aware of if the request coming in is intended for it or not. If it is then it applies whatever process is needed on that request data. If not then it just passes the request to the next chain in the link. The process in the figure above is represented as a chain. In this case we have 9 chains in the link. &lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Each of the 9 chains contains thick business logic validation implemetation that takes in an input and redirects the output to a different chain for further request validation. The process continues until one of the chains mark the validation process as completed and package the output data to whatever format the requester is expecting. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;This is the Class Diagram that reflects this design. In addition to the chain pattern, the Template Method Pattern was also used as can be seen from the hierarchy relationship of Chain interface, AbstractChain and its subclasses.&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DCF0BWyN09g/Sgo0tbn7ydI/AAAAAAAAA9M/D8vCgSw3T9c/s1600-h/Chain+Of+Responsibility.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 166px;" src="http://1.bp.blogspot.com/_DCF0BWyN09g/Sgo0tbn7ydI/AAAAAAAAA9M/D8vCgSw3T9c/s400/Chain+Of+Responsibility.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5335134663687784914" /&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are four things to consider from this diagram - Chain interface, ChainManager, AbstractChain and its implementation(chains).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Chain Interface&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Defines the contract for implementing the methods add(Chain chain), processNext() and isLast(). The latter identifies a chain if its the last one to be executed. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;ChainManager&lt;/span&gt;&lt;/div&gt;&lt;div&gt;It is responsible for creating the chains, linking them altogether and kicking off the first chain. The pseudo code below shows this implementation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Chain process1Chain = new Process1Chain();&lt;/div&gt;&lt;div&gt;Chain process2Chain = new Process2Chain();&lt;/div&gt;&lt;div&gt;Chain process3Chain = new Process3Chain();&lt;/div&gt;&lt;div&gt;Chain process4Chain = new Process4Chain();&lt;/div&gt;&lt;div&gt;Chain process5Chain = new Process5Chain();&lt;/div&gt;&lt;div&gt;Chain process6Chain = new Process6Chain();&lt;/div&gt;&lt;div&gt;Chain process7Chain = new Process7Chain();&lt;/div&gt;&lt;div&gt;Chain process8Chain = new Process8Chain();&lt;/div&gt;&lt;div&gt;Chain process9Chain = new Process9Chain();&lt;/div&gt;&lt;div&gt;DefaultChain defaultChain = new DefaultChain();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;process1Chain.add(process2Chain);&lt;/div&gt;&lt;div&gt;process2Chain.add(process3Chain);&lt;/div&gt;&lt;div&gt;process3Chain.add(process4Chain);&lt;/div&gt;&lt;div&gt;process4Chain.add(process5Chain);&lt;/div&gt;&lt;div&gt;process5Chain.add(process6Chain);&lt;/div&gt;&lt;div&gt;process6Chain.add(process7Chain);&lt;/div&gt;&lt;div&gt;process7Chain.add(process8Chain);&lt;/div&gt;&lt;div&gt;process8Chain.add(process9Chain);&lt;/div&gt;&lt;div&gt;process9Chain.add(defaultChain);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;// Assign the point of entry chain,&lt;/div&gt;&lt;div&gt;Chain entryPointChain = process1Chain;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//Kick of the first chain&lt;/div&gt;&lt;div&gt;entryPointChain.processNext();&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;AbstractChain&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The process() method of this class reflects the Template Method Pattern. The power of polymorphism lies here. Its subclasses plugin the right logic at run time and these chains are decoupled from each other. &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As you notice the DefaultChain is included in the diagram. If you want to do some post-processing cleanup, provide the logic here.  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The beauty of this chain pattern is its extensible. From our example above, if we need to add another set of validation logic, all we have to do is create another chain and add it in the link and provide the business logic in its process() method. If a validation is no longer needed, just remove that chain from the link that implements the validation and the application should still run without any side effects.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-2886611761693546032?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/2886611761693546032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/05/using-chain-of-responsibility-pattern.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/2886611761693546032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/2886611761693546032'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/05/using-chain-of-responsibility-pattern.html' title='Using Chain of Responsibility Pattern'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_DCF0BWyN09g/SgopSb0eXeI/AAAAAAAAA8k/Kwotn8NKwgw/s72-c/Chain_Of_Responsibility_Part_1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-2427690875995614582</id><published>2009-05-06T20:18:00.000-07:00</published><updated>2009-05-24T18:30:15.897-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Using Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Using the right technology'/><category scheme='http://www.blogger.com/atom/ns#' term='Technology'/><category scheme='http://www.blogger.com/atom/ns#' term='IT Process'/><title type='text'>When do we say its the right tecnology to use?</title><content type='html'>When is a technology the right tool to use? Do we influence the feature we want in an application from what is available from the technology or from what is required from the business requirement?&lt;br /&gt;&lt;br /&gt;It's always a challenge to marry the right technology with the right requirement that would produce a fluid, solid application. One-Stop-Shop approach of resolving business issues is no longer becoming relevant in the global IT market. You pay so much that without realizing only a fraction of the features provided by that technology is only essential to what the business requires. A lot of companies now are resorting to only "get what you need" and "pay what you only need" mentality. This is where customization comes in. The beauty of customization is it delivers the solution that the problem it exactly expects. This strategy relieves companies from paying too much.&lt;br /&gt;&lt;br /&gt;When the curse of overengineering starts to sink in, its a manifestation of wrong implementation. But what is overengineering? It's a combination of technology misuse and irrelevant complex implementation. If the implementation looks simple and it solves a business need then we just answered the first question above.&lt;br /&gt;&lt;br /&gt;The danger comes when technology features molds how the application should behave. This deviates the application from concentrating into its prioritized functionalities and might deliver features not needed at all. Scope creep is the twin evil of this situation. Looking at it at the brighter side, this is the best opportunity to step back and review the requirements and correct and refine the implementation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-2427690875995614582?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/2427690875995614582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/05/when-do-we-say-its-right-tecnology-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/2427690875995614582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/2427690875995614582'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/05/when-do-we-say-its-right-tecnology-to.html' title='When do we say its the right tecnology to use?'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-7299069165396655706</id><published>2009-05-06T19:20:00.000-07:00</published><updated>2009-05-24T18:31:43.025-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reporting'/><category scheme='http://www.blogger.com/atom/ns#' term='Crystal User Session'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='session'/><category scheme='http://www.blogger.com/atom/ns#' term='Crystal Reports'/><category scheme='http://www.blogger.com/atom/ns#' term='BO XI Java SDK'/><title type='text'>Implementing User Sessions for Crystal Reports Java SDK</title><content type='html'>If you are submitting requests for batch processing in Crystal Reports via its Java SDK, never login to the server per request. I've seen this implemented and it's just creating an unnecessary overhead. Here are the steps to create a session that would serve multiple requests.&lt;br /&gt;&lt;br /&gt;1. Log on to Crystal Report Server&lt;br /&gt;&lt;br /&gt;You call the metod CrystalEnterprise.getSessionMgr() which returns you an object of type ISessionMgr. From there call the method of the returned object below which returns an object of type IEnterpriseSession.&lt;br /&gt;&lt;br /&gt;logon(String userName, String password, String ceServerName, String secEnterprise);&lt;br /&gt;&lt;br /&gt;2. Create Logon Token&lt;br /&gt;&lt;br /&gt;The IEnterpriseSession has a method getLogonTokenMgr() that returns ILogonTokenMgr. Call the method below to get the logon token string.&lt;br /&gt;&lt;br /&gt;createWCAToken(String clientServerName, int validMinutes, int validNumLogon);&lt;br /&gt;&lt;br /&gt;The validMinutes parameter represents how long do you want to maintain the session and the validNumLogon represents how many logons the client can perform in one session within the given valid minutes.&lt;br /&gt;&lt;br /&gt;3. Logon to Crystal Server with Token&lt;br /&gt;&lt;br /&gt;Call the method below from the class ISessionMgr and pass the logon token string that was previously generated. This returns to you a new IEnterpriseSession that has the token. All transactions will then use this session object until the minutes or log on counts are exhausted.&lt;br /&gt;&lt;br /&gt;logonWithToken(logonTokenString);&lt;br /&gt;&lt;br /&gt;Of course, somehow this session will expire later on and the client application need to reconnect. The good news is you just have to follow the same steps. On the other hand, if the session is still valid and somehow the application needs to reset the connection, always check for the session if it already expired. If it is, release the token and logoff with the following sequence then proceed to steps 1 through 3 again.&lt;br /&gt;&lt;br /&gt;  releaseToken(logonTokenString); // called from ILogonTokenMgr&lt;br /&gt;  ceSessionWithToken.logoff(); // called from IEnterpriseSession with token&lt;br /&gt;  ceSession.logoff(); // called from IEnterpriseSession without token&lt;br /&gt;&lt;br /&gt;This approach will be very useful for batch processing. You want to keep the pipe full while the report server is processing. With on demand request report processing, you don't want to keep a session open for a long time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-7299069165396655706?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/7299069165396655706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/05/implementing-user-sessions-for-crystal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/7299069165396655706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/7299069165396655706'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/05/implementing-user-sessions-for-crystal.html' title='Implementing User Sessions for Crystal Reports Java SDK'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-8909889500639017077</id><published>2009-05-01T11:16:00.000-07:00</published><updated>2009-05-24T18:32:55.354-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Service'/><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Service Performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweaking Web Service'/><category scheme='http://www.blogger.com/atom/ns#' term='Tweak'/><category scheme='http://www.blogger.com/atom/ns#' term='Performance'/><title type='text'>Java Multithreaded Web Service Performance Tips</title><content type='html'>Right after Java 5.0 Concurrency Model was released, MultiThreaded Java Web Service application is always an interesting subject. It's easy to tweak codes that are slowing down the application. But it was always a challenge to tweak it at the container level.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A former colleague of mine and me worked to figure out why our Web Service Application was slowing down and always leaves lots of run-away processes. Here are some of the findings we had implemented to keep our application rolling! The sample codes below reflects a reporting process where requests to generate a report is made and how the threads handle the status of each requests.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Use Java Concurrency API&lt;/span&gt;&lt;/div&gt;&lt;div&gt;There are only three classes that I've used to implement a MultiThreaded WS Application.&lt;/div&gt;&lt;div&gt;Runnable, ScheduledExecutorService, and ConcurrentLinkedQueue. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The ScheduledExecutorService implements ExecutorService and is of type Executor.  Executor is responsible for abstracting the gory details of implementing threads into simpler methods. And it works all the time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ScheduledExecutorService allows you to provide what the initial time is to run the thread associated with it, at what frequency, the thread to run and the unit of time. Was very easy to use and you can configure the thread pool size as well. The application I wrote had 5 threads running concurrently and it never had any problems at all. They all shared the ConcurrentLinkedQueue object resource and I didn't use the synchronized keyword to make this object thread safe since by default it already is.&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_DCF0BWyN09g/SftDjX58EdI/AAAAAAAAA7c/MC-zsRo3sZE/s1600-h/Thread+Pool.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 100px;" src="http://3.bp.blogspot.com/_DCF0BWyN09g/SftDjX58EdI/AAAAAAAAA7c/MC-zsRo3sZE/s400/Thread+Pool.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5330928858914623954" /&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Using the Runnable interface is better than just extending the Thread class. It promotes less coupling. Here's a sample of how this thread is plugged-in to the ScheduledExecutorService.&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DCF0BWyN09g/SftERSr-N3I/AAAAAAAAA7k/VEccQS_Rkz0/s1600-h/Thread+Instances.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 330px; height: 400px;" src="http://1.bp.blogspot.com/_DCF0BWyN09g/SftERSr-N3I/AAAAAAAAA7k/VEccQS_Rkz0/s400/Thread+Instances.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5330929647787849586" /&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Implement the ServiceLifeCycle&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Implementing ServiceLifeCycle will allow you to put shutdown hooks and implement its destroy() method where you can manipulate how the spawned threads are to be shutdown/killed. The init(Object context) method must also be implemented.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_DCF0BWyN09g/Sfs_yINSAPI/AAAAAAAAA7E/BTFn8f1IurI/s1600-h/ServiceLifeCycle.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 25px;" src="http://4.bp.blogspot.com/_DCF0BWyN09g/Sfs_yINSAPI/AAAAAAAAA7E/BTFn8f1IurI/s400/ServiceLifeCycle.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5330924714352312562" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_DCF0BWyN09g/Sfs_7OViPpI/AAAAAAAAA7M/ur8MV0bR3to/s1600-h/ServiceLifeCycle+Implementation+with+Caption.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 140px;" src="http://4.bp.blogspot.com/_DCF0BWyN09g/Sfs_7OViPpI/AAAAAAAAA7M/ur8MV0bR3to/s400/ServiceLifeCycle+Implementation+with+Caption.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5330924870616366738" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Provide Shutdown Hooks&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The shutDownMonitor() method is called and the ExecutorService's awaitTermination() method is invoked which basically gracefully shuts down the spawned thread in the WS Container according to the specified time (might be in seconds, minutes, hours). You can also force to shutdown all threads by calling the method shutdownNow() if it takes longer than the specified time.&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DCF0BWyN09g/SftBOu1VVoI/AAAAAAAAA7U/cwhSUuPmRiU/s1600-h/ServiceLifeCycle+Shutdown+Hook+with+Caption.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 117px;" src="http://1.bp.blogspot.com/_DCF0BWyN09g/SftBOu1VVoI/AAAAAAAAA7U/cwhSUuPmRiU/s400/ServiceLifeCycle+Shutdown+Hook+with+Caption.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5330926305268815490" /&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Use "application" Scoping&lt;/span&gt;&lt;/div&gt;&lt;div&gt;When you use "request" scope as configured in your wsdd file, you are creating one instane of the service per request. If several requests were triggered, your application is also spawning threads per request. The previous request that was processed left a trail of run-away processes. If the scope was "application" it will create only one instance of the service that will serve multiple requests. Hence, when the application runs it does not create run away processes since we already have a shutdown hook to kill all of the spawned threads before the application completely shutdown.&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_DCF0BWyN09g/SftGj0lHAWI/AAAAAAAAA7s/Nq4c66prWoU/s1600-h/WSDD+Scoping.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 59px;" src="http://4.bp.blogspot.com/_DCF0BWyN09g/SftGj0lHAWI/AAAAAAAAA7s/Nq4c66prWoU/s400/WSDD+Scoping.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5330932165146771810" /&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I think it all depends on what an application is trying to achieve, it might have more complex business process than this sample code we have and it requires more classes to use from the concurrent api. But in a multithreaded web service application, you definitely want to use the application scope and implement a shutdown hook.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-8909889500639017077?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/8909889500639017077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/05/java-multithreaded-web-service.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/8909889500639017077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/8909889500639017077'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/05/java-multithreaded-web-service.html' title='Java Multithreaded Web Service Performance Tips'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_DCF0BWyN09g/SftDjX58EdI/AAAAAAAAA7c/MC-zsRo3sZE/s72-c/Thread+Pool.jpg' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-9188643374374812527</id><published>2009-04-28T13:03:00.000-07:00</published><updated>2009-05-24T18:34:09.719-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='FTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Jakarta Commons'/><category scheme='http://www.blogger.com/atom/ns#' term='Jakarta Commons Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache'/><category scheme='http://www.blogger.com/atom/ns#' term='FTP Client'/><title type='text'>Jakarta Commons Net API</title><content type='html'>&lt;p&gt;Jakarta Commons Net(JCN) Java Library is just one of those open source projects I've enjoyed working with. Specially its FTP API. Which is gonna be the focus of this discussion.&lt;/p&gt;&lt;p&gt;I've implemented a component that uses this library in a Web Service environment which basically connects to a remote FTP service then iterate through the list of directories, process the files and handle the reply codes properly. The list of files may go to several thousands. &lt;/p&gt;&lt;p&gt;Here are the things I found really useful from JCN.&lt;/p&gt;&lt;p&gt;1. It automatically issues a new PORT command to the server so we don't have to worry about manually setting the port for different platforms (Unix, Linux, Windows, Mac, etc.) when connecting. Also validates data connections to client to ensure the request had originated from the intended host. We don't want our application deal with strangers eh?&lt;/p&gt;&lt;p&gt;2. It allows you to page through the list of FTP files. I think this is an awesome feature! From my previous project the list of files can span to several thousands. But through FTPListParseEngine class I was able to page through the files and process them in smaller chunks. This is a great performance boost. We only load the ftp file objects we currently need. Creating this objects are expensive. We keep the metabolism of an application running this way and saves us the evil of bottlenecks.  &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DCF0BWyN09g/SfiZBQz-VyI/AAAAAAAAA6s/utMXzRDyNiw/s1600-h/Pager+for+FTP+Processing+With+Caption+2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 272px;" src="http://2.bp.blogspot.com/_DCF0BWyN09g/SfiZBQz-VyI/AAAAAAAAA6s/utMXzRDyNiw/s400/Pager+for+FTP+Processing+With+Caption+2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5330178405964863266" /&gt;&lt;/a&gt;3. Provides very easy to use and effecient way of handling FT Reply Codes. The codes are basically messages passed by the FTP Server indicating if the request was processed successfully or not. There are about 49 codes which you can check at this link &lt;a href="http://www.turboftp.com/turboftp/manual/TURBOFTPFTP_Server_Reply_Codes.htm"&gt;http://www.turboftp.com/turboftp/manual/TURBOFTPFTP_Server_Reply_Codes.htm&lt;/a&gt; . After a command is issued to the server, the server returns an int value representing the code. Just capture this code and apply the behavior you want to happen in the application. &lt;/p&gt;&lt;p&gt;This is a great way to isolate specific ftp issues and handle it properly so the application can still function, say even if the FTP service is down. Or if your previous request gave a code that identifies your request as not processed, you can resend it upto a certain number of times until you mark it failed. There's no point sending an ftp command or request if the data connection is not established, as shown below.&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_DCF0BWyN09g/Sfibvwp7arI/AAAAAAAAA60/dvD8A37qkrQ/s1600-h/Pager+for+FTP+Processing+With+Caption.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 272px;" src="http://1.bp.blogspot.com/_DCF0BWyN09g/Sfibvwp7arI/AAAAAAAAA60/dvD8A37qkrQ/s400/Pager+for+FTP+Processing+With+Caption.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5330181403809901234" /&gt;&lt;/a&gt;&lt;p&gt;Also shown below is an example of flagging the reply if its ok or not with their matching simple behavior implementation.&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_DCF0BWyN09g/SficMfdA_rI/AAAAAAAAA68/ifHdhx1RqDs/s1600-h/FTP+Reply+Processing+With+Caption.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 269px;" src="http://4.bp.blogspot.com/_DCF0BWyN09g/SficMfdA_rI/AAAAAAAAA68/ifHdhx1RqDs/s400/FTP+Reply+Processing+With+Caption.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5330181897408544434" /&gt;&lt;/a&gt;&lt;p&gt;I can see no reason why JCN can't be used. It provides the necessary security and performance gain we need. Plus it provides you an elegant way of handling FTP Reply Codes that you can use to manipulate the behavior of an application consuming an ftp service. Documentation is well written too.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-9188643374374812527?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/9188643374374812527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/04/jakarta-commons-net-api.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/9188643374374812527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/9188643374374812527'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/04/jakarta-commons-net-api.html' title='Jakarta Commons Net API'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DCF0BWyN09g/SfiZBQz-VyI/AAAAAAAAA6s/utMXzRDyNiw/s72-c/Pager+for+FTP+Processing+With+Caption+2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-8976555701227324883</id><published>2009-04-21T19:46:00.000-07:00</published><updated>2009-04-27T15:00:13.298-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><category scheme='http://www.blogger.com/atom/ns#' term='BPM'/><category scheme='http://www.blogger.com/atom/ns#' term='Six Sigma'/><title type='text'>AJUG (SOA and BPM Meeting) - My Take</title><content type='html'>Rick Geneva from Intalio company presented an interesting thought on how SOA and BPM work together tonight. So SOA is IT driven while BPM is business driven. Rick's title is a Process Expert. Alot from his slides pointed some technologies that instantiate an SOA architecture like WS, ESB, JMS..you name it. But I think we missed his concrete experiences with his customers/clients that he worked with to improve their business process. Though the framework "Process Driven Development" was mentioned there were no information as to how it is executed from inception to deployment. I agree with him that Process is very important. That's why we have these different SDLC methodologies like SCRUM, Waterfall, Extreme Programming, TDD, etc. But all of these methodologies are focused on building the software products. How do you tie this up with Process Driven Development (PDD)? So shall we say PDD is to Business Team and SDLC is to Development Team?&lt;br /&gt;&lt;br /&gt;I'm interested to know how PDD works. I wished he talked more on that part. To me PDD sounds like a 6 Sigma methodology but the only difference is 6 Sigma not only focuses on the product but to the processes as well from business processes/operations down to the smallest detail of assembly of a product. Ten years ago I was a Process Engineer and got trained for Greenbelt 6 Sigma and was certified. A project was identified and was assigned to me and used 6 Sigma methodology to eliminate or at least minimize a product defect. The rest of the Process Engineers also had their own. After my 6 Sigma project was completed I saved the company $160,000 annualy and the product which I'm assigned had a better quality and the ROI is very tangible. I have not heard of any process driven development yet that had a very tangible ROI. The question is how do you measure a business process? With 6 Sigma you have 98.5% as your confidence level, computed statistically. I've seen alot of Software Companies using 6 Sigma as their methodology for delivering products. But I have not heard any welcoming news that it worked for them. I might be wrong. But I've never seen anything published.&lt;br /&gt;&lt;br /&gt;Rick made it clear that there's no organization responsible for setting the standards for Process Driven Development and everything is still up in the air but alot of companies are already using software products that enable them to Choreograph and Orchestrate their services that will eventually define their BPM. I guess everybody will just have to wait and see. But there's definitely a need for a standard business process management.&lt;br /&gt;&lt;br /&gt;BPMN was also mentioned which basically means Business Process Management Notation. It's another set of notations that BAs and Developers will have to learn. UML is there and I believe its sufficient to translate a descriptive business requirement into a more readable, simplified diagram. This is the part where I don't cast my vote in. I think the reason why management and development team cannot meet in the middle is because of unclear requirements sitting on top of a thick bureaucrat who is wrapped in his own fragile ego.&lt;br /&gt;&lt;br /&gt;For now I consider BPM as a buzz. Its just basically a workflow. Nothing more. BPEL and the like on the other hand simplfies the complexity of implementing tons of workflows. But how do you measure its complexity to use such a product? Maybe if there are 100 steps in a workflow? Or if the integration points consumed in that workflow is more than 10 then do we consider that as a complex workflow?&lt;br /&gt;&lt;br /&gt;Its hard to quantify the workflow metrics and I'm not sure how to do it at this point. We can't just dive in into our Infrastructure and start doing workflow metric testing to establish a benchmark. Also, you might have to hire a person with a position as Workflow Expert, if they do exists, to do the job.&lt;br /&gt;&lt;br /&gt;In the end, all the business want is to see if they get any value from BPM. How much can they $ave, how much processes can they reduce and make efficient, and how can they make their IT Infrastructure flexible to accommodate the ever changing business needs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-8976555701227324883?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/8976555701227324883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/04/ajug-soa-and-bpm-meeting-my-take.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/8976555701227324883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/8976555701227324883'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/04/ajug-soa-and-bpm-meeting-my-take.html' title='AJUG (SOA and BPM Meeting) - My Take'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-7770925581654844630</id><published>2009-04-21T06:56:00.000-07:00</published><updated>2009-05-05T16:47:24.100-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><category scheme='http://www.blogger.com/atom/ns#' term='Billing'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle BRM Portal Java PCM SDK'/><title type='text'>Oracle BRM Portal Java PCM API Design Issues</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_DCF0BWyN09g/Se3SPm6IgSI/AAAAAAAAA58/x6AkELD66Ss/s1600-h/Java_PCM_Reflection_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 600px; height: 491px;" src="http://2.bp.blogspot.com/_DCF0BWyN09g/Se3SPm6IgSI/AAAAAAAAA58/x6AkELD66Ss/s400/Java_PCM_Reflection_2.png" alt="" id="BLOGGER_PHOTO_ID_5327145099833409826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;I respect Oracle. They're awesome. They’re very smart and that’s why they bought Sun Microsystems. But no great companies are exempted from mistakes and great mishaps. I know you know some. I'm not surprised if you'd pick Microsoft. Dang Vista really hit them hard and that wasn’t there first. But I'm not gonna talk about Vista. I want to focus on what my experience was working with Oracle BRM Portal Java PCM API, specifically their FList class and Web Service Interface.&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;I have not used every single API but enough to point out what's wrong with it.&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;Here are the design issues I’ve found:&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;1. FList class is a Hashtable&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;2. FList data structure follows the anti-pattern “Yo-yo Problem”&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;3. Heavy use of Reflection&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;4. Vague documentation&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;FList class is a Hashtable&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;FList is the point of entry/gateway in the Oracle BRM Java API to initiate and create transactions. It can contain aggregates of different types of objects that represent the data and its relationship in the BRM database. The result coming back from any brm request is also a FList. So the brm request/response is of the FList form.&lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;Now here comes the bad part. FList is a Hashtable! It’s thread-safe because it’s synchronized but at the same time greatly compromises performance. FList is very coarse-grained object that can have a deep tree structure. If you put it on a multi-threaded environment the application will bend down on its knees. So their Java PCM API is not scalable at all.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;   &lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;FList data structure follows the anti-pattern “Yo-yo Problem”&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;Think of this. All of the available object types in the Java PCM API are contained in the FList. You have to dig deep into it and know what type of object you are getting. The problem comes when you keep flipping from one object to another and that doesn’t clearly explain how these objects are related to each other and what subject do they convey. It’s confusing. Their PCM Java Documentation API is not enough to understand what are involved in a specific BRM process. You have to reference as well their Portal Documentation which is about 312MB containing around 10,756 files.  If you need to understand something it’s like finding a needle in a haystack.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;Heavy use of Reflection&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;I have never seen an application that uses heavy reflection till I came across FList. The image above shows how many times reflection was used to just grab one Sales Order through Oracle’s BRM Web Service interface. I’ve used JProfiler to take a snapshot of the call trace. The lookup of the class being invoked incurs the most overhead compared to its invocation (see&lt;a href="http://www.jguru.com/faq/view.jsp?EID=246569"&gt;&lt;span style="color:blue;"&gt;http://www.jguru.com/faq/view.jsp?EID=246569&lt;/span&gt;&lt;/a&gt;). Oracle BRM WS has definitely some performance issues with its Java engine.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;The Field class from the package com.portal.pcm made 12,855 lookups and off course another 12,855 invocations incurring 20 seconds to complete just these two tasks. Its ridiculous. What in the world is it doing???&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;Vague documentation&lt;/span&gt;&lt;/b&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;Oracle BRM is a beast. The documentation as well as mentioned above earlier. It’s so huge that you can easily get lost without the guidance of an Oracle Consultant. It’s not trivial. The goal of every complex system should be to provide enough and clear documentation. What really gets into my nerves is when we start customizing fields in BRM and the document doesn’t tell you what data you need to pass to FList to properly fetch what you want from BRM. Even outside of the customization discussion, you need several pieces of information from one page to another and combine them to formulate your desired FList structure.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt; &lt;/span&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"&gt;&lt;span style=";font-family:&amp;quot;;font-size:12;color:black;"&gt;This is just one of those tools where you definitely have to go to a training. I'd say hire one good Oracle Consultant and let your trained employees work with him to manipulate the behavior of their BRM tool. My current company is totally dependent on Oracle Consultants. We have 6 of them and they get paid a ton. I wish they invested in their employees and let them be trained and be guided by just one consultant.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-7770925581654844630?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/7770925581654844630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/04/oracle-brm-portal-java-pcm-api-design.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/7770925581654844630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/7770925581654844630'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/04/oracle-brm-portal-java-pcm-api-design.html' title='Oracle BRM Portal Java PCM API Design Issues'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DCF0BWyN09g/Se3SPm6IgSI/AAAAAAAAA58/x6AkELD66Ss/s72-c/Java_PCM_Reflection_2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-8399258947443668395</id><published>2009-04-16T19:39:00.000-07:00</published><updated>2009-04-27T14:59:14.795-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Sun should treat eveything in Java as Objects!</title><content type='html'>I have posted a question in LinkedIn as shown below.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Do you think Sun will remove primitive data types(int, long, float, etc.) in their Java Platform?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;I got 10 answers from different people and they are all against the idea of treat everything in Java as Objects. But I did clarify my point why I like the idea of Sun updating the Java Platform or creating new breed of Java Platform that will treat everything in Java as an Object. Here's my reason behind the question.&lt;br /&gt;&lt;br /&gt;I have seen lots of Java code that keeps switching from a primitive type to a Wrapper class. Reflection API does not return the classe's primitive type as an object and of course you have to use Wrapper classes to later convert it to the right object type then switch back to a primitive type. Autoboxing just does the same thing. All of these are basically CPU overhead not heap overhead. RAMs are not that expensive and they get cheaper and cheaper while getting bigger in temporary storage. I guess I like the idea of having Java as everything is Object because that will minimize switching between primitive types and makes the code alot readable. But I do agree some of their points but I'm thinking not far from now it may happen. Heap size is easier to control than CPU time. &lt;span class="status-body"&gt;&lt;span class="entry-content"&gt;There's a big difference between memory usage and cpu time in terms of overhead. The latter gives you a better sense of tuning performance.&lt;/span&gt;&lt;/span&gt; You would be surprised that scalability is actually affected more by CPU Time rather than Heap Size. If you have an out of memory issue, its almost always that you have run away processes that the CPU keeps it running till you run out of memory. There's something in the code that drove the CPU nuts.&lt;br /&gt;&lt;br /&gt;I hope that explains my curiosity behind the question.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-8399258947443668395?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/8399258947443668395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/04/sun-should-treat-eveything-in-java-as.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/8399258947443668395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/8399258947443668395'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/04/sun-should-treat-eveything-in-java-as.html' title='Sun should treat eveything in Java as Objects!'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-25223503695762973</id><published>2009-04-13T11:18:00.001-07:00</published><updated>2009-04-27T14:59:04.543-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='synchronized'/><category scheme='http://www.blogger.com/atom/ns#' term='Singleton'/><title type='text'>Singleton without "synchronized" keyword in Multi-Threaded App</title><content type='html'>When you ask a designer or developer to write a multi-threaded application, in their mind, the magic word - 'synchronized' immediately pops-up! That was my mentality as well until I came across this wonderful website explaining the different design patterns. It hit me hard. You can check it on this link &lt;a href="http://www.oodesign.com/singleton-pattern.html"&gt;http://www.oodesign.com/singleton-pattern.html&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Typical Singleton object looks like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//This is bad. The whole method is synchronized. If your method has&lt;br /&gt;//thousands of lines of code then you are creating a bottleneck here... &lt;/div&gt;&lt;div&gt;public class MySingletonObject{&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;private static MySingletonObject instance;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;private MySingletonObject(){}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;public synchronized static MySingletonObject  getInstance(){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;if(instance==null){&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;instance = new MySingletonObject();&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;return instance;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;or&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//This is better. Only the block of instantiation is synchronized. But....&lt;br /&gt;//There's always this null check overhead. Also, you still have the &lt;br /&gt;//synchronized keyword. It's still an overhead.&lt;/div&gt;&lt;div&gt;public class MySingletonObject{&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;private static MySingletonObject instance;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;private MySingletonObject(){}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;public static MySingletonObject  getInstance(){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;synchronized(MySingletonObject .class){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;if(instance==null){&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;    &lt;/span&gt;instance = new MySingletonObject();&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;   &lt;/span&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;  &lt;/span&gt;return instance;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;//This is what you want. What? Why?...... Never underestimate&lt;br /&gt;//the power of static modifier. Once you call this class&lt;br /&gt;//say MySingletonObject.getInstance(), the classloader will automatically load&lt;br /&gt;//and create the instance of MySingletonObject type.&lt;br /&gt;//This member variable only has 1 instance all throughout the application&lt;br /&gt;//since its at the class level. No more bottlenecks. No more waiting for the&lt;br /&gt;//threads. They immediately get an instance. Looks very simple too...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;public class MySingletonObject{&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;private static MySingletonObject instance = new MySingletonObject();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;private MySingletonObject(){}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;public static MySingletonObject  getInstance(){&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;  &lt;/span&gt;return instance;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-25223503695762973?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/25223503695762973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/04/singleton-without-synchronized-keyword.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/25223503695762973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/25223503695762973'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/04/singleton-without-synchronized-keyword.html' title='Singleton without &quot;synchronized&quot; keyword in Multi-Threaded App'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-2247436317238447663</id><published>2009-04-13T10:48:00.000-07:00</published><updated>2009-04-27T14:58:38.898-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Service'/><category scheme='http://www.blogger.com/atom/ns#' term='WS'/><category scheme='http://www.blogger.com/atom/ns#' term='Rally WS API'/><category scheme='http://www.blogger.com/atom/ns#' term='Rally'/><title type='text'>Using Rally Java Web Service API</title><content type='html'>&lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; There are a number of developer tools that can be used from Rally ranging from integrating Rally to a different application(s) or just plainly extracting data from Rally. This link &lt;/span&gt;&lt;a href="https://rally1-wiki.rallydev.com/display/Word/Developer+Tools" target="_top"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;https://rally1-wiki.rallydev.com/display/Word/Developer+Tools&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; provides necessary rally developer documentation.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a name="Web_Service_API"&gt;&lt;/a&gt; Web Service API &lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Since Rally supports several implementation of their WS API this will mainly focus on SOAP in Java. You can find on this link &lt;/span&gt;&lt;a href="https://rally1.rallydev.com/slm/doc/webservice/" target="_top"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;https://rally1.rallydev.com/slm/doc/webservice/&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; the other implementations. The only thing I don't like about this API implementation is that you always have to pass the object reference through the wire to get the values of the object. The WS calls are so fine-grained that the number of objects queried is directly proportional to the number of round-trip calls. The sample usage of the SOAP in Java implementation is shown below in sequence. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Assuming our target of interest is to extract a Story from Rally. The Story in Rally is actually map to a SOAP object called &lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;HierarchicalRequirement&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;. Always remember to use the read() method of &lt;/span&gt;&lt;span class="twikiNewLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;RallyService&lt;/span&gt;&lt;a rel="nofollow" href="https://infosource.internap.com/TWiki/bin/edit.cgi/IT/RallyService?topicparent=IT.RallyWebServiceAPI" title="Create this topic"&gt;&lt;sup&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;?&lt;/span&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; object to grab the physical object from Rally. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;ol&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Grab the WSDL from the current version of your Rally application which might have the form &lt;/span&gt;&lt;a href="https://rally1.rallydev.com/slm/webservice/1.11/meta/33781987/rally.wsdl" target="_top"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;https://rallyx.rallydev.com/slm/webservice/x.xx/meta/34343483/rally.wsdl&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Generate the Java code from the given wsdl file. Their will be 3 packages generated - com.rallydev.webservice.domain and com.rallydev.webservice.service. &lt;/span&gt;&lt;ul&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; com.rallydev.webservice.domain contains all SOAP objects that represent the data in Rally. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; com.rallydev.webservice.service contains the web service interface.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Acquire connection from the web service endpoint and grab available Workspaces.   &lt;/span&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; URL url = new URL("https://rally1.rallydev.com/slm/webservice/1.10/RallyService");&lt;br /&gt;RallyService service = (new RallyServiceServiceLocator()).getRallyService(url);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Stub stub = (Stub)service;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; stub.setUsername(rally_username);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; stub.setPassword(rally_password);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; stub.setMaintainSession(true);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;Subscription subscription = (Subscription)service.getCurrentSubscription();&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Workspace[] workspaces = subscription.getWorkspaces();&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;        if(workspaces==null || workspaces.length==0){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;   &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;errorBuf.append("The login credentials doesn't have any subscription or there are " + &lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;          &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;"no Workspaces configured from Rally.");&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    writeToFile(serviceBean, errorBuf.toString());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    return null;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; } &lt;/span&gt;&lt;/pre&gt; &lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; If the target workspace is "IT: the next generation" then loop through the workspaces that matches that workspace.&lt;/span&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;Workspace workspace = null;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;for(int i=0; i&amp;lt;workspaces.length;i++){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;   &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;WSObject wsObject = (WSObject)service.read(workspaces[i]);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;workspace = (Workspace)wsObject;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;      &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;String workspaceName = workspace.getName();&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;if(workspaceName.equalsIgnoreCase("IT: the next generation" )){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;break;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; }&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; &lt;/span&gt;&lt;/pre&gt; &lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Submit query and get results (&lt;/span&gt;&lt;span class="twikiNewLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;DomainObject&lt;/span&gt;&lt;a rel="nofollow" href="https://infosource.internap.com/TWiki/bin/edit.cgi/IT/DomainObject?topicparent=IT.RallyWebServiceAPI" title="Create this topic"&gt;&lt;sup&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;?&lt;/span&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;[]). The serviceBean.getQuery() is a name/value pair which might be of the form &lt;/span&gt;&lt;strong&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;Release.Name= "Test Release For TWiki" AND &lt;/span&gt;&lt;span class="twikiNewLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;ScheduleState&lt;/span&gt;&lt;a rel="nofollow" href="https://infosource.internap.com/TWiki/bin/edit.cgi/IT/ScheduleState?topicparent=IT.RallyWebServiceAPI" title="Create this topic"&gt;&lt;sup&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;?&lt;/span&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; = "Completed"&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;. Process each &lt;/span&gt;&lt;span class="twikiNewLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;DomainObject&lt;/span&gt;&lt;a rel="nofollow" href="https://infosource.internap.com/TWiki/bin/edit.cgi/IT/DomainObject?topicparent=IT.RallyWebServiceAPI" title="Create this topic"&gt;&lt;sup&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;?&lt;/span&gt;&lt;/sup&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;.   &lt;/span&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;QueryResult queryResult = service.query(workspace, "HierarchicalRequirement", serviceBean.getQuery(), "", false, 1, 100);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; &lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;if(queryResult.getErrors().length&gt;0){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;for(int i=0; i&amp;lt;queryResult.getErrors().length;i++){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;errorBuf.append("ERROR: ");&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;errorBuf.append(queryResult.getErrors()[i]);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       &lt;span class="Apple-tab-span" style="white-space:pre"&gt;   &lt;/span&gt;errorBuf.append("\n");&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    &lt;span class="Apple-tab-span" style="white-space:pre"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    writeToFile(serviceBean, errorBuf.toString());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    return null;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;             }&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;DomainObject[] domainObjects = queryResult.getResults();&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; if(domainObjects!=null &amp;amp;&amp;amp; domainObjects.length&gt;0){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    List&lt;releasenotesbean&gt; releaseNotesBeanList = new ArrayList&lt;releasenotesbean&gt;();&lt;/releasenotesbean&gt;&lt;/releasenotesbean&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    TwikiBean twikiBean = new TwikiBean();&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    Map&lt;string,&gt; packageStoryMap = new HashMap&lt;string,&gt;(); &lt;/string,&gt;&lt;/string,&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;   for(int i=0;i&amp;lt;domainObjects.length;i++){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       HierarchicalRequirement story = (HierarchicalRequirement)service.read(domainObjects[i]);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       Release release = (Release)service.read(story.getRelease());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       DateFormat dateFormat = DateFormat.getInstance();&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       String releaseDate = dateFormat.format(release.getReleaseDate().getTime());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;      if(story.getAttachments()==null || story.getAttachments().length==0){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;          errorBuf.append(NO_ATTACHMENT).append("\n");&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       }&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       if(story.get_package()==null || story.get_package().equals("")){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;          errorBuf.append(NO_PACKAGE_NAME).append("\n");&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       }&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       if(release==null || release.getName()==null &lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;             || release.getName().equals("")){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;          errorBuf.append(NO_RELEASE_NAME).append("\n");&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       }&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;      if(errorBuf.length()&gt;0){&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;          errorBuf.insert(0, "ERROR: User Story ID: " + story.getFormattedID() + "\n");&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;          writeToFile(serviceBean, errorBuf.toString());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;          continue;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       }&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;      ReleaseNotesBean releaseNotesBean = new ReleaseNotesBean();&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       releaseNotesBean.setPackageName(story.get_package());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       releaseNotesBean.setUserStoryId(story.getFormattedID());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       releaseNotesBean.setUserStoryName(story.getName());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       releaseNotesBean.setReleaseDate(releaseDate);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       releaseNotesBean.setReleaseName(release.getName());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;      Attachment[] attachments = story.getAttachments();&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       Attachment attachment = attachments[0];&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       attachment = (Attachment)service.read(attachment);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;      AttachmentContent attachmentContent = (AttachmentContent)service.read(attachment.getContent());&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       byte[] content = attachmentContent.getContent();&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;      String twikiTopic = new String(content);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       releaseNotesBean.setTwikiTopic(twikiTopic);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;      releaseNotesBeanList.add(releaseNotesBean);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;       prepareTopics(releaseNotesBean, packageStoryMap);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;                    }&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;   twikiBean.setPackageStoryMap(packageStoryMap);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    twikiBean.setReleaseNotesBeanList(releaseNotesBeanList);&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    return twikiBean;&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; }&lt;/span&gt;&lt;span class="Apple-style-span"  style=" ;font-size:16px;"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span"   style=" ;font-family:'times new roman';font-size:16px;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-2247436317238447663?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/2247436317238447663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/04/using-rally-java-web-service-api.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/2247436317238447663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/2247436317238447663'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/04/using-rally-java-web-service-api.html' title='Using Rally Java Web Service API'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-4682912040551375618</id><published>2009-04-10T06:35:00.000-07:00</published><updated>2009-04-27T14:58:11.857-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='MyEclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Debug Mode'/><title type='text'>Running JBoss On MyEclipse On Debug Mode</title><content type='html'>&lt;h3&gt;&lt;a href="https://infosource.internap.com/TWiki/bin/view.cgi/IT/MyEclipse" class="twikiLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;MyEclipse&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; &lt;/span&gt;&lt;/h3&gt; &lt;a href="https://infosource.internap.com/TWiki/bin/view.cgi/IT/MyEclipse" class="twikiLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;MyEclipse&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; is one of the standard development environment for all Java Applications. It has a wide range of support for server/client plugins. This section will focus on JBoss server plugin. As of this writing, there were no references on how to glue together the JBoss Server and &lt;/span&gt;&lt;a href="https://infosource.internap.com/TWiki/bin/view.cgi/IT/MyEclipse" class="twikiLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;MyEclipse&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; on Debug mode. Follow the instructions below to properly configure &lt;/span&gt;&lt;a href="https://infosource.internap.com/TWiki/bin/view.cgi/IT/MyEclipse" class="twikiLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;MyEclipse&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; to let your application run in Debug mode successfully. &lt;/span&gt;&lt;p&gt; &lt;/p&gt;&lt;ol&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; From &lt;/span&gt;&lt;a href="https://infosource.internap.com/TWiki/bin/view.cgi/IT/MyEclipse" class="twikiLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;MyEclipse&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; menu click on Windows &gt; Preferences. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Go to &lt;/span&gt;&lt;a href="https://infosource.internap.com/TWiki/bin/view.cgi/IT/MyEclipse" class="twikiLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;MyEclipse&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Enterprise &gt; Servers &gt; JBoss. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; There are several versions of JBoss server available. Pick the version that matches what is installed on your machine. Currently its version 4.0.5. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Enable the server. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Provide the JBoss home directory. Its usually on /usr/local/jboss. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Server name must be 'default' to match the jboss deploy directory.  &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Optional shutdown arguments should be '--shutdown'. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Click on JDK. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Provide the JDK installation and its name. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Under the optional JVM arguments populate it with the following information &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;         -Xms128m            -Xmx1024m            -Djboss.server.log.dir=/var/log/jboss            -Djboss.server.base.dir=/usr/local/htapps/server            -Djboss.server.base.url=file:///usr/local/htapps/server &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;ol&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Click on Launch. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Click the Debug mode. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Click on Paths. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Append to classpath the bin directory of the Java installation. &lt;/span&gt;&lt;/li&gt; &lt;li&gt; &lt;strong&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;Do not run JBoss from the command line&lt;/span&gt;&lt;/strong&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;. Run it by clicking on the server icon from &lt;/span&gt;&lt;a href="https://infosource.internap.com/TWiki/bin/view.cgi/IT/MyEclipse" class="twikiLink"&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;MyEclipse&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; and choose JBoss. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-4682912040551375618?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/4682912040551375618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/04/running-jboss-on-myeclipse-on-debug.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/4682912040551375618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/4682912040551375618'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/04/running-jboss-on-myeclipse-on-debug.html' title='Running JBoss On MyEclipse On Debug Mode'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5463773326793563699.post-5270941968357763218</id><published>2009-04-10T05:55:00.000-07:00</published><updated>2009-04-27T14:57:50.314-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris'/><category scheme='http://www.blogger.com/atom/ns#' term='JProfiler'/><title type='text'>Using JProfiler for JBoss running on Solaris SPARC</title><content type='html'>&lt;h3&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;JProfiler&lt;/span&gt; &lt;/span&gt;&lt;/h3&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Jprofiler&lt;/span&gt; is a profiling tool written in pure Java which can be used to profile applications running in any &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;JVM&lt;/span&gt; implementation. There are two components to it. One is the Agent which gets deployed to a machine where the application will be profiled and the other is just basically a GUI Client that displays the statistics on Memory, CPU and Threads. The data presented at the client are &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;real time&lt;/span&gt; which can be used to analyze performance bottlenecks, memory leaks, threading issues. &lt;/span&gt;&lt;h4&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a name="Setup_and_Configuration_for_Sola"&gt;&lt;/a&gt; Setup and Configuration for Solaris &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;SPARC&lt;/span&gt; &lt;/span&gt;&lt;/h4&gt; &lt;h5&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a name="Requirements_for_the_Remote_Agen"&gt;&lt;/a&gt; Requirements for the Remote Agent &lt;/span&gt;&lt;/h5&gt; &lt;ol&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Ensure installation directory of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;JProfiler&lt;/span&gt; has right permissions and is not affected by any the regular run of of a cleanup/process engine if there's any or else you will have to redo the installation the following morning for further testing.  &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Identify if machine supports 32-bit and/or 64-bit computing. Choose one that is supported by &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;JProfiler&lt;/span&gt;, your server/client machine where the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;JProfiler&lt;/span&gt; agent and GUI &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;JProfiler&lt;/span&gt; will be installed respectively. Both client and agent must have the same computing platform. Run the command "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;sudo&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;isainfo&lt;/span&gt; –v" to determine what the machine supports. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; There should be two files that need to exists, in my example - in a user’s home directory. The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;jboss&lt;/span&gt; and run-jboss.profiler.sh scripts (but you can name them however you want it). &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; This &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;jboss&lt;/span&gt; script is used to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;kickstart&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;jboss&lt;/span&gt; . Should look like the one below. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;LD&lt;/span&gt;_LIBRARY_PATH=/opt/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;jprofiler&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;jprofiler&lt;/span&gt;5/bin/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;solaris&lt;/span&gt;-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;sparc&lt;/span&gt;    export &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;LD&lt;/span&gt;_LIBRARY_PATH    case "$1" in    start)            [ -x /home/staff/rgarcia/run-jboss.profiler.sh -a -d /opt/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;htapps&lt;/span&gt; ] || ex    it 0            echo Starting &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;JBoss&lt;/span&gt; in background...            /home/staff/rgarcia/run-jboss.profiler.sh -d /opt/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;htapps&lt;/span&gt; &amp;amp;            ;;     stop)            /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;usr&lt;/span&gt;/local/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;jboss&lt;/span&gt;/bin/shutdown.sh -S            ;; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; The run-jboss.profiler.sh is basically a script that calls the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;jboss&lt;/span&gt; run.sh script (/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;usr&lt;/span&gt;/local/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;jboss&lt;/span&gt;/bin/run.sh) and initialize the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;VM&lt;/span&gt; parameters instead of passing that activity over to run.sh. The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;VM&lt;/span&gt; arguments specific to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;jprofiler&lt;/span&gt; should look similar to the one below. &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; #&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;va&lt;/span&gt; Overrides : ${JAVA_HOME:=/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;usr&lt;/span&gt;/local/java} : ${JAVA:=$JAVA_HOME/bin/java} : ${JAVA_HEAP_MIN_MB:=128} : ${JAVA_HEAP_MAX_MB:=512} JAVA_OPTS="$JAVA_OPTS -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;agentlib&lt;/span&gt;:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;jprofilerti&lt;/span&gt;=port=2505 -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;Xbootclasspath&lt;/span&gt;/a:/opt/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;jprofiler&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;jprofiler&lt;/span&gt;5/bin/agent.jar -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;Xms&lt;/span&gt;${JAVA_HEAP_MIN_MB}m -&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;Xmx&lt;/span&gt;${JAVA_HEAP_MAX_MB}m -Djboss.server.base.dir=$FINAL_DEPLOY_CFG_ROOT -Djboss.server.base.url=file://$FINAL_DEPLOY_CFG_ROOT" &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;    export  JAVA_HOME JAVA JAVA_OPTS &lt;/span&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h5&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a name="Setting_up_the_Jprofiler_GUI_Cli"&gt;&lt;/a&gt; Setting up the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;Jprofiler&lt;/span&gt; GUI Client &lt;/span&gt;&lt;/h5&gt; &lt;ol&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Install &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;JProfiler&lt;/span&gt; client (Windows).  &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Create Session. Enter the URL of the machine and port number. The port number must be the same as the one configured in the run-jboss.profiler.sh script file. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;p&gt; &lt;/p&gt;&lt;h5&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;&lt;a name="Running_JProfiler"&gt;&lt;/a&gt; Running &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43"&gt;JProfiler&lt;/span&gt; &lt;/span&gt;&lt;/h5&gt; &lt;ol&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Run the remote application using the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;jboss&lt;/span&gt; script from the user’s home directory. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; On the console it should show that its waiting for the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;JProfiler&lt;/span&gt; GUI Client connection. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Open the Session created from the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;JProfiler&lt;/span&gt; GUI Client. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; Application continues to load from the remote machine. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; You can choose what to profile from the GUI – Memory, CPU, Thread. &lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt; You can record snapshots from the real-time statistics and export it to any image or an html or save the current session as .&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47"&gt;jps&lt;/span&gt; file which will save all the raw data gathered. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;p&gt;&lt;span class="Apple-style-span"  style="font-family:'times new roman';"&gt;Please take note that if profiling is completed on the target remote application shutdown its Agent and restart the application using the normal process. &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5463773326793563699-5270941968357763218?l=codecrawler.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codecrawler.blogspot.com/feeds/5270941968357763218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://codecrawler.blogspot.com/2009/04/using-jprofiler-for-jboss-running-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/5270941968357763218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5463773326793563699/posts/default/5270941968357763218'/><link rel='alternate' type='text/html' href='http://codecrawler.blogspot.com/2009/04/using-jprofiler-for-jboss-running-on.html' title='Using JProfiler for JBoss running on Solaris SPARC'/><author><name>desert_fox</name><uri>http://www.blogger.com/profile/02040460388984064917</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://1.bp.blogspot.com/_DCF0BWyN09g/ScFDpuJbwiI/AAAAAAAAA5Q/k86SHvoxi8Q/S220/rommel_small.jpg'/></author><thr:total>0</thr:total></entry></feed>
