[
https://issues.apache.org/jira/browse/ZOOKEEPER-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047846#comment-13047846
]
Matt Giacomini commented on ZOOKEEPER-92:
-----------------------------------------
Hi Patrick,
I will follow the HowToContribute and submit a proper patch. Would you mind
removing the existing attachments I included in this Jira? I don't have the
permissions to do so.
I'm assuming that you guys don't include contrib code in the jar's that are
deployed to Maven. Your avg Spring developer is going to expect to define a
Maven dependency for zookeeper, add a few lines to their context.xml, and have
zookeeper launch. It may make more sense to put these factories in Main, but
that is your call.
Also I'm trying not to duplicate any code and was able to utilize the
QuorumPeerMain class in the factory, but ZooKeeperServerMain defines
NIOServerCnxn.Factory as private so I was not able to extend the class to
create a shutdown hook. This caused me to basically have to duplicate the
functionality of ZooKeeperServerMain.runFromConfig method in the
ZookeeperServerFactoryBean class. This seems like an unnecessary code
duplication, so I wanted to see if anyone was open to making
NIOServerCnxn.Factory protected in ZooKeeperServerMain?
I'm going to be implementing these factories into our production application in
a few days, so I may end up tweaking them a bit if issues come up. Expect a
patch from me in the next week or two.
Thanks.
> spring factory beans for ZooKeeper, ZooKeeperFacade and ZooKeeperServer
> -----------------------------------------------------------------------
>
> Key: ZOOKEEPER-92
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-92
> Project: ZooKeeper
> Issue Type: Sub-task
> Components: java client
> Reporter: james strachan
> Attachments: ZookeeperClientFactoryBean.java,
> ZookeeperServerFactoryBean.java, ZookeeperServerFactoryBean.java
>
>
> for folks who use Spring for Dependency Injection it might be handy to have a
> couple of factory beans to make it easier to create and configure the
> ZooKeeper, ZooKeeperFacade and ZooKeeperServer via the normal Spring
> dependency mechanism; via Java or XML code etc
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira