Paula Decker

Ranch Hand
+ Follow
since Dec 17, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Paula Decker

Hi William,

I have signed up. I believe you need to approve it.

Thanks for creating the group.

-Paula
Hello,

I too would like to join the group. I have passed the test. I have about 3 years of J2EE experience. I look forward to working with you.

Paula
Hi Daniel,

Thanks for the encouragement. I had B&S. I think I'll start studying for the architect certification. I have some time now. I hope if it changes it won't be too drastic. I wonder what the new topics for SCEA will be.

-Paula
19 years ago
Hi Daniel,

Congratulations! I was sure that you passed. Thanks for your helpful posts while working toward the SCJD.

I submitted mine a week ago and took the test the next day. I hope to be hearing something (hopefully positive) soon.

I noticed you said you don't have any interest in working on the SCJA until they update it. Why is that?

-Paula
19 years ago
Charles,

Thanks for the reply. My RandomAccessFile is wrapped pretty tightly by my Data class. I don't think I want to pull any of it out at this point. I guess I'll take my chances with Data.close(). Thanks for your valuable input about the finalize() method. I also read that it may not always be called. Thanks again.

-Paula
Hi Peter,

Thanks for the input. I am only calling Data.close() when the server or standalone client applications are closed. I tried closing the file from Data during its finalize method. I don't believe the finalize method got called. I wasn't sure if this was a reliable approach.

What are the thoughts about Data.finalize() ?? Is it reliable?

I am not implementing the notion of a client session. The reason for this is that a user login was not required. I handle a record lock which was left by a crashed client by using: wait(<10 minutes> ; After the 10 minutes, the user receives a message that the record is still locked, and to please inform an administrator.

Thanks.

-Paula
Hi Charles,

Thanks for the post. My Data class implements DBAccess and uses a singleton for the database access, so its like a singleton itself. That is why I think a static is ok. I call Data.close() from my gui controller to close the database if I'm in standalone mode. I call Data.close() from the server.close() method. Both the standalone client and the server use an instance of Data to make all calls to the database. I don't really like using the static but it should work. I was wondering if I should add it because close() is not in the DBAccess interface. What do you think? Normally, I would just add another method, close() to the interface and be done with it.

Thanks.

-Paula
Hi Dennis,

Thanks for the email. I have just changed my code to add a public static method in my Data class called, close(). This should be legal. I made this change because it impacts my code the least amount. Thanks again.

-Paula
Would it be adviseable to include the following code in the server shutdown:

data = null;

and let the finalize method of data handle the closing of the file?

Thanks.

-Paula
I want to shutdown the server from a server UI. The first step in the process would be to call: data.close(). My question is that the method, close() is not in the DBAccess interface. So how can I add the public close method? I have looked at previous threads which have said they either put it in an interface or made it public static. Is this acceptable for the B&S project or the other newer project versions?

Thanks very much.


-Paula
Hi Daniel,

I'm sure you passed the test and the project. Your emails were well thought out and very helpful. I'm getting close to submitting mine also.

-Paula
Paul -
Please ignore the first part of my last post; I see you've already solved it by your solution.
-Paula
Paul,

I have a DBLocalAdapter class that implements DBClient, and this is used as the local adapter. I also have a DBRemoteAdapter, which implements DBClient and Remote, and this is my remote adapter. The DBConnector class will return the appropriate DBClient object based on the flag.


Do you have trouble compiling DBRemoteAdapter?

I followed part of the design from Peter Wooster in the Local Adapter Issue.
Here's the result:

1) Create an interface which extends only Remote and has all method signatures of DBAccess, but adds RemoteException.
2) The server implements this and contains an instance of Data.
3) On the client side, wrap the Remote Server reference in a class which implements DBAccess. DBProxy for example.
4) The client can now have a variable: DBAccess dbAccess, which represents either the local (an instance of Data), or remote (DBProxy).

-Paula
Hi Paul,

I have the B&S assignment, and my understanding is that you cannot add a throws IOException to the DBAccess interface. This will result in an automatic failure.

My understanding from the Local Adapter link, is that the server implements an interface which:
1) only extends Remote
2) contains the signatures of all methods in DBAccess (including exceptions thrown), but adds the RemoteException

If your server implements this interface, you won't have the compiler error.

-Paula
I found the answer by reading this link:

Local Adapter Issue

-Paula