Hugh Johns

Ranch Hand
+ Follow
since Jul 28, 2003
Merit badge: grant badges
For More
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 Hugh Johns

Robert

End up doing mostly developmental testing in C/Perl/VBA and some Java
19 years ago
I completed the Developer exam a number of months back. I have not been getting alot of worthwhile Java experience in my current role, but any Java job adds (in Sydney at least) are for J2EE.

Problem is I need to leave current role to get worthwhile Java experience, but do not have J2EE experience.
Since completion of the Developer exam, I have done some independant work on JDBC, JavaBeans, Networking/RMI etc, so I feel comfortable with these areas which are outside the developer exam.

One option I am thinking about is doing the new Sun Certified Business Component Developer exam to get some enterprise knowhow at least.
However I do not want to end up with a string of certifications and little experience.

As many opinions on this as possible would be appreciated.

Thanks

Hugh
19 years ago
I have just completed by SCJD with 387/400.

I worked as a developer in VB and VAX until I moved to Sydney 6 years ago, since then I have worked mostly as a Development test engineer in C/Java/Perl.
I would like to get back into developing fulltime, but am finding the experience I am getting in my current role is limited, hence starting out on the Sun certification trail.

I would like to get into Java full time, but all jobs seems to involve J2EE,
of which I have no experience. I am trying to pick up general J2SE experience by doing test programs in JDBC, Java beans, NIO, networking etc.

At this stage I am not sure whether to do another certification, as experience is what I am lacking most. I found the SCJD exam useful as it is a chance to build up experience. What is the best route to skilling up to a level where I can find work as a mid-level Java developer.
Advice would be welcome, especially from anyone who knows the Australian or UK markets.

Thanks
19 years ago
Guvenc

I did implement fully all the Sun supplied DBAccess methods, I thought it was good practice. Just did not use them in the GUI controller, but they can be easilly used by anyone extending the code in the future,

Perogi

I only used object block synchronizing, as I found it easier to get my head around the idea of locking up a particular object while a change is being made.

Regards

Hugh
19 years ago
In the off chance it might help someone -

All records are cached as record objects (a custom class)

Lock mappings are stored in the Data attribute (all synchro is done on this oject for locking actions)
private static HashMap recordsLocked = new HashMap();

As above in the Data class I implement the Sun supplied,

public long lockRecord(long recNo)throws RecordNotFoundException
(if mapping already exists for this record wait until lock released, otherwise add new record/random lockcookie mapping to HashMap recordsLocked )

public void unlock(long recNo, long cookie)throws SecurityException
( check using Data method isValidRecordLock(recNo, cookie) if a record lock exists for this record/lockcookie combination, if so remove mapping from hashmap. )

These methods are wrapped in the Remote implementation, in the local implementation the methods throw new UnsupportedOperationException ("No local locking implemented");

Each clients controller class has a connetion object (local or remote Database access implementation ) and stores one lockcookie


The client only uses locking when a RMI client books a record, for a local
connetion -1 passed as lockcookie indicates ignore lcoking.



Hope it helps.

ps. I found the most confusing aspect of the project was exception handling, I just passed everything up to the GUI controller, which rewrapped the message and sent it to a GUI level error display method
to generate a dialog window with the original cause string.
I could not see any case where I would handle an exception at a lower level.
Still not sure if this is right.

Regards

Hugh
19 years ago
Basically just like Max does in his book, A static HashMap in the Data class is used to store record/lockcookie mappings for all clients. Each client holds the lockcookie while it has a lock on a record.
All other clients wait until the lock holding client gives up the lock. Unlocking removes the record/lockcookie mappings from the HashMap and notifies all waiting clients.

The only difference is I syncronize on the static Hashmap object for all
locking actions not using method sync, I also said I was assuming each client would only have one cookie at any one time (an iffy statement at best)

Thanks again
19 years ago
I got my results from the certmanager site.

Summary is:

Section Max Points Actual Points
General Con: 100 90
Documentation: 70 70
OOD: 30 30
GUI: 40 37
Locking: 80 80
Data Store: 40 40
Network Server: 40 40

Total: 400 387


I am quite happy with it, as I do not think my programming/design skills are all that hot. Thanks to all for your help, I have always found this forum very helpful.
19 years ago
I hope to finally submit my exam in the next day or two, but have some final questions.
1. When you run the final javadoc on your code base, should you keep all the javadoc generated files in your submission (ie help-doc.html, allclasses-noframe.html,package-list etc.)
2. My suncertify.properties uses the java Properties API to save the start-up settings i.e

