This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

John Kimball

Ranch Hand
+ Follow
since Apr 13, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Kimball

We need a little more detail.

Some questions:
1. How big are the rows? Give us an idea of the table schema, or at least the subset of data you're pulling in.
2. Are you retrieving and storing all 84,000 rows at once? Or are you doing it a little bit at a time?
Based on your second post it sounds like you're trying to do it all at once, but let's be sure.
3. Give a rough sketch of what your processing is doing. Not interested in the business logic, of course, but let's be sure complexity isn't an issue.

12 years ago
The timezone of the server hosting the JDBC code is different from the Oracle server's.

They're all the same time, except some are converting to the local (Java server's) timezone.

The question now is, is that what you want?
Without handling the underlying problem...

In the SQL query, convert the timestamp value to a char/varchar.
And then get it as .getString.

Do you have a log of the exact query/parameter that runs, when you get an out of memory error?
And what happens if you run the same error-generating query directly, using a SQL querying tool?

Or maybe you have a memory leak somewhere else in the application.

Is this the ONLY place where you get an out of memory error?

Before going through a lot of trouble diagnosing, have you handled the common cases?

1. For one, are you sure you're not hitting some sort of connection limit?
a. What sort of connection are you getting? Are you creating a vanilla JDBC connection, or are you getting one via a connection pool?
b. How many connections is the pool allowed to grow to?
c. How many connections will the DB server actually allow?
d. Regarding JDBC connections, are you closing the connection each time you're done?

#a to #b should be easy to diagnose via the app server, if you're using one.

#c should be answerable by the DB admin (or trial & error if you don't mind an angry admin )

#d requires a bit of code look-through.

2. Perhaps not so likely, any chance you're running into some sort of networking issue or proxy/firewall issues? This has happened to me a few times, in a clustered scenrio when we create a new secondary box.
As far as I know, as long as you don't store the instance anywhere (e.g., session.putValue...) you're ok.

That is, there's no way to reference the instance outside of the method AND the object's lifecycle is only for the lifetime of the method call.

12 years ago
You should rename the subject to "Rhino SLEE Application Server", as you're confusing many people.

And as mentioned by Ulf, you're probably better off asking in the Open Cloud forums...

Most of us (self-included), assumed you meant the relatively popular Rhino scripting engine:

I was actually excited to see a post about the scripting engine, so imagine my disappointment...

12 years ago
You never close your connection.

In regards to the line:

1. How many open connections are you allowed to have?
2. Will .getConnection wait synchronously until it can get one, or will it eventually throw an error?
The standard text-book answer:
1. The only memory a thread definitely owns is its stack (not sure how much).
2. Threads share the same process space (heap), so as far as I know it's not really feasible to answer this question.

Could be wrong, though.

Edit: I mean, I understand what you're asking but effectively you'd have to trace through all of the references and somehow consider the fact that some objects are accessible to more than one thread.

What sort of objects are your threads referencing? Does it have some sort of collection?
Ooh. Thanks for that. Did a quick check and noticed it's newly available in my favorite DBMS (Sybase).

I really need to look up a checklist of features to see what's been added into Sybase 15

select * from BOOKS where to_upper(AUTHOR)=to_upper('DOYLE')

Revisiting this problem: Assuming there's an index on author, it probably won't be used would it...?
You're free to define more than one constructor in show.

Or define listShow as static and change how you call listShow.
12 years ago
1. That's basically the 168 bit version of the algorithm, but I dunno if the JCE has something which does it for you automatically.

2. If you don't need to reclaim the original password--that is, if it's ONLY for authentication by your system--then you can use a one-way hash function (e.g., SHA2). This avoids the need for storing the password somewhere in the network.

Just be warned that the bit-strength of a hash function is effectively HALF, because of the birthday attack. So a hash function that generates a 256 bit hash is effectively as strong 128 bits. That's a slight lie: In practice since most hash functions seem to have some exploitable weaknesses, so the bit strength would be somewhat less.

3. For password storage, it's not enough to just encrypt/decrypt. The problem is this: What happens if two users choose the same password? If they can access the password table they can now check and see who else has the same password!

The standard way around this is to alter the plaintext before encrypting/hashing: One easy way is to mix the password with the username.


If you're new to security, "Applied Cryptograhy" is a very nice read. The algorithms & cryptanalysis info are dated--don't assume otherwise!--but the ideas are still relevant and his writing style makes it fairly gentle.
12 years ago
That's probably why the original question didn't define members

12 years ago