thilak subbiah

Greenhorn
+ Follow
since Nov 16, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by thilak subbiah

Hi,
Can you name some websites which are developed using XML?
How does it improve the performance(download time) of the site?
Regards,
Thilak.V
Hi,
We started developing one B2B portal using HTML, Servlets and J2EE technology.What are all the benefits we will be having if we use XML rathen than HTML?
Thanks in advance,
Regards,
Thilak.V

Hi Avi,
Thanks for your information. sorry for not mentioning full details.
I am accessing the Oracle8 database from servlet.I am getting maximum cursors exceeded error because of many opened Resultsets.So, i want to store those huge resultset in some other temporary object and close the resultset at once.
Regards,
Thilak.V

Originally posted by Avi Abrami:
Lots of missing information here that affects the answer. A ResultSet is like a database cursor. One of the details you don't mention is the DBMS you are using. With my experience (with both Oracle and Informix), a database cursor is something available via the DBMS's procedural language extension - in Oracle this is PL/SQL and in Informix it is SPL. Both these DBMS's (Oracle and Informix) know how to handle huge result sets via cursors, so a java.sql.ResultSet should also be handled just as well. Therefore, if the cursors don't cause performance problems, why should the ResultSet? There are obviously some other details you haven't mentioned.
We use RMI to return ResultSets to a remote client by building java.util.Collections. The ResultSet remains open on the server and the client can navigate the ResultSet remotely and receives Collections that can be of varying sizes from one row (of the ResultSet) to the entire ResultSet (memory permitting). We use large ResultSets and don't notice any performance problems. If, however, you open several ResultSets simultaneously, then you start to see problems.
More details about your situation would help. What is your architecture - client/server, remote clients, local clients? What is your DBMS - Oracle, Informix, SQL Server, Cloudscape? Do you have a java application or applet (or servlet or JSP or what)?
Cheers,
Avi.



------------------
24 years ago
Hi,
When i execute the following statement,
ResultSet rs = stmt.executeQuery("Select * from emp");
returns a ResultSet which contains say 10000 records.Keeping this resultset as opened will affect the performance.so, we have to close that rs at once.My question is, how can we handle these kinds of huge resultsets.
Thanks in advance
Regards,
Thilak.V
------------------
24 years ago
Hi,
I have tested the following code in servletrunner and it is working properly.Destroys the session and creates a new session.
//code
HttpSession session = req.getSession(true);
session.invalidate();
session = req.getSession(true);
session.putValue("Hello","Test");
regards,
Thilak.V

Originally posted by kuaikuai:

//User clicks SWITCH IDENTITY, we are require to abandon
// existing session & switch to new login user
// Code snipplets below
HttpSession session = request.getSession();
if (session != null)
session.invalidate(); // destroy everything on session
// We then require a Total new session
session = request.getSession(true);
In Jrun3, The session above returns the old session which
will throw exception if we call
session.putValue ("Name", "XX");
Anyone can suggest how I can access a new session


24 years ago
Hi Pranav
Thanks for your info.
When we run JSP programs, it will be converted to Servlets.So, JSP engine will take some time for this conversion.So, performance will be reduced.In my opinion, we can directly write servlets to improve our performance.
Just give our comments.
Regards,
Thilak.V

Originally posted by Pranav Jaidka:
hi thilak
JSP was made in order to give the user a distinct method to separate the HTML (interface part) from the actual servlet methods(Actual functionality).So it depends on what you need to use.
If you wantyour servlet to use HTML extensively you can go in for JSP as it saves you a lot of trouble.
If on the other hand your servlet is just a pure functional unit then you may prefer to go in for the Servlet approach.
The jsp format allows you to use certain objects like out,request and response so theres not much difference in what you can do with servlets and jsp .
regards
pranav



------------------
24 years ago
Hi,
Is it possible to do all those things by JSP rather than Servlets? Which one is better Servlet or JSP?

------------------
24 years ago
HttpServlet extends GenericServlet, so we can access all methods of GenericServlet from HttpServlet itself.So, by extending HttpServlet, can we write a GenericServlet?

------------------
24 years ago
I want to write one servlet which uses ftp protocol.Using GenericServlet, how can write it?.Please give example with code.
------------------
24 years ago