James Gordon

Ranch Hand
+ Follow
since Aug 09, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by James Gordon

Hi,

It was well documented that the draw back for DefaultAuditStrategy is that the queries of audit information uses sub-queries,
which is slow. I'm not able to comprehend on the need of the sub-queries. Why do we need it at the first place?
For example, if we would want to find revision 10 through the statement below, isn't retrieving with REV = 10 already sufficient.

Why is there a need for the sub-query:

Please enlighten me on this.

Thanks.
Hi,

I've two Wildfly servers, one under Windows OS and another under Linux.
I'm curious as to why we have to bind the IP address during start up in Linux
environment, but it's not needed in Windows.

./standalone.sh -b=0.0.0.0

If the above is not done in Linux, the deployed application would not be accessible
by a remote browser.

Can anyone please shed some light on this.

Thanks.
5 years ago
The id is reflecting the class signatures.
Adding field, methods or changing types means by right it should be updated.

In my opinion, it's quite reasonable for anyone to miss it.

Or given another circumstances, if we're to take over the piece of source codes,
how can we be sure that the id were well maintained previously.

Anyhow, noted, no easy way to verify.
But the good news is most likely it won't affect much anyway ...

Thanks.
7 years ago
Hi,

Due to copy and pasting during development, some of the serialVersionUID might not be correct,
as the developer might forgot to re-generate them.

As such, is there any easy way to scan and verify through the correctness of a bunch
of java class files?


Thanks.

Regards.
7 years ago
Hi,

I'm just wondering, if a socket server is writing a mixture of int, short, text, etc
(DataOutputStream: writeInt, writeShort, writeBytes)
to a client, is there anyway for the client to determine the data type
so that the message can be constructed back properly.

Sample code:


ie: From the client perspective, are we able to determine that
the 1st piece of data is short, 2nd a string and 3rd is an integer?

Of course, an alternative is to have a fixed format.


Thanks.
11 years ago
Dear Paul,

The target email address is definitely valid and I've been using it for the past 10 years.
As mentioned, Outlook Express managed to send it out.
11 years ago
Hi,

My java mail code doesn't seem to be able to send out to external email addresses.
It only work for internal email addresses.
I'd set the authentication though.

To verify that it's code issue, I tried with Outlook Express instead.
I provide the same exact account information and authentication for outgoing mail.
It works with the mail client.

I'd reviewed my code few times but didn't see anything wrong.
Could someone please point out if there's any issues with my code.


Thanks in advance.






DEBUG: setDebug: JavaMail version 1.3.1
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "192.1.1.31", port 25

220 RALD.xxx.com Microsoft ESMTP MAIL Service ready at Tue, 11 Sep 2012 15:16:38 +0800
DEBUG SMTP: connected to host "192.1.1.31", port: 25

EHLO ROY
250-RALD.xxx.com Hello [192.1.1.20]
250-SIZE
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-X-ANONYMOUSTLS
250-AUTH NTLM
250-X-EXPS GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-XEXCH50
250-XRDST
250 XSHADOW
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "X-ANONYMOUSTLS", arg ""
DEBUG SMTP: Found extension "AUTH", arg "NTLM"
DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "XEXCH50", arg ""
DEBUG SMTP: Found extension "XRDST", arg ""
DEBUG SMTP: Found extension "XSHADOW", arg ""
DEBUG SMTP: Attempt to authenticate
DEBUG SMTP: use8bit false
MAIL FROM:<admin@xxx.com>
250 2.1.0 Sender OK
RCPT TO:<recipient@yyy.com>
550 5.7.1 Unable to relay
DEBUG SMTP: Invalid Addresses
DEBUG SMTP: sender@xxx.com
DEBUG SMTP: Sending failed because of invalid destination addresses
RSET
250 2.0.0 Resetting
QUIT

11 years ago
Dear Sunil,

The problem is fixed after I removed this element from the jnlp file:


The versioning approach you suggested is working as well.


Thanks for the advise.
12 years ago
Hi,

I'm trying out the Web Start auto loading new application feature.
After putting in a new jar file in my web server, it still load the old version unless
I remove off the application at the Java Cache Viewer. I'd even waited
for 30min incase it only load after certain interval.

I'm using this sample application.
http://download.oracle.com/javase/tutorial/deployment/webstart/examplesIndex.html#DynamicTreeDemo

I just change some labels to make it a new version.

Is this behaviour expected because from what i read, Web Start should be
able to detect and load new version. Or is there any configurations that I need to do?



Please advise.


Thanks in advance.
12 years ago
Hi,

Old codes always run on newer JEE server.
That's good but I'm just wondering whether there's any impact
in terms of efficiency, performance, etc.

I thought of few scenarios:

1) old codes (v1.3), old compiler/binaries (v1.3)
2) old codes (v1.3), new compiler/binaries (v1.5)
3) new codes (v1.5), new compiler/binaries (v1.5)

* old codes meaning codes written with old syntax
* old compiler/binaries meaning classes generated with old jdk
* version number provided is just example


Any comments?


Thanks.
12 years ago
Thanks Maneesh. That solved my problem.
14 years ago
Hi Darryl,

By removing the JLabel, I'll end up with blank lines.
Consequently, I would still have to refresh the JDialog right?

item 1
<blank line>
item 3

That's what I'm trying to figure out - how to refresh the screen.


Thanks.
14 years ago
Hi Pete,

Using JList and JTable is a good way around but then the effect
of the display is going to be different.

What's in my mind is to have the whole panel scrollable instead
of scrolling within the JList/JTable.


Thanks.
14 years ago
Hi Rob,

I used snippets intentionally as I felt this is more of a concept issue.
SSCCE might be too much to be swallowed

Anyway, below is the SSCCE.
My objective is to get the JDialog to refresh to reflect the
deleted PO item after the delete button is clicked.

I managed to achieve it by disposing and re-creating the JDialog
but there might be better ways.


14 years ago
Hi,

I've a JPanel added to a JScrollPane.
In the JPanel, I added a lot of JLabel/JTextField
on purpose to make sure that scrollbars appear.

The scrollbars came out but I ended up with
cramped JLabel/JTextField instead.

This is a link to how it looks like:
http://www.imagebam.com/image/b69f6375343718


Below is my code:



Could anyone please advise what's wrong with my code.

Thanks.
14 years ago