Simple Question

Why cant anyone answer it?Can someone tell me what a callback method is or what situations they are used in? I can't seem to find a real definition anywhere.
[180 byte] By [kyleb] at [2007-9-26 3:33:05]
# 1
If A invokes an operation nameds bOperation() on B and to complete that operation B needs to in turn invoke an operation nameds aOperation() on A, then generally speaking aOperation would be a callback.Does that make sense ?
neville_sequeira at 2007-6-29 12:01:16 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

Thanks for your reply neville. I got my head around that idea though. I am more interested in how it relates to EJBs. I know the lifecycle methods are callbacks but in the relationship between the client, bean instance and the container, who would be object A and who would be B? Thanks for your help.

kyleb

kyleb at 2007-6-29 12:01:16 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

An example...

Lets say we have an EJB which is a session bean. So implements the methods defined in javax.ejb.SessionBean. The EJB container guarantees that these methods will be invoked on instances of the session bean at appropriate times and under appropriate conditions.

In the case, the methods defined in javax.ejb.SessionBean are the callbacks, the session bean instance and the EJB object together form A and the EJB container is B.

neville_sequeira at 2007-6-29 12:01:16 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Got it! Makes perfect sense. Thanks again neville.
kyleb at 2007-6-29 12:01:16 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
In EJB the callback methods r the methods that container calles under specific circumstances to give a chance to the bean developer todo some thing which container may not or would not do.
nayyerkamran at 2007-6-29 12:01:16 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...