Thomas Fly

Ranch Hand
+ Follow
since Sep 09, 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 Thomas Fly

Implement a "Document-Driven Programming" design; i.e., "hard code" as little as possible (preferably nothing). And since you can use j2sdk1.4.1, a key element of your DDP design should be an XML configuration file.
See http://thomasfly.com/SCJD.
I think you're infected by the deadly OO blather virus.
The best, and currently most often overlooked, principle of software engineering is KISS (not to be confused with KISS).
Classes should be well focused, but don't throw out the baby with the bath water. All your GUI component action listeners should be in your GUI class, though they may in fact just be skeletons that call a method in some other class to do the real work.
The OO "Model" in the case of FBN is that class/classes that deals with the Oracle/relational-database like "data model," the "View" of which will be created by your GUI. The Model shouldn't be concerned with- or particularly even aware of- the View, and vice-versa.
To realize this isolation, you of course need some "Controller" glue in-between, which is where the real work is done on behalf of your GUI(when you click on your Search button, for example).
In your Model, you'll do database-oriented "business logic" stuff like checking to see if there are enough seats available for fulfill the client's request. If not, you throw an OhHellException, which will be caught, and dealt with appropriately, by your Controller.
Why not use your own PC, as localhost?
You can use the J2EE Reference Implementation, or if you can do without EJBs for now, you can use Jakarta Tomcat, for servlets & JSPs (J2EE RI uses Tomcat for the latter, anyhow).
Is there some UML certification I haven't heard about? Or did you mean the IBM XML certification?
I'm inclined to think that either is too narrow a subject to have its own certification.
I expect to finish my SCJD project this weekend, and am wondering if anybody can give me some idea of how the effort that goes into SCWCD compares with SCJD- which I've put around 300 hours into (I did a lot of unrequired stuff, like using XML for application configuration).
I've written some servlet code, and also a little JSP (plenty of HTML), but it's unlikely that I could score even 50% with my present knowledge.
I also want to do SCEA. Some people do that without even doing SCJP; on the other hand, I wonder how valuable SCEA really is without SCWCD (not to mention SCJP & SCJD).
On the other hand, if it's going to take me 300 hours of study to do reasonably well on SCWCD, I might want to move on to SCEA for now.

Exception in thread "main" java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)


That means you installed an RMI security manager, but since it didn't find your policy file, you didn't have permission to do anything!
You only need a security manager & policy file if you intend to implement downloadable stubs, in which case you also need to specify the codebase when starting your server.
You can't meet the requirement without using a ClientID (a well-behaved client shouldn't even try to unlock a lock it doesn't own, needless to say).
A more important reason for using a ClientID is so that, if a client dies while holding a lock, the server can free the lock.
Just use the CODE button:
What made sense to me was to make my "server" just a kind of "administrator version" of my "normal client." The server opens the database "locally," and then makes it available to normal clients via RMI.
I have only a single application that has a "server" and a "client" mode, in other words. I can search for & book flights from the server just like any other client, and RMI makes it essentially transparent as to whether I'm in "server" or "client" mode.
Clients make their calls through stubs, whereas the server calls the stub's "parent" directly. The server competes for locks just as any client would.
And that is essentially the whole point of RMI: to make your code "not care" whether it's executing locally or remotely.
[ November 10, 2002: Message edited by: Thomas Fly ]

Originally posted by Peter den Haan:
Re: tables -- anything you put between [ CODE ] tags will be displayed using a fixed-with font. So you can use good oldfashioned ASCII art.
- Peter



The usual approach to locking is to attach a ClientID to a record, using HashMap. Instead, I use a class that contains the ClientID along with a timestamp & progress counter, which can be checked by the server to decide whether or not to revoke the lock held by a given client.
It's hard to say how big a problem a "stalled" (as opposed to "dead") client would really be in a production environment, however.
There's really not even much of a good reason to attach a ClientID to the locks, except to handle the infrequent occurence of a client dying just after acquiring a lock- but if you're writing an online banking application...
Pete is absolutely correct: use of net.jini.core.lease.*, com.borland.jbcl.layout.*, and the like, falls under this stern caveat:

Target Platform
Throughout this exercise, you must use exclusively the Java 2 platform. You are not required to develop your code using any particular implementation of the Java 2 platform, but the submission that you return must have been tested and shown to work under a production (not development) version of the Sun Microsystems' Java 2 platform.
Failure to adhere to these directions will result in automatic failure


On the other hand, I did choose to implement a 60 second lock-lease (configurable in my config.xml file ), mostly to take a small step in the direction of database transaction-rollback functionality, and to demonstrate the "gracefulness" of my server shutdown.
Every "spiffy" feature you add must be adequately commented, however, or you'll end up with a score of 154, like Michael Morris :roll:
My congratulations!.. but as I said in the results section, you need to give us the particulars!
Jim Bedenbaugh did SCWCD after SCJD. I'm thinking that might be a good thing to do before SCEA (which of course has no prerequisite!).
C'mon now Kirk, give us the particulars so we can do our Monday morning quarterbacking!
16 years ago