Claude Moore

+ Follow
since Jun 24, 2005
Claude likes ...
IBM DB2 Java Netbeans IDE Spring
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 Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Claude Moore

First, welcome to the ranch ! To debug remote java code, all you need is to start the JVM with a debug port and in debug mode - please google to more details - and you need to have your source code perfectly aligned with the code version you used to build your application.
Then, you have to attach your Ide to the remote java JVM.
This said, there's no reason you cannot debug your application on machine A or B; if A is meant to be the production server, generally it's better to avoid to debug code on a production system. This could be why the articles you read suggested to debug on a separate machine.
1 day ago
I'm also interested in taking the Certification exam, but for a long list of reasons i'm unable to attend the online web courses.
Can anyone suggest me a good book to prepare the exam ?
1 day ago

Tim Holloway wrote:I think that Serializable predates the current definition of JavaBean.

I just verified and you are right.A Javabean isn't any more required to be declared as Serializable.
I think I need to update my knowledge of the Java language specification
1 week ago

Tim Holloway wrote:

Claude Moore wrote:
Moreover, in Java  you got serialization for (near) free, so that many times declaring an Object as Serializable is more an habit that a real need.

Serializable isn't a characteristic that adds functionality to a bean's definition. It's a promise that all of the "important" (non-transient) properties of that bean can be converted to a 1-dimensional (serial) notation and that the essential object can be re-constructed from that 1-dimensional form. It doesn't say anything about the encoding or organization of that form - and as Rob has noted, that has lead to awful consequences in the past. Indeed, an object marked Serializable should be capable of not only being converted to the JVM's internal binary serial format (which is neither documented, nor version-independent), but likewise to XML, YAML, JSON, Greek hexametric poetry, cuneiform or any other mechanism that is amenable to strict conversion in and out of that linear form. OK, maybe Greek and Assyrian translations aren't guaranteed unambiguous, but you get the idea, I hope.

That's absolutely right, but  a Java Bean is by definition a class which implements Serializable interface (according to Oracle definition of a JavaBean).
Maybe the class author wanted to respect JavaBean specification literally, who knows ?
I don't think and I don't mean to say that standard Java serialization is flawless - as Rob noted, Oracle itself is trying to drop it replacing with something more secure and portable, and personally I hope that one day we'll be able to serialize and deserialize any complex object directly in JSON, with JVM
built-in support. But I think that depsite all java serialization could be useful if used well - for example, to exchange data between two Java peers.
1 week ago
Technically you're right, you can serialize in Json a non-java-serializable class, for example with Gson or Jackson library.
My two cents (just guessing): maybe the code author thought to store those POJOs in an HttpSession - and this require objects to be serializable.
Another guess is that many times POJOs are treated as Java Beans, so that they must be Serializable.
Moreover, in Java  you got serialization for (near) free, so that many times declaring an Object as Serializable is more an habit that a real need.
1 week ago

wayne brandon wrote:
1) Do you think html,css,javascript is the way to go? I was reading that this is older technologies that are being replaced by things like frameworks, opensource tools etc...though i find this hard to believe

HTML + css + javascript aren't going anywhere. Indeed, all web frameworks are, in a way or in another, built upon HTML+css+javascript and aim to make developer's life easier and more productive.
They are not meant to replace javascript / css / html. And at the moment that would not be possible - javascript is THE language a browser understands.

wayne brandon wrote:
2) Does anubody know of a good tutorial on how this all links together? from what i know html and css create the content and style it. Javascript will handle your functionality to the backend. Java will handle the backend and querries to the database using spring? but to get this all working seems like something way beyond me now.

Personally, no. Anyway IMHO you could keep backend and frontend site separated without loosing generality in your learning path. Just think about how a modern web application is build: you have a web GUI which talks via API to the backend side.
And, how course,  you can always mock the remote server to emulate server responses.

wayne brandon wrote:
3) Is a project like this best done on my own server (which i have). Or should I be using web hosting server space (which i also have)

It's pretty  the same. If I were you, I'd start with a local server on your pc. Playing with your pc is IMHO the best way to learn what happens under the hood.

Good luck for your work, man !

What happens if you fix your code?
1 month ago

Manuel Dias wrote:


Thank you.

I'm using threads because this is a proof of concept to a program that i want develop that needs to request 22995 times one page with different parameters (like date etc..)
The application works in single thread but tooks a lot of time to retrieve the whole information, this is the reason because i need to use multithreads.



That's ok, but your actual code doesn't change any  request parameter, so I'd expect you'll get the very same dataset at each invocation - hence,  the problem with unique IDs.
1 month ago
IMHO one of the major problem with GraalVM is that at the moment there's no official porting for Windows.
This may reduce potential audience of users.
1 month ago
GraalVM looks really interesting, I hope it will get some momentum someday.
1 month ago
First of all , an heartly welcome to the Ranch !  
I see a couple of problem with your code:
a) why are you using threads ? The URL allows you  to get the very same dataset, and you are not paginating over it.
b) if you read more than once the json you provided, you will end having more entities with the same ID, thus having trouble with unique constraint.
1 month ago
Run it with javaw instead of java. That way, there's no console where the user could click and freeze you app.
1 month ago
Generally speaking, having multiple choice isn't a bad thing. The real problem is that every time a famework gains a bit of momentum, it's very often depicted as the promised land for the Web Developer.
It may be, or it may not, so if you have to choose which framework to use, you may get into trouble if you listen only to the hype of the moment.
I think that no one nowadays could question about Angular success, but when Angular was released, it was as a bet as other frameworks, like Meteor, for example, a really promising framework I don't hear talking about anymore.
Another problem is that getting acquainted with a frameworks requires time , practice and experience, and in a world were evolution of technology runs really really fast it's not so easy.
Luckily, most of the frameworks do have a lot common factors, and I think a good developer should focus to learn these common factors, and to learn them well. This way, shifting from framework 'A' to framework 'B' should not be an hell.

Sorry Mike, but with "Graal" do you  mean a new JScript interpreter embedded in latest java runtimes or do you refer to Graal VM?
1 month ago
Could you post a piece of your code, just to figure out how you solved it ?
1 month ago