Kevin Smither

Ranch Hand
+ Follow
since Oct 22, 2007
Merit badge: grant badges
For More
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 Kevin Smither

When the code is executing in the superclass constructor then the add method translates as this.add(1) since it is based on the current instance, and in the above case "this" is of type Exception and not Base.
The Credential class itself cannot be Singelton since what it represents is the user's credentials which varies on a per-user basis. The Authenticator class which authenticates credentials can be Singleton, perhaps it can accept a username and password and return a Credential class instance when it passes authentication.
The question "can class be synchronized" does not make sense. A block of code can synchronize on the class.. for example: synchronize(MyClass.class) so that the code associated with all instances of that class cannot be re-entrant in that block. You can also synchronize on a single instance such as synchronize(this) or synchronize(xyz) where xyz is an instance. Make sense?
There is Value List Handler, check that out.

Another approach is to handle pagination at the database level by designing a paginated query.
first off, the class definition for P2 is wrong..where is the declaration for the method containing the call afancymethod? it's missing. P2 will not even compile because it's not Java syntax ;-)

second, the answer is not too clear, the reason it will not compile is because afancymethod is package private and hence not visible from P2 since P2 is in a different package.

Also, the compile directory has to be "MyPackage", if not you'll get errors.

Also, the classpath to the compiler has to be specified as one level below "MyPackage" otherwise you'll get more errors.

Another thing...the import statement is missing for P2
[ June 27, 2008: Message edited by: Kevin Smither ]
you are not implementing're using it.
There can be many reasons for switching jobs, what happens to those who are laid off? And also contractors who work for fixed length contracts, say 1 yr? Surely you're not including these cases?
16 years ago
first off the exception you listed is runtime and not reported by the compiler as you state. second, I have not heard about any limit.
did you check the JDBC API? It is on the connection object...

where is the jar within the EAR, is it in APP-INF/lib? Have you tried setting the WL server classpath to point to the jar?
16 years ago
you want to write the query in Java? What do you mean by that? I am assuming this is a database query?
just write the query appropriately depending on your database design, although why you would want to do this is beyond's better to use exact criteria rather than being arbitrary such as "last updated row"
[ March 26, 2008: Message edited by: Kevin Smither ]
looking up IP address? what does that mean??
I can't think of any scenario why I would want to change this.
16 years ago
Marcos is absolutely right. Put it int he /lib directory of the domain. The server classpath will be automatically adjusted to include these files!
16 years ago