This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!

soudamini.s shirkhedkar

+ Follow
since Nov 29, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by soudamini.s shirkhedkar

Thanks for your help. Will try doing it this way.

Hi all,

I want to write a java program/use a protocol to synchonise cache on the three servers that we use in production.
I want the solution work in this way:
if any change occurs in the data of one server cache, it should broadcast the change to the remaining two servers. Depending upon the state these servers have their cache in, caches should be updated.

I did some google on this and found out that there is a protocol Server Cache Synchonisation Protocol- SCSP RFC 2334. At this point, I am not very sure as to how this can be used. I dont have any backgroung in Internet Engineering so I am at a slight disadvantage.
What other options do I have? Can I use IP Multicasting for this purpose? Can I use any class/es from
Please help. Thanks in advance for replying.
Pls help me!!! I am stuck at this and want to make this work!!!
I have installed netbeans IDE 5.0 Beta version on my home computer(XP Professional).
It comes bundled with Sun Application Server. In the tutorials section, there is a quick start guide for developing Enterprise Applications. The link is,
When I try to start the sun app server, I get following exceptions:

javax.naming.NameNotFoundException: No object bound to name java:comp/env/ejb/CustomerFacade
at com.sun.enterprise.naming.NamingManagerImpl.lookup(
at com.sun.enterprise.naming.SerialContext.lookup(
at javax.naming.InitialContext.lookup(
at web.ServiceLocator.lookup(
at web.ServiceLocator.getRemoteHome(
at web.CustomerDetail.lookupCustomerFacade(
at web.CustomerDetail.processRequest(
at web.CustomerDetail.doGet(

[#|2006-01-31T16:48:21.806-0500|SEVERE|sun-appserver-pe8.1_02|javax.enterprise.system.container.web|_ThreadID=15;|StandardWrapperValve[CustomerDetail]: Servlet.service() for servlet CustomerDetail threw exception
java.lang.RuntimeException: javax.naming.NameNotFoundException: No object bound to name java:comp/env/ejb/CustomerFacade
at web.CustomerDetail.lookupCustomerFacade(
at web.CustomerDetail.processRequest(
at web.CustomerDetail.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(

In spite of these, I finally see the line,"[#|2006-01-31T19:54:22.254-0500|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.core|_ThreadID=10;|Application server startup complete.|#]"
I tried to follow exact same steps as given in the tutorial to deploy the sample application.
I can see the servlet for customer information in my browser window but when I enter the customer number to extract its information from the database, application crashes and I get following exception:

java.lang.RuntimeException: javax.naming.NameNotFoundException: No object bound to name java:comp/env/ejb/CustomerFacade
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.lang.reflect.Method.invoke($ Method) Method)

My questions are:
1 Has Sun App server started properly?
2 Whats wrong with my deployment, why am I getting exception when I try to give customer number?

Please help.This thing is bugging me for many days now. I want to get this running.
I am not very sure what exactly happens but my understanding is:

If there are several threads wishing to use the same object and are currently executing wait() because some other thread has control of the monitor and hence it is executing the synchronised code block/method associated with the object:

A call to notify() method wakes up the thread that called wait() method first.If priorities are given to the threads, it can also wake up the thread with highest priority.

A call to notifyAll() wakes up all the threads that are waiting for access. Scheduler will then schedule the next thread to be run depending upon the priorities or the threads might contend upon themselves for access to the monitor.
We can make use of the methods join() and isAlive() in thread class.

boolean isAlive()
This is used to find out whether a thread is alive(still functioning) or terminated.
A parent thread can call this method to find out the excution status of its child threads before terminating itself. It can choose not to terminate itself if any of its child threads are still functioning.

A call to this method invoked on a thread will wait and not return until the thread has completed. A parent thread can use this method to wait for its child thread to complete before continuing. In other words, parent thread waits for its child thread to join it after completion.

All the best!
Answers to these two questions are related to the concept of dynamic method binding and varible shadowing.
As you can see, base class as well as a derived class, both have a method named test() and an integer variable i.These two classes do not have a non-default constructor. So, a default constructor will be specified for each one of them by the compiler.
Now, when an object b is created using,
class2Base b = new class2()
This has reference type of class2Base and object type if class2. a default constructor of class2 will be called when we create an object using new operator. This default constructor will call the default constructor of the parent class as its first line. The object state is now initialized. The next line of code is:
System.out.println(b.i). Variable shadowing is resolved on the basis of reference type, in this case, reference type is class2Base. So, integer i from base class ( which is initialized to 2 ) will be displayed.
Next line is:
b.test(). This has object type of class2, so overriden test method from class2 will be called and hence the output.
Your second question can be explained in a similar manner.
Concepts of variable shadowing and dynamic method binding are very important and it helps if you get it right once and for all.
Hope this helps.
[ December 01, 2005: Message edited by: soudamini.s shirkhedkar ]
13 years ago

There are two types of multitasking:

process based multitasking and
thread based multitasking.

In process based multitasking, two processes run concurrently on an operating system. For example, we can think of a word processor and an excel sheet running at the same time in parallel. These are two different programs that do not share common memory space ( in other words, they have separate data and code ) but they are just running in parallel.

Thread based multitasking is at a finer level than this. Two threads share the same memory space, they can operate on same data and they are usually parts of the same program. They have different execution paths and hence can run concurrently making an efficient use of operating system.

I would suggest to read the Sun Tutorial on threads, its excellent to begin with. When you feel like you have sufficient knowledge of threads, try writing some code on your own, that would give you first-hand experience.

Sun tutorial on threads

This is updated to include concepts from a new release.

All the best.