Yes, that's it, at a quick glance I figured that the method that got a stream was for writing, not reading.
-Darius On Tue, May 8, 2012 at 6:28 AM, Ben Wolfe <b...@openmrs.org> wrote: > Ah, ok, I see what you mean now and I totally agree! We do only have one > method to write to the feed, and that will be synchronized: > AtomFeedUtil.writeToFeed(action, OpenmrsObject) > > This method you are looking at is: AtomFeedUtil.getAtomFeedStream(). It > gets an OutputStream for the servlet to display the feed. It has to be > public. Perhaps we should rename it to be more obvious that you are > getting the stream for output purposes and not input purposes? > > Ben > > > On Tue, May 8, 2012 at 12:07 AM, Darius Jazayeri <djazay...@gmail.com>wrote: > >> I meant that the method should not be publicly accessible. The service >> should only expose a single method that adds a feed item to the file. >> >> -Darius (by phone) >> On May 7, 2012 7:20 PM, "Ben Wolfe" <b...@openmrs.org> wrote: >> >>> Threading is dealt with by activemq. >>> >>> This method does need to be synchronized. But why does it need to be in >>> a service layer? No db transaction is occurring. >>> >>> Ben >>> On May 7, 2012 7:09 PM, "Darius Jazayeri" <dar...@openmrs.org> wrote: >>> >>>> Ben, >>>> >>>> I just peeked at this review when I saw it in my inbox. Maybe you're >>>> dealing with threading and synchronization elsewhere, I haven't looked. >>>> >>>> I'm a bit worried that we're giving static access to getting a stream >>>> to the file that stores the atom feed in a Util method. >>>> >>>> Don't we want this to be in the service layer, and don't we want to >>>> ensure that writing a new entry to that file is a synchronized, atomic >>>> operation? >>>> >>>> -Darius >>>> >>>> On Mon, May 7, 2012 at 10:19 AM, Mykola Vorobey < >>>> fisheye-nore...@openmrs.org> wrote: >>>> >>>>> [image: Crucible] <https://source.openmrs.org/cru> [image: >>>>> Review] ATOM-7 <https://tickets.openmrs.org/browse/ATOM-7> - >>>>> Implement AtomFeedUtil.getAtomFeedStream >>>>> CR-MOD-416<https://source.openmrs.org/cru/CR-MOD-416> >>>>> The state of CR-MOD-416 <https://source.openmrs.org/cru/CR-MOD-416>has >>>>> been changed: >>>>> >>>>> - Mykola Vorobey changed it to Review >>>>> >>>>> Participants <https://source.openmrs.org/user/mvorobey> Mykola >>>>> Vorobey <https://source.openmrs.org/user/mvorobey> Author >>>>> <https://source.openmrs.org/user/darius> Darius >>>>> Jazayeri <https://source.openmrs.org/user/darius> Reviewer >>>>> <https://source.openmrs.org/user/bwolfe> Ben >>>>> Wolfe <https://source.openmrs.org/user/bwolfe> Reviewer >>>>> Sent by Atlassian Crucible <http://www.atlassian.com/crucible>2.7.1 >>>> >>>> >>>> ------------------------------ >>>> Click here to >>>> unsubscribe<lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l>from >>>> OpenMRS Developers' mailing list >>> >>> ------------------------------ >>> Click here to >>> unsubscribe<lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l>from >>> OpenMRS Developers' mailing list >> >> ------------------------------ >> Click here to >> unsubscribe<lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l>from >> OpenMRS Developers' mailing list >> > > ------------------------------ > Click here to > unsubscribe<lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to lists...@listserv.iupui.edu with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l]