473,387 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Custom ObjRef class

Hello:

I have a client server application that I am currently developing and have
some issues that I feel can be best resolved using a custom ObjRef child
class. I have created the class OK, and have overridden my
MarshalByRefObject child class so that the CreateObjRef returns an instance
of my new custom ObjRef derivative.

I can see the server create my ObjRef class and I can also see my ObjRef
class being serialized by the server, but It appears that my ObjRef class is
never deserialize by the client. Does anybody else have experience with
custom ObjRef classes and if so, is there something that I need to be doing
to get my MarshalByRefObjects to be marshaled using my ObjRef class?

Thank you for your help

Matt Osborne
Nov 16 '05 #1
1 2034
HI,
When your MBRO marshal to client site,the CreateObjRef would never be
called at client site because the real MBRO is at server site.

When the client get the info of the MBRO of server,dotnet will
deserialize it to the normal ObjRef class. And then, dotnet will create a
RealProxy and use RemotingService.Unmarshal to combine the ObjRef and
RealProxy into TransparentProxy.

What you get the object at the client site is just the TransparentProxy.
When you invoke methods on the TransparentProxy, the RealProxy.PrivateInvoke
will be called, and the methodcall information will be send to the server
and invoke the real object.

The child class of ObjRef is not important. you should set the
ObjRef.ChannelInfo/EnvoyInfo/TypeInfo as your custom info class. these infos
would be serialize at server and deserialize at client, these would be more
helpful.

--
Thanks.

Lostinet (MS .NET MVP)
lo*********@hotmail.com
---------------------------
Need MessageBox,ComboBox,DatePicker,PasswordBox,TreeVie w,ASP.Net RPC ?
http://www.lostinet.com/
---------------------------
Get ContextBoundModel For AOP.NET!
http://www.contextboundmodel.net/
---------------------------

"Matt Osborne" <pr*****@stupidSpamer.net> дÈëÏûÏ¢
news:cz*******************@newssvr29.news.prodigy. com...
Hello:

I have a client server application that I am currently developing and have
some issues that I feel can be best resolved using a custom ObjRef child
class. I have created the class OK, and have overridden my
MarshalByRefObject child class so that the CreateObjRef returns an instance of my new custom ObjRef derivative.

I can see the server create my ObjRef class and I can also see my ObjRef
class being serialized by the server, but It appears that my ObjRef class is never deserialize by the client. Does anybody else have experience with
custom ObjRef classes and if so, is there something that I need to be doing to get my MarshalByRefObjects to be marshaled using my ObjRef class?

Thank you for your help

Matt Osborne

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Neil Zanella | last post by:
Hello, In Python, classes are objects. But there is no way to custom print a class object. This would require some syntax such as the one commented out below: With the current "foo =...
1
by: Matt Osborne | last post by:
Hello: I have a client server application that I am currently developing and have some issues that I feel can be best resolved using a custom ObjRef child class. I have created the class OK,...
4
by: Steve Amey | last post by:
Hi all I am creating a basic control to perform some tasks, and I want to declare some events to be raised so they can be handled from the form that the control is on. I can create my own Event...
7
by: Luc Tremblay | last post by:
Given the typical following code: void Listener::HandleEvent(const Event& event) { // handling code } In a "clean" fashion, how is it possible to add custom data (to be subsequently...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
7
by: John Grandy | last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled with instances of a custom class. The custom class is defined in a Class Library that is included in the web-service...
19
by: Jamey Shuemaker | last post by:
I'm in the process of expanding my knowledge and use of Class Modules. I've perused MSDN and this and other sites, and I'm pretty comfortable with my understanding of Class Modules with the...
9
by: Greger | last post by:
Hi, I am building an architecture that passes my custom objects to and from webservices. (Our internal architecture requires me to use webservices to any suggestion to use other remoting...
11
by: Pete Kane | last post by:
Hi All, does anyone know how to add TabPages of ones own classes at design time ? ideally when adding a new TabControl it would contain tab pages of my own classes, I know you can achieve this with...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.