File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Websphere and the fly likes global.jsa Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "global.jsa" Watch "global.jsa" New topic
Author

global.jsa

M.K.Gopinathan
Greenhorn

Joined: Apr 20, 2002
Posts: 3
Please do advice me how to configure global.jsa
on Websphere 4.0?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Maybe if you would explain what global.jsa is we could help you. I've never heard of it.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
M.K.Gopinathan
Greenhorn

Joined: Apr 20, 2002
Posts: 3
Dear Kyle Brown
Global.jsa is a file which is a event handler for JSP pages. It has methods
1. onApplicationStart() --> which will fire when web server starts to serve the application for the first time.
2. onApplicationEnd() --> which will fire when web server end serving the application .
3. onSessionStart() ---> This method will fire when a user session starts.
4. onSessionEnd() --> This method will fire when a user session ends (invalidate).
This is file is as per the JSP 1.1 Specification. But nowhere it is documented. JRUN 3.0 Supports this file.
We are creating a database connections when a user session starts and we have to close it when the user close the session or when session times out. Global.jsa will helps you to do this task. If you have any other solution to the above problem, it is really appriciated.
I am thanking you for the response you made.
M.K.Gopinathn
james edwin
Ranch Hand

Joined: Nov 22, 2001
Posts: 393
HI,
I am doing R & D on WAS(AE)4.0 from last 15-20 day.But i never found anything related with global.jsa

IS WAs supports this kinds of stuff like Jun3.0 do?


Regards,
James
Se Ravin
Greenhorn

Joined: Feb 18, 2002
Posts: 26
Heard of HttpSessionBindingListener,
it has valueBound and
valueUnBound methods which u can use for this purpose.

Checkout http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpSessionBindingListener.html


We are and We are Not
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Originally posted by M.K.Gopinathan:
Dear Kyle Brown
Global.jsa is a file which is a event handler for JSP pages. It has methods
1. onApplicationStart() --> which will fire when web server starts to serve the application for the first time.
2. onApplicationEnd() --> which will fire when web server end serving the application .
3. onSessionStart() ---> This method will fire when a user session starts.
4. onSessionEnd() --> This method will fire when a user session ends (invalidate).
This is file is as per the JSP 1.1 Specification. But nowhere it is documented. JRUN 3.0 Supports this file.
We are creating a database connections when a user session starts and we have to close it when the user close the session or when session times out. Global.jsa will helps you to do this task. If you have any other solution to the above problem, it is really appriciated.
I am thanking you for the response you made.
M.K.Gopinathn

Mr. Gopinathn,
I'm sorry to contradict you, but this file and the concomitant functions are NOT part of the JSP 1.1 specification. Go download the spec and read it yourself. The file name and the applications are not mentioned at all. It is an extension used by Resin, JRun and Oracle (it was originally introduced by Oracle) but it is not part of the spec and the other major vendors have not picked it up. Servlet 2.3 (which is not implemented in WebSphere 4.0) handles up some of these issues, but in a different way.
Instead in WebSphere you can use the standard SessionBindingListener interface described in the previous post, or the WebSphere-specific ApplicationListener described in the product Javadoc Alex Polozoff's article on SNMP traps shows how to use the very similar ServletEventListener interface in your applications -- you can adapt his example code to use the nearly identical ApplicationListener.
Kyle
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Originally posted by M.K.Gopinathan:
Dear Kyle Brown
Global.jsa is a file which is a event handler for JSP pages. It has methods
1. onApplicationStart() --> which will fire when web server starts to serve the application for the first time.
2. onApplicationEnd() --> which will fire when web server end serving the application .
3. onSessionStart() ---> This method will fire when a user session starts.
4. onSessionEnd() --> This method will fire when a user session ends (invalidate).
This is file is as per the JSP 1.1 Specification. But nowhere it is documented. JRUN 3.0 Supports this file.
We are creating a database connections when a user session starts and we have to close it when the user close the session or when session times out. Global.jsa will helps you to do this task. If you have any other solution to the above problem, it is really appriciated.
I am thanking you for the response you made.
M.K.Gopinathn

One more thing -- why are you creating database sessions like this? Just use the standard database connection pooling API (DataSource) in WebSphere -- you shouldn't ever have to put Database connections in a session -- that's a truly bad idea.
Kyle
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: global.jsa