Based on various discussions and emails back and forth both before and
after the holiday break, I've started implementing an hk2 based system
to read the grizzly config file. This involves a fair level of black
magic but should provide the least impedance mismatch between glassfish
and grizzly. Fortunately, it's pretty straightforward once you get all
the pieces in front of you. Basically how it works is that, using the
interface definitions in com.sun.grizzly.config, hk2 builds a set of
proxies on top of the DOM built from the xml document. It's actually
possible to modify the DOM in this fashion and then persist those
changes back to the xml file (glassfish does this) but I haven't
implemented that as that's only really useful when you have something
like glassfish's admin panel to make those changes. I have a feeling
that grizzly's use will be more read-only oriented.
The code is all checked in and the change log is included below for
those who would like to take a look at it. The next step will be to
configure the system according to that DOM now. I have some preliminary
code in place from the older JAXB set up but I'm not entirely pleased
with it so I don't know that it'll stay around too much longer. What I
really need to do is learn how to set up a grizzly system
programatically the proper way and then take cues from the DOM as to how
to configure it. All this in a hopefully glassfish friendly but not
dependent way. :)
If anyone has any questions or comments, I'd love to hear them at the
dev meeting in an hour. I'm at the point, now, where I could really use
some guidance from those more knowledgable than I about grizzly.
parsing document via hk2 based system as glassfish does.
File summary : 36 files affected in 1 modules.
Modules affected : grizzly-config
Module [grizzly-config]:
1 Deleted files:
src/main/resources/grizzly-config.xml 2076 deleted
5 Modified files:
src/main/resources/domain.xml 2076=>2104
src/main/resources/dtd/grizzly-config.dtd 2076=>2104
src/main/java/com/sun/grizzly/config/GrizzlyConfig.java 2076=>2104
null/pom.xml 2076=>2104
src/main/resources/dtd/grizzly-config-bindings.xjb 2076=>2104
30 Added files:
src/main/java/org/grizzly/contribs/config/Property.java 2104
src/main/java/org/grizzly/contribs/config/Protocols.java 2104
src/test/java/com/sun/grizzly 2104
src/test/java 2104
src/main/java/org 2104
src/test/java/com/sun/grizzly/config 2104
src/main/java/org/grizzly/contribs/config 2104
src/main/java/org/grizzly/contribs/config/Protocol.java 2104
src/test/java/com/sun/grizzly/config/GrizzlyConfigTest.java 2104
src/main/java/org/grizzly/contribs/config/NetworkConfig.java 2104
src/main/java/org/grizzly/contribs/config/PortUnification.java 2104
src/test/java/com/sun 2104
src/main/java/org/grizzly/contribs/config/NetworkListener.java 2104
src/main/java/org/grizzly/contribs/config/Ssl.java 2104
src/main/java/org/grizzly/contribs/config/ThreadPool.java 2104
src/main/java/org/grizzly/contribs/config/Transport.java 2104
src/main/java/org/grizzly 2104
src/main/java/com/sun/grizzly/config/GrizzlyConfigException.java 2104
src/main/java/org/grizzly/contribs 2104
src/main/java/com/sun/grizzly/config/Utils.java 2104
src/test 2104
src/test/java/com 2104
src/main/java/org/grizzly/contribs/config/ProtocolChain.java 2104
src/main/java/org/grizzly/contribs/config/NetworkListeners.java 2104
src/main/java/org/grizzly/contribs/config/ProtocolFilter.java 2104
src/main/java/org/grizzly/contribs/config/ProtocolChainInstanceHandler.java
2104
src/main/java/org/grizzly/contribs/config/Transports.java 2104
src/main/java/org/grizzly/contribs/config/ProtocolFinder.java 2104
src/main/java/org/grizzly/contribs/config/SelectionKeyHandler.java 2104
src/main/java/org/grizzly/contribs/config/PropertyBag.java 2104
Committed at Jan 7, 2009 11:38:08 AM