Sunday, August 30, 2009

Eclipse Search not working ( java search class filename must end with .class)

Follow the below steps to take care of this. Most probably the index files used by Eclipse would have got corrupted and if we reindex them, it helps.
  1. Close Eclipse
  2. Delete /.metadata/.plugins/org.eclipse.jdt.core/*.index
  3. Delete /.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt
  4. Start Eclipse again

Saturday, July 4, 2009

genn blog

trying a blog with a bit slow connection..

Sunday, January 18, 2009

Monday, December 22, 2008

Server side Prepared statements in MYSQL + Java

One thing that we generally forget when using MySQL prepared statements in Java is the setting up of the parameter "useServerPrepStmts". This variable must be set at the JDBC connection level to take advantage of MySQL server side prepared statements. Otherwise, though we follow all the standards of coding in writing client-side prepared statements, MySQL ultimately treats them as a regular statement only.

Below is an example datasource setting in JBOSS




SomeMySQLPool
true
jdbc:mysql://HOSTNAME:3306/SomeMYSQLDb
com.mysql.jdbc.Driver
NON ROOT USER NAME
PASSWD
true
org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter

mySQL


Wednesday, December 10, 2008

JBoss Performance Tuning

The first thing that we need to do as a part of this exercise is to identify the parameters that we have to work upon. Below is a list of different things that we can look upon before actually going into the tuning part.

JVM Settings
a) JAVA HEAP SIZE
b) PERM GEN SPACE
c) Parallel GC? (Good for multi CPU systems)

DB settings
a) Max Pool and Min Pool sizes for all Oracle and MySQL Pools.
b) idle-timeout-minutes
c) blocking-timeout-millis

HTTP connector Settings (Thread Pool Settings)
a) Max Threads -- Concurrency
b) Accept Count -- Queue size of each thread
c) Compression -- True/False

JSP Compilation Settings
a) We don't need to check for compiled JSP's every now and then unlike in dev.
b) No debugging for JSP's.

Security Settings
a) Remove universal access to JMS console and WEB consoles.
b) We can even try to restrict the access to this from the local machine.

Log4J Settings
a) Make sure we log only the critical errors.
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

Load Testing the application
a) This is one critical part that needs lot of application context. First of all we have to be really clear on what we are going to load test and the most probable pain points to look for. Then we can think of the data to test with.

Hibernate Settings
a) Cache Size

OS Settings
a) Large Pages (2.6 kernel supports it seems)

Apache for serving Static Content
a) Traditionally App servers are not great at serving static content. Apache is generally good when it comes to a serving static content. Some reasons for this are web servers having their own disk caching etc.
b) Over time, app servers have improved a lot in serving static content. But going for a web server for serving static content gives us the flexibility of creating a new domain and the content download can happen much faster.

References
    http://www.jayson.in/wp-content/uploads/2008/08/jboss-folder-structure.jpg

Thursday, November 20, 2008

Motivation!!!

Sometimes we want to improve the state of the things but ends up in a vain attempt. There are lot of factors that contributes to this. Not much of help from peers, micro-mgmt from top-level, lack of self-motivation, lack of will to take the ownership/leadership are things which I feel are the key factors that determine the performance of an employee.
Of course things should also be communicated in a better manner!! And guys should be motivated every now and then!! I always wonder if I ever learn the definition of "motivation" :( But what's motivation!! Is it pushing people to get the chores done!! Or is it trying to extract "more" from someone!! What's "more"? How much is that? If we can't even get the basic things done, can we even/ever get to the extent of extracting "more". I doubt!! But why should we even "motivate"? If someone is paid for and expected to do certain things by following certain well-established practices, do we additionally need to "push" them also? If the answer is "yes", I hate being a manager.
For me "motivation" means a positive way of influencing peers by setting some high standards!! Actions but not the words should speak.!!
Stopping here as I get irritated more and more to work when I think of these things!!

Sigh!!!
Sujay

Thursday, November 6, 2008

What the heck is going on in life!!!

I don't know why exactly but I am feeling different today..definitely different but don't know exactly what..disturbed by something..definitely not a bad feeling though.. :) went up for a chai to think "that"!! i got it....not doing anything really constructive in life!!.. this thought is killing me since the last few years and increasingly turning out to be a huge menace for the survival of my psyche. can't take it anymore..i am going to do something.. get a pen and paper....lemme give it a try again today ... hope to add some good news by tomorrow..!!