tom smith

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

Recent posts by tom smith

the code for andrews book is available. also the requirements for URLyBird state that the user should not use the rmiregistry directly. so many here use a starter class (adapter pattern) as defined in your manifest.mf file.

also the trottier book does the same thing but in a different manner / different design.

i am reworking my newly designed adpater class to use the 'observer / observable pattern'. i was doing too much in the starter class that needs to be divided between server and alone mode. too much code redundancy.

but since i had no idea what any of the aforementioned were 72 hours ago, i am pleased with my new java / design knowledge, which in the end is the real objective.

pretty damn exciting!
[ March 25, 2006: Message edited by: tom smith ]
andrew:

if we use an adapter class (with main()) can we just do like:

psuedocode:



Someone else had suggested this and I think it works. But I threw in some "shout outs" (I need to start Logging) from the RemoteDatabase code and there was no reply.

I am confused because given my current code, my Client in the 'else' above can only connect via rmi://localhost:1099/DataServer.

Just wondering where / why there was no 'reply' from the RMIDatabase? This leads me to believe the Client is NOT connected to the remote Database.

[ March 25, 2006: Message edited by: tom smith ]

[Andrew: Put psuedo-code between [code] and [/code] UBB tags.]
[ March 25, 2006: Message edited by: Andrew Monkhouse ]
jason,

is the business layer between the gui and the data class?

if so, i should send my searchEvent code to this layer who will filter the results returned by the data layer before sending my gui the long[] of acceptable records?

- the uber newbie

i am getting pretty close to finishing.

but i want to tweak the design.

then download and learn 'junit' for final stress testing.
[ March 25, 2006: Message edited by: tom smith ]
The static lockedRecords Map jumped out at me! I also have a deletedRecords Map.

Thx!

18 years ago
I just added (and learned about!) an Adapter or Facade class.

Simplified things greatly.

Just a simple starter class / GUI that gets the port / dbname from the user and writes them to the suncertify.properties file.

the text fields are loaded with the existing values. so the user has the option to use the default settings (most likely) or to enter in new values.
my data file only shows old dates.

so all the rooms are well past 48 hours.

is this normal?

--

also, I a put a 'delete record' button on the GUI to test out the deleteRecord implementation.
As a non-programmer newbie, the biggest advice is to do ALL your design before you write a line of code.

All the CS/MIS I have taken courses I have taken over the past few years preach this, but it's hard to resist diving right in and writing code.

I think coding and the language are more fun. But the design work is crucial.

I have had to make some modifications after the fact that have been additional work. Of course, with no previous development experience, I was pretty much going in blind.
[ March 22, 2006: Message edited by: tom smith ]
jonathon,

thx for your comments.

i have made changes that are more in keeping with the Requirements Document.
Kristof - thx.



I am a finance guy trying to learn java. A whole new world.

I need to study design patterns and such. Just purchased the Head First Design Patterns.
[ March 21, 2006: Message edited by: tom smith ]
eiji - true.

and logical, in it's own way!
Andrew, thx for your previous reply. This is the question I have had:



if the parameter "server", then how do we launch the client app once we load the server code as we do above where "server".equals(args[0]).

--

Reading the later posts:

So, if the user wants to work in network mode he will need to open the client via a separate command line?

That appears to be. I was thinking there was a way for the RMIServer main() to call the client main() somehow.
[ March 21, 2006: Message edited by: tom smith ]
.... by 'execute different code' i am assuming you mean from main().

Say my manifest Main-Class: in runme.jar points to URLyBirdClient main(), how can I open RMIServer, which requires its own JVM, from my URLyBird main()?

I am seeing two separate command line for two separate JVM's. I did read about class loading. By the Requirements specifically say no class loading.

--

I think I wasted $250!

Can we just add Exceptions to the original DBAccess interface?

Specifically RemoteException.

Will this 'break' code already in place?
I still dont see how to get it to work in networked mode.

If the manifest has one Main-Class, then runme.jar will open up the Client in whichever mode, server or alone. The client has it's own main().

But my RMI server in a separate class with it's own main().

If runme.jar jar can only have one Main-Class as specified in the manifest, then I would have to name the .jar file with Main-Class: suncert.db.RMIServer something other than runme.jar.

I am just stumped.
[ March 21, 2006: Message edited by: tom smith ]
Yea....

bad idea.

I just spent an hour adding a new interface which extends the one supplied and the adjusting the code. Compiled and ran OK in both modes.

Thx.