Win a copy of Rust Web Development this week in the Other Languages forum!

Paul Truckle

Greenhorn
+ Follow
since Feb 22, 2005
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 Paul Truckle

Hi.... I'm in the same boat as Arun, and while I understand the factory concept at a more abstract level, I'm failing on a level of detail. When you say a RemoteObject and DataAccessObject for each client is that a newly registered and binded object for each client then? I'd would be really grateful if somebody could expand on this...obviously without giving away too much. I to have a single RemoteObject instance in my design at the moment, but have come across a lot of recent discussion on Factory's and a RemoteObject per client.

Many thanks,


Paul.
Can I ask why it's necessary to use a HashMap that records the current Thread ? Why do we need the thread recorded ? Is there any benefit to this over using a HashSet and recording the record number as an Integer() ?

Thanks, Paul.
Hi. Ive been told that this issue maybe down to the a mismatch of Apache Toolkit version and WSDL standard version.
Hi Lin. Thanks for the response. Not sure I can expand anymore. I think we may have some sort of configuration issue. Basically we have restriction base="int" within our WSDL. We follow the steps for creating Web Services within JBuilder, i.e. new project, new file (Web Configuration), Drag the WSDL into JBuilder, right click and generate local server which fails, because it's looking for String.java and int.java. There must be something not quite right here, because it shouldn't be looking for int.java, it wouldn't be possible to create a class with a name of "int". Nothing else to add really.
Hi, I'm totally new to Web Services can have a problem with JBuilder trying to generate a file named int.java from the WSDL. The WSDL is supplied by a TDA in my company and I've noticed that it has a few descriptions that include <restriction base="int"/>. When I import the WSDL and select the option to Generate Local Server Implementation (which seems the next logical step) and try to compile from the default generated files, it's looking for String.java (that's OK, even though it doesn't find it) and also int.java...which doesn't make sense to me, so it FAILS to compile properly. I've also noticed that there is a deployment file WSDD that has a type of "java:int" in it.

This may be a basic issue, but I'm new to Web Services this week so any help would be appreciated.



Thanks, Paul.
To expand slightly further on the above, the error in trying to compile int.java occurs after selecting the option to "Generate Local Server Implementation".

Thanks, Paul.
16 years ago
Hi, I'm totally new to Web Services can have a problem with JBuilder trying to generate a file named int.java from the WSDL. The WSDL is supplied by a TDA in my company and I've noticed that it has a few descriptions that include <restriction base="int"/>. When I import the WSDL and try to compile from the default import, it's looking for String.java (that's OK, even though it doesn't find it) and also int.java...which doesn't make sense to me, so it FAILS to compile properly. I've also noticed that there is a deployment file WSDD that has a type of "java:int" in it.

This may be a basic issue, but I'm new to Web Services this week so any help would be appreciated.



Thanks, Paul.
16 years ago
Hi Andrew/Frans....I take your point about concurrent access....it has cross my mind and I've not fully commited to a paritcular design at the moment. If that concurrent access was to be opened up allowing more threads to use the class this would probably necesitate a file pointer per thread I would have thought ? At the moment I have one filepointer that is opened from the start. I wouldn't have though it's a good idea to open and close the file pointer for each method update called (create/update/delete etc.). I can only conclude that if more concurrency is offered, then a file pointer per server thread generated by rmi is required. Anyone implemented this ?

Thanks, Paul.
Hi Andrew. Many thanks for taking the time to answer each invidual question. Your answers have been most helpful.

Thanks again, Paul.
To add to the above, I think some of this raises the decision of client side / server side locking. At this point in time I intented to do expose the locking (lock/unlock) to the client, as the spec suggests so. Also because one of the business requirements is to lock, read, check owner has not been updated, update and unlock. You can't put this in the server side update as it includes a business specifc rule for checking the owner has not been updated. If this is the case, does this mean that the update (server side) should have nothing in terms of lock logic (as it's done from client) side ? Also, when coding the delete method I imagined that this would include lock specific calls within it.

The methods within the data class (or remote data if adapted) would be synchronized to avoid problems with the file pointer being corrupted. Has anyone ever used maybe 2 or 3 file pointers to be used by particular methods...allowing more concurrent access. Although the spec says to assume one program accessing the database at any one point in time.

Comments appreciated please.

Paul.
Hello All....I'm looking at this issue myself at the moment. There's a few points in my mind here, and I'm not saying which is right or wrong, but :-

1. If you've synchronized all the methods in your data class, doesn't this mean that effectively you can only have one thread accessing the "Data" object/instance at anyone time ? Wouldn't this prevent two records being booked at the same time anyway ? If you update method included checking the record has not been already booked (read it first) and updating it all in one synchronized method, this
would stop multiple updates happening ? Two threads can't enter the same synchronized method at the same time right ?

2. The downside to the above is that if you synchronize every method, then concurrent file access is not possible. However my
assignment (B&S) states that you can assume that only one program is accessing the database at any one time. If you wanted
concurrent file access then you can't sync all methods and you'd have to consider the file pointer as one instance on it's own would be
all over the place with multiple concurrent access.


Frans, be interested in your comments on the above.
Hi... to put your mind at rest, the Whizlabs exams are (in my opinion) set at a higher level than the actual exam. At first at felt a little disappointed by using their simulator, but don't allow yourself to be, just continue on until U take the exam...it's not as difficult.... I didn't think so. I devoted 15 days in total, that's solid days though. As if that's not enough torture I've gone on to do SCJD.
16 years ago
Correct.... that's why I talked about interfaces more in my answer.

Thanks again.
Yep ... thanks....that's it....that's what I've done.
Hi. Yes, thanks .. I've sorted it. Basically, I created a further class that has an instance of the interface within it. The new class doesn't have the RemoteExceptions within it's methods, but the interface then references the methods that do have the RemoteExceptions (what's returned from rmi server). I've then repeated the methods of the interface within the new class without RemoteException and called the equivalent method in the interface reference...thus achieving my requirement. Is this your definition of Adapter ? This certainly resolves my problem by keeping the client side of the solution still referencing DBMain for remote and local versions.