Hal Taylor

Greenhorn
+ Follow
since May 01, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Hal Taylor

I have a question about how to solve a design problem. My application has a Java Class which is mapped twice in the XML Hibernate mapping, as a component of two distinct "parent" Classes (not "parent" in the sense of inheritance, but "parent" in the sense of that which a dependent component is dependent upon). In each case, there is a one-to-one relationship between parent Class and component, so the component Class gets mapped twice, once into the table of each respective parents -- this works fine.

To this component, I now wish to add a one-to-many mapping of a third Class. This third Class is the same in the case of both components (remember that these components actually represent the same Java Class, anyway). Naturally, this new third Class (the "many" side of the one-to-many") must now be mapped into a new table. The problem is that objects of this one Java Class could now have a "parent" in either of the two originally-mentioned parent tables. This is, however, not so simple to define.

One possibility I've considered is to make the new third Class an interface in the Java world, and have it implemented by two seperate Classes, each mapped to a seperate table. Should this work in Hibernate? Is there a better solution to this problem?

Please let me know if I have not explained this clearly (I know it's a little confusing) and thanks in advance for any advice,

Hal
Hi Merrill,

Thanks for the feedback. I understand how to use reset() to set checkbox values to false unless checked on the form. However, the situation gets tricky if the checkbox should *default* to try (pre-checked on page load).

The only solution I found was:

- Use the reset() method to set the checkbox to "true".
- In the jsp, include a hidden field with the same name as the checkbox property, and the value "false".

In this case, the checkbox will load as checked. The server will read the *first* value it finds for the property, and ignore subsequent values with t he same property name. So, if the checbox is still checked on submit, the "true" value will be read, and the following "false" from the hidden field will be ignored. If the checkbox is unchecked on submit, the hidden field with value "false" will be used to set the property.

This works in my environment. However, I'm not sure what specs say about behavior in the case of multiple values submitted for the same field, and this *may* vary by environment/container. So I'm not thrilled with this solution, either, but I can't find anything else that works better...
19 years ago
One question then remains however:

After successfully setting the checkbox to true by default, how do you handle the case of the checkbox being deselected when the user submits the form? Since HTML forms submit *no value* for an unselected checkbox, there is no "false" submitted to update the form; and the corresponding checkbox attribute remains true, even if the checkbox was deselected and *should* now be set to false.

Am I missing something here? Is there some workaround for this? I am aware of the "reset" method, but does setting the value to "false" there help in this case?
19 years ago
I'm struggling a bit to fully understand the implementation of thread pools. I grasp the meta-level concepts behind the thread pool (thread creation is expensive, so create a batch of them in advance and have them pick up tasks out of an incoming queue). I get a little lost in the implementation details, however. I reviewed a code example which had a "Done" object, and I don't quite get it.

Could somebody walk me through the flow of a thread pool and explain the necessary parts to implement?

Thanks in advance.
Thanks Stan, Joyce and Ilja for the pointers. Seems like this should get me started, so I'll get to work on it.

I appreciate your help.

- Hal Taylor
I'm taking a course which is introducing me to GoF patterns (via the GoF Design Patterns book). I'm finding that (a) the fact that everything is explained in C++ adds a little cognitive overhead in trying to grasp the (already abstract) patterns, and (b) the examples in the book are a little limited.

Does anyone know of a *good* resource (book, ideally, but web resource would be ok too) that can provide me an opportunity to work through some Java-based GoF pattern examples? It would be nice if it used standard UML, as well, but I don't want to be *too* picky...

Originally posted by Paul Sturrock:
I have deployed one .NET app into production. I haven't really delved too deeply into its capabilities (and I doubt you'll get many J2EE developers who have, since .NET is certainly comparable with J2EE in terms of scale). What I can say is the CLR was pretty good - we could develop WebControls in a bunch of different langauges (in fact we did this, but more to see if we could than for any decent development reason). Its support for web services and SOAP seems much more mature than J2EE. And the development environment was leagues ahead of anything avaliable in the Java world.
<snip>



Aha - this is sort of what I was getting at. Thanks!



Still, a word of warning: this sort of discussion tends to generate a huge amount of FUD, since very few developers out there have actually used both J2EE and .NET to any great degreee in production systems.
<snip>



Yep - I was a little concerned about this, too. Fortunately, so far, people seem to have refrained from that and have made an effort to stay objective. But this is why I had hoped to find someone who gotten his hands dirty a bit in .NET.

Thanks again for your perspective.
Thanks for all the feedback. The links posted were interesting, but were mostly old, published before ASP.NET was in use, and didn't really address fine details of capabilities from a hands-on developer's perspective. A large point is made about portability and ability to integrate with legacy systems, but less really about functionality. My understanding is that M$ intends to move away from ASP.NET with Longhorn, so that may be a potential trap, but I'm still interested in what strong advantages the current .NET platform might offer (I want to know what everyone is raving about, in terms of capabilities of the environment). Has anyone out there spent time in .NET and developed opinions on how it stacks up to J2EE, from a hands-on point of view?

Thanks again.
This is sort of a general question, but I've been looking for opinions for awhile. While I realize there may be a bias here, can anyone *with ASP and/or .NET experience* give me a comparison of what sorts of things might be possible in M$'s environment that might not be possible (or might be significantly more difficult) in a J2EE environment? I keep hearing about what a capable environment ASP (especially ASP.NET) is, but I don't have any experience with that platform and can't assess relative merits of that versus J2EE.

So: opinions? (I'm not looking for general M$-bashing, but rather a balanced and informed analysis of relative strengths and weakness of the two platforms).

Thanks in advance.
I realize that the subject of Eclipse version upgrades has been touched upon in other posts, but I couldn't find a clear answer to this:

I want to upgrade from my current Eclipse 2.1.3 to Eclipse 3.0. Eclipse's Update Manager will *not* handle this for me, apparently. Is there an easy way to identify what plugins I've added and transfer them to a fresh 3.0 install?
S - did you ever get this resolved? I have the same problem: no hypersonic listed on my jmx-console page.
20 years ago
Benjamin - I'm having the same issue, and haven't yet found the solution. Perhaps it *is* an issue with the differing versions.
Brian - I've been able to load the jmx-console (and it sounds like Benjamin has, too, if I understand him correctly) but the page simply does not list hypersonic....
20 years ago