Murali Kurukunda

Ranch Hand
+ Follow
since Oct 20, 2003
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Murali Kurukunda

about C
if the transcation is CMT ,it will rollback;
but if the transcation is Client transcation ,what can you do?

I think its upto the client to decide whether to rollback the transaction or not, if the client has its own transaction.
Hi All,
I have got my result today 7 days after the essay exam.

Here is my detailed score:
General Considerations (maximum = 100): 95
Documentation (maximum = 70): 69
O-O Design (maximum = 30): 26
GUI (maximum = 40): 37
Locking (maximum = 80): 44
Data store (maximum = 40): 40
Network server (maximum = 40): 40

I thought I had tested my locking implementation well enough, but still got the 44. Anyways no regrets on that. I am just happy the exam is over and I passed.

This forum was a great help in the preparation and I want to thank everyone here.

15 years ago
I guess I have questions to you rather than answers.
Prompt the user for CSR ID at the start up?
I think this may get you into trouble depending on your instructions for exam. My instructions say that CSR ID is entered for the customer id field when booking a record. So by prompting the user the at start up you are forcing only one CSR number to be used in a session. This may be an issue if a particular CSR wants to book two or more contractors for two different customers.

Apart from that I would say that your option B is simpler.

I used the JFormattedTextField.setColumns(8) to avoid the issue of the CustomerId Field Shrink.
I am trying to use JFormattedTextField for customerId field, but it doesn't display properly. I mean it is supposed to have display area for 8 numbers but it only shows say 4 digits at a time. Is there a way I can set this properly.
The reason I want to try hiding the Record Number is I am trying to format the columns and having some extra space will make it look good. Though the record numbers are required for the App they do not server any purpose to the user, since the record numbers can change.

I guess I can just display the record numbers, but wanted to know how to hide a column.
Right now I am displaying the record number to the user. I want to try to and hide it. how do I do it?
I tried removeColumn() API on the JTable, but I am using the recordNumber in the booking operation. So I am getting NumberFormatExceptions since in my code I am looking to parse the Contractor Name as opposed record Number field.

Also how do I format the data inside a column , say I want to position the size of the organization in the center inside a column rather than left aligned?

Just looking at the code you have posted I think the synchronization is not needed.

But it depends on how you have implemented your caching if at all you are using it. In my inplementation the cache is a static HashMap so inside the lock method I synchronize on the static map rather than making the instance method synchronized.

one more comment:
you are cahing the RecordNotFoundException and throwing it again in the facade method. I guess you might as well not catch it. Saves two lines of code [ January 14, 2005: Message edited by: Murali Kurukunda ]

[ January 14, 2005: Message edited by: Murali Kurukunda ]
[ January 14, 2005: Message edited by: Murali Kurukunda ]
Thanks for the reply . I agree with you. I did not like the option of using separate keys for SERVER B_LOCATION and STANDALONE_DB_LOCATION, because I did not want to pass the location around. But I realised I could just add a setter for the dbFileLocation in my data class set it whenever I read the property.

So here is what I did:

public static void setDBFileLocation(String dbFileLocation)

in server mode:

//try to read SERVER_DB_LOCATION from properties file
//if the property does not exists propmt the user for file location
//then call the static setDBFileLocation() on Data

//same thing in Stand Alone mode with STANDALONE B_LOCATION

please comment!
In my Data class I am caching the records in memory with a singleton like implementation. The first request that tries to create the Data class will load cache into memory and al others use that cache.

And for the location of the database the first request to load the cache into memory will lookup the location in the file and load it.

My question is would the examiner try to test the Server Mode and StandAlone modes of operations on the same machine with different locations for the database file. With my implementation only one db location is accepted.

Is it OK to assume that the location of database file would be same for both the Network client and Standalone modes of operation? If at all I lose points for this, how big is the risk?

The other option is to use different property names for the dbFileLocation like
Server B_FILE_LOCATION and StandAlone_DB_FILE_LOCATION. This implies that I pass a parameter to my Data class implementation to specify the mode of opearation. I do not like this idea very much.

Let me know your thoughts on this.
I have two buttons on the main screen Book and UnBook wchich do the booking/unbooking of the contractor. WHen the Book button is pressed, A Input Dialog is popped up asking for the CustomerID(CSR Number).

Should the user be prompted for CustomerId when they try to UnBook? CustomerId is already in the table display, so I guess the prompt is not necessary. Is it a safe assumption?

The people who have implemented the UnBook functionality, how did you guys do it? Is there any kind of validation when a user tries to Unbook.
The above code works for me. Thanks.
I guess I was not very clear in asking the question. My question is (even when using showInputDialog as you mentioned) where does the following code go?

First of all is the code correct for what I am trying to do? Does it go inside the actionPerformed() for the bookContractor button?

any example would be appreciated!

I have started working on my UI design. I have a BookContractor button in the main screen and I want to add a prompt for customer ID when the user click on the BookContractor button. And I am having difficulty doing so.
Can someone provide me a code example of how to prompt the user to enter customerId when they click on the BookContractor button in GUI. I am thinking it would be a JDialog with a textField and a submit JButton and when the user clicks on the submit button the JDialog class stored the textField value so that it can be passed to the bookContractor method.

I guess I am not sure where to put this new JDialog code? I tried putting it inside the actionPerformed() of the BookContractor button. But not much success there.
I would appreciate any example code for this.
I know my documentation says the customer ID is an 8 digit number. Is the 8 digits a hard requirement? or can it be less than 8 digits? something like 123.