Win a copy of Rust Web Development this week in the Other Languages forum!

Tom Bigbee

Greenhorn
+ Follow
since Sep 16, 2002
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 Tom Bigbee

All,

I have this "thing" happening on my system, and it started happening recently, I am unable to run in debug mode


I can run (the server) in "regular mode" all day long, however when starting the server in "debug" everything is just fine until I get

"Workspace configuration consistency check is false." then the Server terminates in the Debug Window (but is still running as a Process in the Task List)

Then I get

"Server server1 open for e-business"


(note in regular mode - workspace consistancy check is still false)

I can run the app, however, it never goes into debug, so I can't step thru the code


below is the pertinent section of the log, has anybody run across this before?


14 years ago
I'm with Rob on the Two or more Root Node thing

There is always one Root Node in a Tree, sometimes Users (abusers) try to make you implement a solution where one tree consists of many trees (for whatever reason), in that instance you can have a list of lists, where a list contains a list of One Root Node Trees. Anyway if you don't want to use Swing it easy enough to write your one Tree Solution, just remember you will have to write classes on top to implement you rules

14 years ago
Often times I come across code as such...

boolean isValid = someObject.isValid();
if (isValid) { // isValid only being used in one place
....
}

other than the fact that the variable is declared outside of the block in which it is being used, is there a performance hit (no matter how small) to doing this or does the compiler figure it out and optimize the call

This question does not apply to those cases where readability is to be take into account such as...

double commissionAmount = someObject.someReallyScrewyMethodName();
if(commissionAmount > 15.43) { // used once - var for readability only
...
}

Thanks, in advance
14 years ago
Often times I come across code as such...

boolean isValid = someObject.isValid();
if (isValid) { // isValid only being used in one place
....
}

other than the fact that the variable is declared outside of the block in which it is being used, is there a performance hit (no matter how small) to doing this or does the compiler figure it out and optimize the call

This question does not apply to those cases where readability is to be take into account such as...

double commissionAmount = someObject.someReallyScrewyMethodName();
if(commissionAmount > 15.43) { // used once - var for readability only
...
}

Thanks, in advance
14 years ago
Greetings all, I have decided that SCMAD will be my next cert. I'm trying to get my IDE set up (Eclipse Europa)for J2ME however the Eclipse ME Plugin installation instruction are (seemingly) out of date. I'm not too big into NetBeans (too much clutter in my opinion), I'm interested in hearing how working developers are using J2ME in the workplace.

Thanks, for any feedback in advance.
Eclipse 3.3, Tomcat 5.5, Spring 2.0

I'm trying to learn spring mvc and have a tutorial that has a library (jar) that makes a connection to the internet, when It makes the call, I get a connection refused exception. I know that in order to recieve downloads (updates) I had to configure a manual proxy in the Preferences> general> network connections form. When running in localhost is there a way to specify (other than in code) (thru config?) that the app should download info from a link

Thanks, Tom
Jim

Thanks, very much for your comments, they were very imformative

Thomas
14 years ago
Yes, I did show them the Book, version 5 does take care of the issue with the Static Import, however we are still on jdk1.4 and j2ee 1.4, so you're both right, thanks
14 years ago
Greetings, in my workplace I've noticed quite a few interfaces containing only constants (dozens of them), having read (many times): Effective Java: Programming Language Guide, by Joshua Bloch, (rule 17 states: Use interfaces only to define types) I sent out a note stating that we should stay away from this practice, I received a reply back that there were good reasons for using interfaces containing only constants (see below), however, I can think of several ways around the stated reply (just takes a little work).

Question: am I wrong about this, or are there good reasons for taking the easy way out?


(Reply received back)
I agree that we should not abuse the usage of the constants interface - especially creating a giant interface to capture all the constants is not a good practice (breaks the encapsulation). But there is merit using constant interface rather than a constant class or enum.

