Weblog

All | General | Status | Java | Music | Politics
20040408 Thursday April 08, 2004

Trying to use textarea for displaying xml text in a blog entry

Sample xml using textarea:


Posted by nithy ( Apr 08 2004, 08:29:48 PM CDT ) Permalink Comments [4687]

20040407 Wednesday April 07, 2004

Tip to speed up the jsp compilation process with weblogic

This works with weblogic 6.1, not tested on later versions.

If you are using ant to compile your jsps with weblogic.jspc then u can improve the build time by specifying the undocumented flag to weblogic.jspc

        <!-- 1. compile the jsp's to create only the java files and skip the javac using the flag -skipJavac -->

      <property name="cmd.line" value=" -keepgenerated -depend -webapp ${dir.tmp.war} -compileAll -d ${dir.tmp.webinf.classes} -skipJavac"/>
      <echo level="info" message="${cmd.line}"/>

      <java fork="true" failonerror="true" classname="weblogic.jspc" classpathref="precompilejsp.classpath">

          <arg line="${cmd.line}"/>

      </java>
	<-- 2. compile the generated java files separately -->
      <javac deprecation="${deprecation.javac}" fork="${fork.javac}" source="${source}" debug="${debug}"
          srcdir="${dir.tmp.webinf.classes}" destdir="${dir.tmp.webinf.classes}" classpathref="precompilejsp.classpath"/>

This will improve the jsp compilation time. It reduced the Jsp compilation time from 15 minutes to 1 minute for me for around 150 jsps, because javac is invoked only once instead for every jsp.

Posted by nithy ( Apr 07 2004, 11:57:12 AM CDT ) Permalink Comments [15339]

20040128 Wednesday January 28, 2004

Using the entity includes in xml

Ant supports an import tag for including another xml file as Lance explained, which is very nice.

But with cruisecontrol I have no other option than using the entity includes method, which is not very bad in this case.

For example I am running multiple projects in the continuous integration build and my cruisecontrol config xml file looks like the following

<?xml version="1.0"?>
<!DOCTYPE cruisecontrol [ 
 
        <!ENTITY project1 SYSTEM "file:./prj1.xml"> 
        <!ENTITY project2 SYSTEM "file:./prj2.xml"> 
        <!ENTITY project3 SYSTEM "file:./prj3.xml"> 
        <!ENTITY project4 SYSTEM "file:./prj4.xml"> 
 

]> 
 
<cruisecontrol> 
 
   &project1; 
 
   &project2; 
 
   &project3; 
 
   &project4; 
 
</cruisecontrol>

This looks simple when compared to having configurations of all the projects in one xml file.

This is not a clean way, but it is useful.

Posted by nithy ( Jan 28 2004, 07:11:07 PM CST ) Permalink Comments [11786]

20040104 Sunday January 04, 2004

Virtual Keyboard "The VKB attaches to handhelds and projects the image of a full-size keyboard onto the surface of the desk where the handheld is placed, allowing the user to input text without a physical keyboard"... iBiz releasing virtual keyboard soon


I hope there will be a virtual Monitor soon :) , then all we need is a small handheld which can serve as a cellphone, PDA, TV, DVD player, laptop, dektop,.... Posted by nithy ( Jan 04 2004, 03:12:58 PM CST ) Permalink Comments [12694]

20031222 Monday December 22, 2003

Xerces DOM implementation is not thread safe for read only Couple of months back I wrote a test driver, which was using a single instance of DOM document and the test was reading some values and processing some other application logic. It was working fine until I ran the test in multiple threads. I started getting some unexpected errors from DOM objects. I used Xerces as DOM implementation.

Then I started reading the DOM spec. I found that there is no requirement for the DOM implementation to be thread safe(even for read-only purpose).

Usually everyone assumes that if we do read operations then it is thread safe as long as we do not do any write operation. But it is not true, it totally depends on what the read operation does.

Most of the time we use windows and the multi thread tests also pass, coz the chances of creating a race condition with a single processor machine is very less. I have noticed that the multi thread tests I ran on my laptop(single processor) with windows xp succeeds most of the time and they fail on IBM AIX(4 processors) most of the time.

Posted by nithy ( Dec 22 2003, 07:57:39 AM CST ) Permalink Comments [12129]

20031207 Sunday December 07, 2003

FIRST POST! This is my first post Posted by nithy ( Dec 07 2003, 08:41:30 PM CST ) Permalink Comments [5138]

Calendar

RSS Feeds

Search

Links

Navigation