steinard
01-31-2007, 10:03 AM
Is this the appropriate thread for posting questions about serviced components? Maybe there should be one dedicated to that specific theme. I doubt that exposing middleware services through com+ will die anytime soon as both M$ and the Spring.Net documentation announces that the com+ way "will also provide the easiest migration path to Indigo", see url (http://www.springframework.net/doc-latest/reference/html/services.html).
Anyway, one of my problems right now is concerned with initializing the serviced component when run as a server. Activating the component service as a library application is nice for debugging, but all configuration resources (app.config) will be loaded though the client instance, and not at the serviced end. To go around this problem I've tried to find a uniform way of loading configuration files independent on wether the serviced component is activated as a server or a library application. I am able to use this apporach for loading spring objects alone using this approach (http://www.springframework.net/doc-latest/reference/html/objects.html):
IApplicationContext context = new XmlApplicationContext("assembly://MyAssembly/MyProject/objects.xml");
But how can I use a similar approach for loading my hibernate.hbm.xml configuration file which describes the connection to the database (NHibernate) uniformly and independent of how the serviced component is currently activated? It would be a great benefit if I could verify through debugging how the middleware acts when activated as a library application as this is not possible when running as a server.
Any help here is greatly appriciated,
Steinar.
Anyway, one of my problems right now is concerned with initializing the serviced component when run as a server. Activating the component service as a library application is nice for debugging, but all configuration resources (app.config) will be loaded though the client instance, and not at the serviced end. To go around this problem I've tried to find a uniform way of loading configuration files independent on wether the serviced component is activated as a server or a library application. I am able to use this apporach for loading spring objects alone using this approach (http://www.springframework.net/doc-latest/reference/html/objects.html):
IApplicationContext context = new XmlApplicationContext("assembly://MyAssembly/MyProject/objects.xml");
But how can I use a similar approach for loading my hibernate.hbm.xml configuration file which describes the connection to the database (NHibernate) uniformly and independent of how the serviced component is currently activated? It would be a great benefit if I could verify through debugging how the middleware acts when activated as a library application as this is not possible when running as a server.
Any help here is greatly appriciated,
Steinar.