Only when I bind my Implementator class to JNDI, SomeBusinessClass instance created on server, ONLY 1 instance!!! and only 1 time !!!
SCJD 1.4
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
I would like to ask, do I really need a connection factory to create different RMI remote objects?
As I cannot find in the assignment that I need to have a connection pool, and Max's example also do not use such approach.
Originally posted by Nicholas Cheung:
I would like to ask, do I really need a connection factory to create different RMI remote objects?
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Does your locking mechanism specify the use of cookies (primitive of type long)? If it doesn't, a connection factory is nice to ensure unique instances of your Data object go out to each client so that you can use such references as keys when you lock your records.
In my specifications, my locking mechanism uses cookies, so I had no need for unique instances of my Data object as I would need to create unique integer keys for my locks anyway.
Therefore my implementation has my RMI server dish out the same (Remote)DataAdapter instance to clients; thread-safe functionality is handled by a lower-level, statically referenced DBAccessor object within my Data class.
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Originally posted by Nicholas Cheung:
Currently, I am doing the same thing as you. But I wanna know, do your 2 classes RemoteDataAdapter and (Local)DataAdapter are exactly the same, except methods in the remote one throws RemoteException, while the local one dont?
I am now thinking of whether this is a good idea, since all codes in them in fact can be totally duplicate, and they cannot implement the same, say, ServerServices interface due to the different Exception thrown.
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Originally posted by Trym Moeller:
Best regards Trym
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Nick, have you solved this yet?
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Originally posted by Nicholas Cheung:
How about you? any progress?
Sun Certified Java Web Component Developer for J2EE v1.4<br />Sun Certified Java Developer for J2SE v1.4<br />Sun Certified Java Programmer for J2SE v1.4
Tell me how it all turns out. Here is a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|