Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!

Naidu Jitta

Greenhorn
+ Follow
since May 12, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Naidu Jitta

createTemporary expects an OracleConnection whereas from datasource we get a lite wrapper around OracleConnection. We need to navigate through the wrappers to get to the physical OracleConnection.
18 years ago
I am using HTTPSessionListner. So when where session expires I need to redirect the page to the home page. Here is my code:
public final class SessionWatcher implements HttpSessionListener {
RequestDispatcher req;
public void sessionCreated(HttpSessionEvent event) {
HttpSession session = event.getSession();
String sid = session.getId();
long time = session.getCreationTime();
System.out.println("************************New sessionID: " + sid+"************************");
System.out.println("************************Session created @ " + time+"************************");
req = event.getSession().getServletContext().getRequestDispatcher("/login.jsp/?TS3Constants.MESSAGE=TS3Constants.SESSION_EXPIRED");
System.out.println("************************RequestDispatcher req ==>" + req.toString()+"************************");
}
public void sessionDestroyed(HttpSessionEvent event) {
System.out.println("************************Session " + event.getSession().getId() + " destroyed************************");
try{

System.out.println("************************RequestDispatcher req ==>" + req+"************************");
req.forward(null, null);
}
catch(Exception e){
System.out.println("************************Session " + event.getSession().getId() + " destroyed************************");
e.printStackTrace();
}

}
}
This is giveing the Null pointer exception. I am able to to print the request dispatcher. even though I am getting Null Pointer when I am forwarding.
Help me in this regard...
Is there any other way to proceed with the Listner itself???

Thanks in Advance...
J. P. Naidu
18 years ago
hello Jane,
Actaully MDB is a listner, so u can send a message when ever u recieve a message. Until and unless u won't recieve any messages it si not possible to do the same
J. P. Naidu
hai,
U might have used different version of class files(complied with 2 different versions of JVM) in ur application. This could be the reason of this exception....
With Regards,
J. P. Naidu
Hai,
The timeout of the statefull sessin bean (passivation) is container specific.
I think if the beans method is not called for specfic time, say 30 min (again container specific) the bean will become inactive whether r not the client is having the reference
If i am wrong plz correct me
hai Anup,
No it is not possible according to the specifications. First of all u can't even deploy the bean with out the home and remote interfaces.
with regards,
J. P. Naidu
Hai Anup,
Home interface is responsible for the life cycle management of the bean.(creating and destroying)
Remote interface will handle all the business logic of the application.
With Regards,
J. P. Naidu
Hai,
Y can't u limit the communication of the EJB's to some servlet or soem JSP. I mean the applet will communicate to the Servlet and from the servlet u can contact the beans.. thus reducing the overhead of downloading all the necessary stuff...to the client
Does this solves ur probelm?
With Regards,
J. P. Naidu
U don't need any special JRE for it as this will be taken care by server where aplication is running
hai,
This aproach is introduced from EJB2.0. This feature is called as the Abstract Persistance Schema. This is doen to incerease the performance.
Previously, for every method call the fields are loaded or stored. But this is eliminated in the new specs increasing the performance...
Naidu
hai,
ejbRemove() is called for session beans every time the container destroyes the bean. So you can use this method to do the stuff you typically would do in unsetEntityContext().
For entity beans ejbRemove() is only called if the user explicitly deletes the bean. I think that is the reason why the engineers at SUN invented the unsetEntityContext() for this kind of bean.
Hey its me again ....
There was a spelling mistazke in the above reply.
u can't access the methods that are not specified in the remote interface.
Naidu
If u don't specify the methods in the remote interface U can' access them from the bean. B'cos client does'nt know unless and until it is specfied in the remote interface, what methods are present in the bean.
Is it wht u queried for?
Middleware is the middle-man that sits between two or more hulking systems which are used to being the center of attention. The middleware takes data from one system, and gives it to the other system in a way it likes.
This middle ware can be message oriented middle ware and also a object broker
In the MOM JMS will com in to picture
Naidu