Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-02-2007
Greenhippo Greenhippo is offline
Registered User
 
Name: Alex
Organization: University of Auckland
Project: Intelligent Middleware
 
Join Date: Nov 2006
Posts: 32
custom meta data directives

Hi,

Is there in any support in ICE to create custom meta data directives to influence the code that is generated from the slice files?

My goal is to provide some interception capabilities to allow changes or operations to occur to the invocations both before and after they are processed by the actual object. Currently i am achieving this by creating a BlobObject that calls interception code before forwarding the actual request.

However this method prevents collocation optimizations and is becoming cumbersome to work with. Being able to add meta data directives that create interception into the generated code would seem to be a far cleaner solution.

Is there any support for custom meta data directives, or is the source available to the slice compilers such that new directives could be added?
__________________
Alex Davies
The University of Auckland
Reply With Quote
  #2 (permalink)  
Old 07-02-2007
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Why not simply use a servant locator? You can execute code before and after an operation is dispatched in the locate() and finished() methods.

The source code of the Slice compilers is available in our Ice for C++ source distributions.
Reply With Quote
  #3 (permalink)  
Old 07-03-2007
Greenhippo Greenhippo is offline
Registered User
 
Name: Alex
Organization: University of Auckland
Project: Intelligent Middleware
 
Join Date: Nov 2006
Posts: 32
If i were to implement interception through the servant locator would i not bind anything to the adapter but instead make my own copy of a lookup table in my own servant locater and use that to return objects?

Will collocated operations still get invoked through the servant locator?

Am i right in assuming that the servant locator can not get or alter information such as method parameters, or is there a way in which we can get access to these too?

Thanks for any help you can offer
__________________
Alex Davies
The University of Auckland
Reply With Quote
  #4 (permalink)  
Old 07-03-2007
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Quote:
Originally Posted by Greenhippo View Post
If i were to implement interception through the servant locator would i not bind anything to the adapter but instead make my own copy of a lookup table in my own servant locater and use that to return objects?
Yes, you would have to maintain your own active servant map.

Quote:
Originally Posted by Greenhippo View Post
Will collocated operations still get invoked through the servant locator?
Yes.

Quote:
Originally Posted by Greenhippo View Post
Am i right in assuming that the servant locator can not get or alter information such as method parameters, or is there a way in which we can get access to these too?
A servant locator cannot access or alter parameters.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gauging interest: Visual Studio custom tool for Slice files csammis Comments 9 10-16-2008 11:05 PM
java 5 custom sequence mapping warnings xdm Help Center 1 06-07-2007 02:42 PM
Custom headers in generated files Sameerrele Help Center 2 10-17-2006 07:02 PM
Metadata directives bartley Help Center 1 02-03-2006 02:35 PM
IcePack.Registry.Data and IcePack.Node.Data directories vsonnathi Comments 0 10-21-2004 06:12 PM


All times are GMT -4. The time now is 02:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.