Hey All:
We have a WCF solution that we built a number of years ago. We are going to start rewriting it in Neuron ESB in the next few months.
In the existing WCF solution, we included a behavior extension under the <system.serviceModel><extensions> node in the web config:
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="serviceInitialization" type="WSI.Common.Service.Behaviour.ServiceInitializationBehaviorConfigSection, WSI.Common.Service" />
</behaviorExtensions>
</extensions>
Then we have some configuration settings under the <system.serviceModel><behavior><serviceBehaviors> node:
<behaviors>
<serviceBehaviors>
<behavior name="SomeServiceBehavior">
<serviceInitialization type="WSI.Underwriting.SomeService.ServiceInitialization,SomeService" />
</behavior>
</serviceBehaviors>
</behaviors>
The intent of this custom service behavior is to cache reference data from external source such as a database at start up so that the we don't need to make a call to the database for each request. This initialization step is executed every time the service is started in IIS.
Our WCF custom behavior configuration & code is based on this article: https://www.codeproject.com/Articles/508713/Custom-WCF-web-service-...
I was wondering if there is anything in Neuron ESB that does something similar to this? I do see a 'Service Behaviors' in the Connection section within Neuron ESB. I looked in Neuron ESB's 'Help' but I couldn't find anything that could assist me. I also scrolled thru the Neuron ESB 'Samples' but I didn't see anything in the description that references 'Service Behaviors'
Tags:
not really.....if you are in a Business Process, you can cache data in the context.State object....that data will be available for all subsequent calls on the endpoint. However, you can use custom WCF behaviors and WCF Bindings with Neuron ESB and configure our service endpoints with them
OK, so to implement it using WCF behaviours, I would have to
1) Add an entry into the esbService.exe.config file under the <behaviorExtensions> node to reference a DLL that contains the behavior extension
2) Add the DLL that contains behavior extension to the Neudesic\Neuron ESB v3\DEFAULT path
3) In the service behaviors, add the behavior configuration that references the DLL that contains the custom behavior implementation
4) Add the DLL that is used to implement the custom behavior under the Neudesic\Neuron ESB v3\DEFAULT
5) Add the service behavior to the service endpoint
Is my assumption of how to implement it correct?
I think that's good
Based on this assumption then I think using the state object in the context is an easier implementation. The only problem is that the first call will take be longer as it will be the trigger to load data to the cache.
Thanks for your help!
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by