Jonny:
Using jetty as a
service container like you are doing is one of my objectives. The use case for this is I will have multiple rich clients accessing a networked database, and the service/dao layer will be used to expose the database to the client in the form of serialized java objects(hence the use of HttpInvoker)
True, but the puzzling part to me is this; in the use case I described above, when jetty will act as a service container, and the interfaces, classes, dependencies, web.xml, jetty.xml and spring app context.xml are packaged in the war file, how are you actually starting the embedded jetty instance. The jetty server must be started before the DispatcherServlet may route any traffic through to your services/daos, so how are you accomplishing this? I would think you would have to have access to all three descriptors(jetty.xml, web.xml and spring app context.xml), which are contained in the war file, right? Do you explode the war contents and access the jetty.xml inside a java main class using something similar to:
Code:
FileSystemXmlApplicationContext ctx = new FileSystemXmlApplicationContext(path/to/jetty.xml);
I was hoping to minimize the refactoring involved. Basically, I have a Swing Client app which needs access to either a database found on local host or a network server. Setting it up this way, if I want to access a datasource other than what I have locally, I should be able to simply change the value on the
serviceUrl below from localhost to a network host and use the same codebase.
Jonny