Wednesday, 23 November 2011

ColdFusion IceBreaker #2: Configuring JBoss in OSX Lion with OpenOffice to support cfdocument

ColdFusion empowers users to deploy it as a EAR/WAR file in their existing Application Server (J2EE config) and all the CF features can be used along with the benefits offered by the Application Server.
The <cfdocument> tag in ColdFusion lets you convert your word document to PDF and powerpoint presentations to PDF/HTML format and in some of its use cases , uses OpenOffice (About OpenOffice)

If OpenOffice is installed before ColdFusion is installed on your machine then ColdFusion detects the presence of OpenOffice and adds the location of OpenOffice to ColdFusion Administrator->Server Settings->Document

However,when deployed as a EAR/WAR, and despite detecting the OpenOffice location ,the OpenOffice library jars need to be added to the server configuration files  manually before Openoffice can be used through <cfdocument>.

A quick link for the know-it-all :ColdFusion : Configuring OpenOffice for J2EE servers

Below are mentioned a few steps for installing JBOSS on Mac OSX Lion and configuring OpenOffice on it.

1)Download OpenOffice for OSX .The zip file would download to the /Downloads folder on your mounted device

2)Unzip the file using Archive Utility and install OpenOffice

3)In some cases,it is shown as a device under the mounted device.Drag and drop the app to /Applications folder.Info will say /Applications/ will have the folder Contents.

4)Install JBOSS.Simply download the zip file,place it in a temporary location and unzip it
Eg: /Applications/JBOSS_MAC/jboss-6.1.0.Final/
JBOSS is now installed
This would now have the following folder structure:

5)Install ColdFusion as an EAR.Use the installer to create an ear file and expand it (java -xvf) to generate cfusion.war,META-INF and rds.war.Expand cfusion.war and rds.war.
This should now have the following folder structure:
/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF etc

6)Check the presence of the OpenOffice library jars in
This should now have the following folder structure:
lib folder should contain the following jars

7)Now,add these to the java paths of JBOSS as follows:

7.1) Goto /Applications/JBOSS_MAC/jboss-6.1.0.Final/bin
7.2) Edit run.conf
7.3) Add the locations to java.class.path
JAVA_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.class.path=/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/classes:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib"
7.4) Edit
7.5) Add the locations to JBOSS_CLASSPATH
export JBOSS_CLASSPATH="$JBOSS_CLASSPATH:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/classes:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib/juh.jar:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib/jurt.jar:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib/ridljar:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib/unoil.jar:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib"

8)Use sudo ./ -b to start your server
This will enable other IPs to access your ColdFusion Application

9)Login to ColdFusion Administrator->Server Settings->Document.Check the OpenOffice installation directory.

10)Try to run a simple <cfdocument> example
<cfdocument format="pdf" srcfile="<path_to_word_doc>" filename="<path_to_destination_with_file_name>" overwrite="true">

View your pdf file.

Thursday, 10 November 2011

Saturday, 5 November 2011

A new Cam-on !!!

So I bought myself a camera,to celebrate the onstart of the weekend
(and other celebratory events which I shall mention when I get to them ;) )
And considering it was Day1 with Camera 1, here are a few of the pics that I managed to save
from all the junk I clicked throughout the day ;)

These may not be my best,but theyr the first from the new cam

Even though I love #Adobe and its products, Iv left my pics absolutely untouched.
Maybe the future...maybe...

Featuring :
a heavily overcast Bangalore with glum natural lighting to begin with,
an essentially basic 18-55mm as my gear,
Brigade Road the muse,
and heavy rains the spoilsport !
So here goes !!!!

On a rightfully patriotic note...PIC 1
Bangalore warned us on Friday what Saturday was going to be like!

The beauty of a large window,green trees and a wide angle lens..

One of the tricks I picked up from one of the many articles I devour haha !!!

Overexposed ,yet irrestible !!!

One of the many stunning artifacts one finds in the countless antique shops on Brigade Road !!

The glamour of the unknown ....

The beauty of the blurr...

Where oriental and indian fares divide the palates in quarters ;)
Posted by Picasa
Helping a friend ! - India's biggest online food & lifestyle guide

Wednesday, 26 October 2011

Can you hear the sounds of Diwali !!

And Diwali is finally here...

There's something in the air..a feeling of expectancy..a certain restlessness..which begins post Dusharra and continues right until one hears the sound of a cracker..the sizzle of a phuljhari..the boom of a sutli..the fizz of a anaar...the takeoff of the rocket..and the seeti of a seeti ;) ..

And so conditioned we are to the sounds of the festival...that the precursor sounds make us react a certain way..
a boom hrd in great distance willl make u look up expectantly for the burst of such absolute bright colours which will never fail to uplift your heart.. .
a burring sound close to your feet will make u take a step back..ever careful of the zipping zameen chakri
a slight sparky sound will make even the brave hearted cringe in expectation of the deadly sutli..!!!

And  through the windows of a million Indian hear the other Diwali sounds....the kitchen kadhai sizzling away waiting for gujiyas to be fried..the cluttered sounds of utensils..the giggles of the girls  busy making rangoli...the men loudly "telling' the ladies to get ready for the puja..the rustling sounds of sarees when rushing around for the samagri...voices raised in prayers to the Goddess of Wealth..and the lighting of the diyas!!! The wait is finally over ..its time for the fireworks to begin..

