Archive for the ‘Uncategorized’ Category.

bind values to jndi

The following code demonstrates how to bind your values to jndi. It requires weblogic server running in the specified environment.

/*
* HomeCache.java
*
* Created on August 26, 2007, 10:05 AM
*
* This is the basic home cache i will be using to get the weblogic environment
*/

package vanavani;

import javax.naming.*;
import java.util.*;

/**
*
* @author pandian
*/
public class HomeCache
{
InitialContext ic;

/** Creates a new instance of HomeCache */
public HomeCache()
{
}

public InitialContext getInitialContext() throws Exception
{
Properties prop = new Properties();
prop.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, “weblogic.jndi.WLInitialContextFactory”);
prop.put(Context.PROVIDER_URL, “t3://localhost:7001″); //t3 is a proprietory protocol by weblogic
ic = new InitialContext(prop);
return ic;

}

}

Coordinates of elements in DIV – Firefox and IE

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

The Data Area Passed to the System Call is Too Small


I got the following error in Firefox, while opening a new window with specified parameters, “the data area passed to the system call is too small”. there is some limitation in the length of the query string that is being passed (GET) request. automatically it gets screwed and the error is simply written in the browser. with Internet Explorer, we cant figure-out the error, since its error message is not at all helpful!!!

FastHashMap – a map for multithreaded environment

when we need a map kind of object, there are several options. while working with threads, there arises an issue, we are going for HashTable. When we use Hashtable, one thread has to wait with some other thread is playing with the map, which is unnecessary. One of my team mate had used some classes from beanutils for someother purpose. when going thro the API of the commons-beanutils before adding it to classpath (lazy fundoo, havnt looked at this api before!), I found org.apache.commons.collections.FastHashMap.

It has a field called ‘
fast' which decides the read property of the map. If the map is at fast mode, then read occurs concurrently, which will increase our reading capability. as the definition says, we can enable or disable fast mode. I havnt tested this. need to do it.