In my opinion, there are a few examples of using constants interface.
- The name of the attributes/parameters in HttpServletRequest/HttpServletSession so that multiple Actions, Servlets and JSPs are to use the same value (avoid typo).
- The ActionForward names used to match the struts-config.xml
- DAO DB column constants

By defining them as constants, you can take advantage of multiple inheritance of interfaces to access constants defined in multiple base interfaces. Although the constants are not type safe, they do limit the values used in different classes.
14 years ago
Could you tell me how this book differs from others on the same subject? I have "Head First Servlets and JSP", "SCWCD 2nd Edition" and "Pro JSP 2". I�m a big fan having bought the Java 2 Exam Prep; please expound on the reasons why I would be advised to buy this one.
Supposedly you are supposed to be able to limit the number of outer joins performed on a joined inheritance strategy. I'm trying to make a pattern where I can have an unlimited number of subtype tables

Pages 209-210 of the Book: Java Persistence with Hibernate, specifies that some RDBMs limit the number of tables in the outer joins, it goes on to show you how to do this with an xml mapping file using the <subclass> <join> and <join table> tags

the book then goes on to specify that Java Persistence also supports this mixed inheritance mapping strategy with annotations.

I'm using annotations, and can't seem to limit the outer joins

I've tried @Inheritance(strategy = InheritanceType. ( SINGLE_TABLE and JOINED ) on the SuperClass

I've tried specifying the @Column(table = (on the columns)

I've also tried @Table and SecondaryTable on the SubClasses




In both cases the Left out joins are are performed...



My question is - How do I limit the outer joins using annotations?

Thanks, in advance for your assistance
[ January 30, 2007: Message edited by: Tom Bigbee ]
Thanks, however, that still does not answer my question

The book - Java Persistence with Hibernate lists four types of inheritance Paradigms

#4 Table per subclass�Represent is a (inheritance) relationships as has a (foreign key) relationships.

Some database systems (Oracle, for example) limit the number of
tables in an outer join operation. For a wide hierarchy, you may want to switch to a different fetching strategy that executes an immediate second select instead of an outer join:


I'm wondering if anybody has an example of this with annotations
I have four classes that map to four tables

ClassType, MainClass, SubClassOne, SubClassTwo

ClassType maps to the table "Class_Type" and consists of two attributes
1) Class_Type_Cd C(4) Not Null PK
2) Class_Type_Desc VC(40) Not Null

MainClass maps to the table "Main_Class" and consists of three attributes
1) Main_Class_ID Integer Not Null Auto_Generated PK
2) Class_Type_Cd (FK from Class_Type)
3) Main_Class_Name VC(40) Not Null

SubClassOne maps into the table "Sub_Class_One" and consists of two attributes
1) Sub_Class_One_ID Integer PK (Dependent upon Main_Class_ID)
1) Int_Value Integer Not Null

SubClassTwo is the same as SubClassOne, with a String_Value (as opposed to an Int_Value)


I would like to join the MainClass with either SubClassOne or SubClassTwo, based upon the value of the ClassTypeCd (fk into the MainClass)

I am using annotations, and cannot for the life of me figure out how to use the key value as opposed to a set string value, I would like to be able to set the below...

@DiscriminatorColumn(name="???", discriminatorType=DiscriminatorType.STRING)

where "??? is the value of this.getClassType().getClassTypeCd()

that way I can use the ClassType Description to get at the subclass from the MainClass

Does anyone have an example of how to do this?

Thanks, in advance, Thomas

PS - this is not a homework question, I'm trying to come up with a template to effectively add subtype tables to a schema without going into my main (superclass/supertype) constructs
I had the same problem, changed email address, took a year off, ect..., however, I replied to SunCert@thomson.com not prometric, it took some time though
You can change it as long as you don't modify the method signatures, I changed the comments and header information during the javadoc phase of the assignment and I did not get pinged, I think you are supposed to, since you are required to document all source files