Diwali is a festival of lights...a mostly visual affair....but as I sit in my room ...thousands of kms away from home...these sounds fill my heart with a certain joy...away from the festivities,yet smack in the scheme of things...a crackle here a sizzle there..and I smile at each sound as  I try to seperate the 'successful' cracker-bombs from the ones that will disappointingly fizzle out of steam  :)

For all of you reading this..

Step out .....look up...and watch the sky light up .....Just for You !

Happy Diwali !!!

For the uninitiated:

1.phuljhari : a sort of wire based fire cracker which lights up with a sparkly effect...generally used by kids n girls n other fainthearted people
2.sutli : A deadly fire-cracker which bursts with a loud blast..ear ringing stuff !
3.anaar :  a visual fire cracker which gives off large colourful sparks , sometimes in different colours..sometimes it bursts!!
4.rocket :  a miniature firework which when lit flies into the sky...pretty much like the NASA variety!
5.seeti : a whistling ,zipping , bursty fire-cracker with a mind of its kiddin!!!
6.zameen chakri : a rotating,revolving firecracker giving out beams of sparks..
7.kadhai :  a kitchen utensil used to deep fry eatables..
8.rangoli : ..Cant explain it any better than this !

Wednesday, 5 October 2011

ColdFusion Icebreaker#1 : Tried CF yet ?

Most of us , if we have something to do with the world wide web,  know the basic concepts of servers...
We know about application servers,web servers...who they are,what they do and when they are used....
Tomcat , Apache , Websphere Appplication Server(popularly called WAS) are common names today.

ColdFusion (CF) is one such server with a huge difference. Its easy !
Easy to install,easy to create powerful applications in and easy to deploy.
You can use the ColdFusion Markup Language  (called CFML) to do pretty much all that you can in any other language, only in fewer lines of code!

The basics are pretty simple : you write .cfm pages(essentially similar to JSP pages) for the view and put your business related code in CFC (ColdFusion components..essentially similar to Java classes)

For instance, lets talk about DB connections . Most developers will/would at least once in their lives have done a DB call, and if Java is what you speak , then it pretty much follows a common algorithm of :

1)Choose the driver
2)Load the driver
3)Get a connection
4)Create handlers to execute your query
5)Run your query
6)Store your results
7)Use your results

Add to that all the necessary exception handling,connection setting, data source setup and what you have is a considerable amount of time spent coding and debugging before the code is good to go.

As of CF 9, thanks to ORM , it is as easy as writing a few tags

1)Setup your data source in the CF Admin data source section.This lets you choose your database from a drop down .All you need to provide are the connection parameters like IP,password etc
2)Provide this datasource name is an Application.cfc file
Eg:   <cfset"MyORMApp"
       <cfset this.ormenabled="TRUE">
       <cfset this.datasource="<your-datasource-name>"
3)Create a cfc that maps to your table (Need not even specify the table name, as long as its the same as the cfc name)
Eg:   <cfcomponent persistent="true">
           <cfproperty name="ROLL NO">
           <cfproperty name="MARKS">
4)Directly use functions that perform the necessary pull and push of data from the database.
Use this in UI tags like cfgrid
Eg : EntityLoad() = select *

And voila !! you have run a select query without having to bother about the type of driver you used,its syntax and all the related complications.

All this and more..but in less lines of code.

Feel free to try CF..the developer edition is free !

Tuesday, 20 September 2011

The Surprise !!

A "wassup" ping from a long lost friend on a sad day...a surprise bday party the year you had to work late on your birthday...or some unexpected shared chocolate after a long day...

There is no bigger mood brightener than a pleasant surprise !!! 

It cuts you out and moves you a shift of a lighter,sunnier place..
Where you would'nt have asked anything from the moment...where you couldn't have demanded more from the moment...
A gift you dint know you wanted..but which got you all that you needed...

The aftereffects are tough to relish for all those who are not a part of the picture : a big goofy grin that refuses to go away,  heart filled with light which refuses to be diminished...a lighter step,a bolder voice and easy laughter...
Some more restrained of us keep it in our hearts, go about our daily businesses , only to relive such incidents  during moments of privacy or suddenly during  spells of tedium...just a quick smile..some recollection..a happier heart nonetheless..

and they spread...when you tip the waiter an extra 10/-...when you smile at the auto driver who wants the extra 10/-..and when all your goofy grins bring back an answering smile wherever they are spotted.. 

These are the memories that stay together. .even when the people in them dont ...through distances...through time...

Cheers to those who care enough and choose to give , regardless !!

Saturday, 17 September 2011

Facets: It all begins with...

Facets: It all begins with...: One facet too how I think of myself.. Which makes one wonder what to write about..with multitude of thoughts and experiences...c...

It all begins with...

One facet too how I think of myself..

Which makes one wonder what to write about..with multitude of thoughts and experiences...crests and troughs...a dynamic whirlpool of being..

To give expression to which one, or rather ones ,of those mental intentional elaboration to some select seemingly ethereal yet potentially pathbreaking ideas..

All while still maintaining that there is beauty in brevity !!!  :)

I ,for one, dont believe in setting limits...when you dont know how high to jump,you surprise yourself  and touch the sky..and thats the 'toe-no-line' attitude the posts are going to follow...unboxed and diverse...contemporary and traditional...and for the photography initiated..wide angled and long focussed  :)

A lot like me really...

A toast to the world of words !!