This will only save the last settings for one connection type (server/local/client), as the file is overwritten each time.
Example 1.
start server server settings saved
start alone no alone setting, use defaults, overwrite server setting
start server again has to use defaults since alone start overwrites original server settings, but overwrites alone settings again.
Example 2.
start server server settings saved
start server server settings used and overwrite
start server server settings used and overwrite
Is this method contary to the requiremants...
"All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory." it does not specify cross connection type settings saving ?
3. Testing on Solaris, I do not have access to a sloaris/linux box, only my win2000 box which I develop on. I have installed Cygwin (unix emulator) and tested on that on my win2000 box.
But the Cygwin testing still uses the underlying win2000 OS, so I am not too confident about the solaris side of testing.
I do not have a dual boot machine to install solaris on.
Any ideas??? I was going to just explain this in the choices.txt doco as a known issue.
Thanks in advance.
Hugh
I have just reread a second requirement..
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]
Your programs must not require use of command line arguments other than the single mode flag, which must be supported. Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.
So unless you alow the user to select a database file in the GUI configuration, the network mode is the only option?
I have a requirement..
Network Approaches
Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely. No authentication is required for database access.
I have been assuming all along, I have to provide a constructor in my Data class which takes a string for the location path of any database file local to the server, so the client can specify a specific database file to use.
This complicates things alot. (I use a default database location in the project root)
On re-reading, it seems, because it is under a network heading, it may just be saying allow the user to specify local or network access.
Is the requirement vague enough to give a discription in the design decision doco and then ignore this setting a specific database file.
Hi
I have implemented RMI and tested it for simulated remote network use on a single machine (using localhost as IP).
I want to complete the testing of this section by placing the test client on another machine. I have Java j2se installed on the second machine, but am unsure as to ...
which classes are required on the client m/c,
what directory structure they should be in on the client m/c,
If the RMI registering has to be done manually on the server, before the client can access the remote methods.
If someone could describe the process it would be appreciated.
Thanks
Hugh
Hi
I am testing my RMI section for local and remote calls (on the same machine therefore remote IP is just localhost), I am using a connector (factory class to get either the remote or local data access object.
When I call the local version, the calls excetute fine and then I get the command prompt back in DOS shell. Using the remote version the calls execute but I do not get the command prompt back. I have to ctrl C to get the prompt back.
Is this normal behaviour?
Regards
Hugh
George
Thank you again for your kind reply.
However I have another question...
In creating the interface DBAccessCommon I have copied the original DBAccess interface, but each method in the DBAccessCommon interface only throws an IOException (instead of any other exception ), as per above post.
Problem is when I implement DBAccessCommon in DBAccessCommonImplementation (local) and DBRemoteMapImpl (remote), both wrap calls to a member Data object, which in turn (since it implements DBAccess by requirements) throws specific sun specified exceptions (RecordNotFoundException etc).
Therefore in wrapping the data methods in each class I have to catch those specific exceptions and either deal with them there or chain them into an IOException (the only exception the DBAccessCommon interface allows).
Problems
1. IOException does not support exception chaining, so cannot chain the cause exceptions to a higher level.
2. I am not sure if handling these sun specified exception at this level (DBAccessCommonImplementation, DBRemoteMapImpl ), is right.
Any advice on this?

Thank you for your help in this.
Regards
Hugh
Leo / George
Thank you for your replies.
A final question on this, I have implemented a 2 tier system, using a second interface DBRemoteMap. This is exactly the same as the DBAccess interface except it extends java.rmi.Remote and each DBAccess method throws an extra exception (RemoteException).
I have then used this interface to implement the RMI side in DBDatabaseImpl.java (wraps Data methods)
Only problem is I wanted to implement a connection factory that returns a single type object to hide local/network choice there..
ie.. public DBAccess getDatabase()
How do I work it so I have only one interface ?
Hi
I am having a problem implementing RMI in my system, I am using a similiar method to Max Habibi's book, but am getting an error.
the main interface is as supplied by sun i.e.

this is then implemented in the Data class (main DB access class)for local access.
For remote access the following interface extends Remote and DBAccess

then this is implemented in the main remote class

This appears to be similiar to the book, but I am getting the compile error
suncertify/remote/DBDatabaseImpl.java:48: updateRecord(long,java.lang.String[],long) in suncertify.remote.DBDatabaseImpl cannot implement updateRecord(long,java.lang.String[],long) in suncertify.db.DBAccess; overridden method does not throw java.rmi.RemoteException
I cannot change the sun supplied interface DBAccess, therefore what am I doing different from the book?
Regards
Hugh