Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

John Lindwall

Ranch Hand
+ Follow
since May 29, 2002
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 Lindwall

IDEA has been my IDE of choice for 5 years or so now. However I have no compunction against firing up Eclipse or NetBeans if the task at hand will be performed better using said tool.

Eclipse has an astonishing number of plug-ins and sometime such a plug-in will let me do the work I need easier then in NetBeans or IntelliJ. NetBeans has been making rapid strides so sometimes a new JEE feature is easy to experiment with using that IDE.

The right tool for the job.

But for heads-down coding and refactoring I can never seem to resist IDEA.
I've found IntellJ customer support to be top-notch. I've gotten fast response time and relevant assistance with my problems.

No complaints here!

How can I debug JSPs? When I try to create a breakpoint in a JSP In IntelliJ IDEA version 6 and 7 it displays a red dot with an X in it -- I think this signifies an invalid breakpoint. When I run the code it does not break.

Perhaps I am not connecting properly? I run my WebLogic 9.2 server with JVM debugging enabled on the java command-line. My IntelliJ Run Configuration is a "Remote" type and I connect using shared memory or a socket.

I've been a happy customer of IntelliJ since version 4! Keep up the good work!

Any ideas?

John Lindwall

That is inspired! I am certain that your idea will work.

To summarize:

The html contains a hidden field holding the timestamp that the data was loaded. At load time, that same timestamp is also placed in the session.

When the data is submitted for update we compare the timestamps in the hidden field and the session. If they match then the update is allowed to occur and (I suppose) we update the timestamp in the session to the current time.

If the timestamps do not match then that means the user already updated the data in another window and so the update should be rejected.

Does that sound right?

THANK YOU and everyone who replied!

17 years ago

Thanks! I think your approach would indeed solve this issue for us.

As you mention it will cost us an additional database field in each table that allows updates.

*** I still wonder though if anyone has any ideas that would solve my problem without requiring such changes? ***

My dream response would be "Oh just use the browserWindowUniqueId to distinguish the user's browser windows from each other" or somesuch.

I appreciate your help.
17 years ago
Thanks for the replies.

Hmm.. In our case I do not think that those are the same problem. Please enlighten me if I'm mistaken.

We use a coopoerative distributed locking mechanism. When a servlet is loading some data for update, it acquires a lock on that data (not a database lock mind you). If another user tries to access that data at the same time the system detects that the data is previously locked and denies access (actually it loads it in a read-only mode). When the user updates (or discards the changes) we release that lock.

The lock mechanism is based on the user's HTTP session, which is really the only thing we have to uniquely identify a user.

What makes my problem case different is that it is the SAME USER with the SAME SESSION ID accessing the data. The locking step has already been performed when the original browser window loaded the data. The "cloned" browser window is opened with a read/write view of that same data and I know of no way to distinguish that there are now two browser winbdows at the time the user updates the data.

I hope I'm being clear. Any thoughts?

17 years ago
We are seeing some issues in an web application caused by a single user opening mutiple browsers at one time to use the application.

If it matters we can specify the browser to be IE 5+.

Here's the scneario:

1. User accesses a page in our app which loads some data for editing.
2. User edits the data but does not submit the changes yet.
3. User presses Ctrl-N to open a new browser window (containing the same page and context as the original browser window, of course)
4. User edits the data in this new window and submits the changes

The data displayed in the original browser window is stale -- since the user made change stpo it in the new browser window.

is there any way to detect or prevent the users from doing this? I don't see any help in DOM -- there is a uniqueID property but the window object does not support it.

Thanks for any help!
17 years ago
Is it possible to have single sign on capability between a webapp and a java application? The java application communicates to the same app server as the webapp.

Use case:
1. User successfully logs into the web application, providing user name and password
2. User clicks a link in the web application that fires up a java application on their desktop (via Java Web Start)
3. The java application magically performs single sign on and is given access to the server resources. The java application is running as the same user that originally logged into the web application in step 1.

Basically we wish to avoid popping up a login dialog from the java application in which the user would be forced to re-enter the user name and password that they previously entered to login to the web app.

If it matters we're using WebLogic 6.1.

17 years ago
I've been evaluation various Java <-> XML solutions as a way to serialize existing java domain objects (containing data AND behavior) to/from XML.
I started with this doc as a starting point:
And narrowed the list down from 40+ candidates to 10 contenders:
1. Castor, looks great
2. JAXB, Strong candidate based on standardness
3. JaxMe, alternative JAXB implementation
4. Jbind, but note bad performance in XML in Java: Data binding, Part 2: Performance
5. JiBX, fairly simple, clean XML output, uses byte-code instrumentation
6. Xgen, built on Castor
7. Zeus
8. Betwixt
9. KBML (Koala Bean Markup Language), KOML (Koala Object Markup Language), marginal survivor � no schema support?
10. XMLBeans
The examples I've seen of JAXB center around using an XSD as a starting point. In addition the java objects created are simple javabean-like value objects, with no behavior.
I'm starting with java objects not an XSD. I'm happy to create an XSD if needed. My dream though is to take my existing graph of domain objects and "XML-enable" them using one of these technologies.
Can JAXB fill this need? Can my domain objects extend the JAXB-generated classes perhaps, thus allowing me to keep my coded behavior? Or is there some other way to XML-enable my classes?
Great article! Thanks! Very timely because I had been wondering if any free coverage tools existed.
I knew about clover (not free) but not the other alternatives. I briefly tried the jcoverage GPL version and groboutils.
JCoverage failed if I specified too many classes to be instrumented -- seemingly due to Windows command-line limits. That was a bummer. Another problem is that it complains about inner classes not being compiled w/debug though they are. Gave up and moved to groboutils.
Groboutils was harder to setup but not impossible. It generates a TON of data during capture and takes forever. I expect performance hits from any such tool for the data logging but I terminated a test after 6 minutes that takes 13 secs normally.
I'll take a closer look at such tools later when my need is more pressing. I wonder if the $$$ versions of jcoverage correct the issues I ran across?
18 years ago
Thanks for the reply. I felt this was relevant to Java Web Start in case there is some special JAWS API that I overlooked that might provide what I need.
The system props are not detailed enough for my needs. I'm starting to fear that I need to go the JNI route...
19 years ago
Is there any simple way to collect OS version information from a Java Web Start application? To help us troubleshoot end-user issues we'd like to log the user's OS version (for us, a flavor of windows) including service pack info, build #, etc. The more detail the better.
It would also be nice to get the processor type and speed, memory size, etc.
19 years ago
We recieved an unsolicited email from BEA support indicating that this is indeed a bug in WL 8.1 and it will be fixed in SP1 due in mid June 2003.
19 years ago
We've ameliorated the errors somewhat by implementing a retry loop of a failed RMI call. We retry the call 3 times if it fails with a RemoteException (and a couple of other exception types).
This seems to greatly lessen the failures.
19 years ago
Thanks for your reply. We did file a case w/BEA and the response did not help us (see below). We tried the suggestions at that Sun forum and the thin client is not what we want.
BEA Support said:
The problem you pointed out seems to be associated with implementation with Java Web Start and WebLogic Server. Java Web Start has the classloading problem. WebLogic Server has complex classloader hierarchy. Changing WebLogic Server code in order to work with Java Web Start is not a simple thing that can be done very soon.
I did some research. I found a post at which suggests to use Thread.currentThread().setContextClassLoader( someClass.class.getClassLoader() ) in application code. I know it's not pretty. Are you willing to try that?
There is another possibility is to try something other than Java Web Start. WebLogic 8.1 provides Thin Client functionality. You may find documentation at Does thin-client meets your requirement?
19 years ago