Hi Brad
Loading an external file is one option - my initial concern would be though that we'd need to mantain another configuration format
in this case. Unless we somhow manage to basically reuse jaxrs:server as is in a non-Spring file - we'd need to do a bit of custom
XMl processing to resolve the references but it might be doable.
But may be we should try to do what you suggested but using web.xml syntax. Do
you think it would be doable ?
Additional configuration possibility is to introduce a class scanning feature for providers be automatically picked up I don't like
this feature per se but it might simplify the web.xml or or external file config in that no providers will have to be explicitly
specified...and it will be more JAX-RS-spec-friendly may be.
Cheers, Sergey
Sergey,
I'll get a JIRA out there in a bit -- quick question -- what do you
see the eventual approach to be? I'm guessing based upon the
programmatic configuration example that a servlet wrapper which does
the following would work:
- instantiates a JAXRSServerFactoryBean
- sets the server address
- loads an external XML file in the form of:
<ServiceBeans>
<ServiceBean class="com.me.Foo1" address="/"/>
<ServiceBean class="com.me.Foo2" address="/"/>
...
<ServiceBean class="com.me.Foon" address="/"/>
</ServiceBeans>
and then dynamically instantiates these, setting them on the factory
bean.
- creates the server.
If such a servlet were loaded on startup in the web.xml file, that
seems like it would do it, no? Of course, I suppose this could just be
added to the CXFServlet.
Thoughts?
Brad
Brad O'Hearne
Owner / Developer
Big Hill Software
ph.480.280.1468
fx.888.600.8806
[EMAIL PROTECTED]
http://www.bighillsoftware.com
--------------------------------------------------------------------------------
On Nov 12, 2008, at 9:22 AM, Sergey Beryozkin wrote:
Hi Brad
No - we can't do it yet but we'll have to be able to do some if not
all of the configuration from web.xml...
Can you open a JIRA please for this valid issue be tracked and
eventually prioritized ?
We can only do it with Spring or programmatically at the moment
Cheers, Sergey
All,
I was just looking at the jax-rs configuration doc in the user's
guide, and it gives info for configuring jax-rs with a Spring
beans.xml file. Suppose I don't want to use Spring? Can I
configure jax-rs exclusively in my web.xml?
Brad
Brad O'Hearne
Owner / Developer
Big Hill Software
ph.480.280.1468
fx.888.600.8806
[EMAIL PROTECTED]
http://www.bighillsoftware.com
--------------------------------------------------------------------------------