Note: In the current release, the Objectset object is passed through the remoting with a Bug
ArrayList al = new ArrayList (OST);
Return al;
}
}
The author believes that after reading the code, certain friends will have the question:
The RemoteCustomer in code 13 is the one we analyzed earlier.
The work that Data Access logic can accomplish, although it is separated by a layer of remoting,
But essentially the same, can not be with the code 11,12 in the Customerdal_orm
An "effective reorganization"?
The answer is YES!
However, we still need to do two very simple operations:
(1) Do you remember the Dalbase in code 9? As long as we make it inherit from MarshalByRefObject (formerly the Default object), we can "easily" solve this problem! But don't be too early, once again, all the other data access logic classes will have to accept this "unwanted gift" L, and you know, after all, there's not a lot of access to the data access logic via remoting (typically through business Logic to solve the problem), such a "gift" is not everyone can enjoy (this is also the author did not in the DAF solution the reason for such a realization)!
(2) Incorporate the above RemoteCustomer code into the customerdal_orm, but note: Do not forget to change the method name (because there is already a getallcustomers method exists, although the return type is different, but any. NET under the compiler are unable to distinguish between the J of this difference!
Next paragraph: http://www.csdn.net/develop/Read_Article.asp?id=27559
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.