I'm in the process of replacing my own home brewed "mini dependency
injection"[1] with Declarative Services (DS).

I'm wondering how to replace what I was doing here:
 
https://github.com/steinarb/ukelonn/blob/b369b5768c08a1c6bb6fb422e2f462ca797c253f/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UkelonnServletProvider.java#L57

I can't quite remember what I was thinking about, half a year ago, but
what @ServiceProperties contains, is added as service properties when
registering the OSGi service:
 
https://github.com/sbang/jsr330activator/blob/master/jsr330activator.implementation/src/main/java/no/steria/osgi/jsr330activator/implementation/ProviderAdapter.java#L161

So my question is, how should what I put on the OSGi service properties
here, ie.
  ExtenderConstants.PROPERTY_URL_PATTERNS = {"/ukelonn/*", "/VAADIN/*"}
  ExtenderConstants.PROPERTY_SERVLET_NAMES = "ukelonn"
into a servlet @Component definition?

The examples I've found, ie. [2] and [3] just list one pattern for the
servlets.

Thanks!


- Steinar


References:
[1] <https://github.com/sbang/jsr330activator>
[2] 
<https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-ds/src/main/java/org/ops4j/pax/web/samples/whiteboard/ds/WhiteboardServlet.java#L30>
[3] 
<https://github.com/ops4j/org.ops4j.pax.web/blob/master/samples/whiteboard-ds/src/main/java/org/ops4j/pax/web/samples/whiteboard/ds/WhiteboardServletWithContext.java#L29>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to