> On March 15, 2013, 2:05 p.m., Mithun Radhakrishnan wrote:
> > server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java,
> >  line 421
> > <https://reviews.apache.org/r/9886/diff/2/?file=269712#file269712line421>
> >
> >     Catch JMSException instead of Exception?

I seem to have caught Exception in my code, seem to have missed this in the 
patch.


> On March 15, 2013, 2:05 p.m., Mithun Radhakrishnan wrote:
> > server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java,
> >  line 304
> > <https://reviews.apache.org/r/9886/diff/2/?file=269712#file269712line304>
> >
> >     Minor: Shouldn't we do a testAndCreateConnection() here? The first call 
> > to send will otherwise be guaranteed to throw and exception. We're 
> > guaranteed to use up a retry.
> >

The constructor of this class, does the first testAndCreateConnection(). so 
ideally, there should be a valid connection at this point.


> On March 15, 2013, 2:05 p.m., Mithun Radhakrishnan wrote:
> > server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java,
> >  line 456
> > <https://reviews.apache.org/r/9886/diff/2/?file=269712#file269712line456>
> >
> >     Why do we not close the session here?

According to javadoc of Connection.close():  "...
There is no need to close the sessions, producers, and consumers of a closed 
connection. ..."

Also in order to access and close all the thread local sessions, we would have 
to maintain a list of open sessions. I had an intermediate implementation with 
a registry, but removed it when I saw that connection.close() seems sufficient.


> On March 15, 2013, 2:05 p.m., Mithun Radhakrishnan wrote:
> > server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java,
> >  line 326
> > <https://reviews.apache.org/r/9886/diff/2/?file=269712#file269712line326>
> >
> >     Very cute. I'd have iterated.

:)


- Arup


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9886/#review17911
-----------------------------------------------------------


On March 15, 2013, 5:35 p.m., Arup Malakar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9886/
> -----------------------------------------------------------
> 
> (Updated March 15, 2013, 5:35 p.m.)
> 
> 
> Review request for hcatalog and Mithun Radhakrishnan.
> 
> 
> Description
> -------
> 
> Changes:
> 1. Added threadlocal for session variables
> 2. Added health check for connection
> 3. Exposed retry in a cleaner way and retry is done from only one place
> 4. Moved creation of topic/session etc so, that users can override them for 
> their JMS vendor if they wish to
> 5. Connection close is sufficient and session close could be omitted
> 
> 
> This addresses bug HCATALOG-627.
>     https://issues.apache.org/jira/browse/HCATALOG-627
> 
> 
> Diffs
> -----
> 
>   
> server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java
>  7551a27a78bf9db728f1bc719ca77aacdb26dc5c 
> 
> Diff: https://reviews.apache.org/r/9886/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Arup Malakar
> 
>

Reply via email to