Kevin Conaway

Ranch Hand
+ Follow
since Jan 27, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Kevin Conaway

What is the error your getting? Please paste

I wouldn't use session variables for communicating between page flows.

Kevin
18 years ago
I wouldn't use globalApp for much of anything really. Try using request attributes (or parameters for non sensitive info) to pass data between flows.

18 years ago
Hi folks,

I'm not sure if this is an appropriate place to make announcements but I wanted to let you know that I've written a plugin that integrates PMD into Workshop 8.1.x

If you aren't running PMD, you should be!

Check it out at: http://pmdwlw.sourceforge.net/ and let me know if you have any questions or problems.

Thanks,

Kevin Conaway
18 years ago
I guess my earlier posting
must have given me some good karma, I passed!


Overall: 351/400

General Considerations (maximum = 100): 97
Documentation (maximum = 70): 69
O-O Design (maximum = 30): 30
GUI (maximum = 40): 31
Locking (maximum = 80): 44
Data store (maximum = 40): 40
Network server (maximum = 40): 40

Thanks to everyone who helped
Its been 4 weeks since I sat for the 'follow-up' written exam and 5 weeks since I uploaded the assignment. I still have not received word from Sun regarding my score.

certmanager.net/sun_assignment - shows nothing regarding the developer exam.

certmanager.net/sun - the developer exam is listed as pending

register.prometric.com/CandidateHistory.asp - the developer exam is listed as 'Testing'

I saw reports of people hearing back in as little as 10 days. Should I contact Sun at this point?

Thanks,

Kevin
Hi Joel,

Just as an aside, I am using ojdbc14.jar on an Oracle 9.2.0.4 database and getObject() returns an oracle.sql.Timestamp object (I think) for me.

Kevin
So I would be safe then in a situation where a ref cursor is returned from a stored procedure and cast to a ResultSet with stmt.getObject()?

I've had problems with "too many open cursors" so I'm a little paranoid about it.

Thanks for your help,

Kevin
R.M,

I actually read the doc for that method and I was confused by it.

When it says, Retrieves the Statement object that produced this ResultSet object. If the result set was generated some other way, such as by a DatabaseMetaData method, this method returns null., does that mean that

ResultSet rs = (ResultSet) stmt.getObject(1) is NOT produced by the statement? I assume that ResultSet rs = stmt.getResultSet() is supported.

Kevin
Hi John,

Could you link to the post regarding stored procedures? I'm interested to see what it has to say.

To my knowledge, for any large scale application, complete database independence is hard. For this reason, I like stored procedures. Making modifications only involves the stored procedures themselves leaving the Java code virtually untouched. However, if you do end up using database specific code in Java, remember one thing: program to interfaces!

You can also take a look at a framework like Hibernate

Kevin
R.M,

Thanks for getting back to me.

Sorry about the confusion. I meant to say is there any difference between:

rs.getStatement().close()

and

stmt.close();

Basically, I'm trying to save a few lines of code for every single database call. I'd like to have a utility method that closes the ResultSet, its parent Statement, and optionally, the Connection.

In my first post, stmt and rs.getStatement() appear to be different objects. Is that the case? If I close one, will the other remain open?

Thanks,

Kevin
This question is directed to R.M. Menon:

I'm curious about the difference between closing a Statement explicitly on the Statement object used to execute the stored procedure or closing the Statement that is obtained from a ResultSet.

If I call a stored procedure that returns a cursor to me like so:


In the above code, is there a practical difference between:



and



Looking at each object in the debugger suggests that they are different objects, but I'm not quite sure.

Thanks!

Kevin
I was hoping to for something less invasive that does not require the modifications of stored procedures.

Also, if I need to know the total number of rows available, is SELECT COUNT(ID) FROM DATA the best way to handle this?

Thanks
Hi Stu,

Thanks for getting back to me.

How do you handle large result sets with oracle? I was hoping to be able to index or page into the result set to retrieve the items I wanted. I definitely do not want to read every row sequentially to get to where I want.

Thanks,

Kevin
Hi,

I am using stored procedures with an Oracle database to return cursors. However, the cursors that it returns are always TYPE_FORWARD_ONLY. I am trying to set the type to be TYPE_SCROLL_INSENSTIVE, but it does not seem to be working.

Here is the sample code I am using



In the above example, rs is always TYPE_FORWARD_ONLY. Anyone know how to fix this?

Thanks,

Kevin
[ March 13, 2006: Message edited by: Kevin Conaway ]
Tim,

I think you should make every effort to protect the client (when I say 'client', I meant a client of the database) from themselves. So, if a client requests a modification (update/delete), you should check to make sure they have the lock for that record before making the modification.

Kevin