Bugs item #527254, was opened at 2002-03-08 04:06 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=402704&aid=527254&group_id=31602
Category: webdoclet Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Duplicate Entries for resource-ref Initial Comment: I have two servlets using the same resource ref ( a datasource). So for each one of the servlet, I used a @web:resource-ref tag. Unfortunatley, the generated web.xml also a two resource-ref tags of exactly the same value, pointing to exactly the same data source. ---------------------------------------------------------------------- >Comment By: Andrew Stevens (stevensa) Date: 2002-03-15 14:24 Message: Logged In: YES user_id=247081 >Yep, the same occurs on ejb side if i remember well. It's not quite the same with EJBs - environment refs etc. are done at the component level (resource-ref etc. are sub- elements of entity, session & message-driven in the DTD), so you could have 2 ejbs in the same jar both with a resource ref named e.g. "jdbc/DataSource" but pointing at 2 different connection caches. For web apps, they're sub-elements of the top level web-app entry. Since they're not specified per servlet/filter, it's arguable whether they should be specified through tags in those classes anyway, rather than just having a merge file or config param(s) on the subtask. You get away with it when using MVC, since you'll probably have a single controller servlet (containing the tags) forwarding to various JSP views, but as soon as you have >1 servlet you've got this potential for duplication. Even if xdoclet stores a list of the refs as it loops through them, and skip the duplicates, there's still a problem with how to handle a servlet with the env-entry myresource=value1 when another has myresource=value2. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-03-15 07:46 Message: Logged In: NO I think the problem starts when multiple developers are using XDoclet on multiple servlets. In this case, it will be easier just to ask the developers to add in the resource- ref for the servlets they are working on, rather than having to coordinate between developers just to decide which particular one servlet to put the resource-ref into. ---------------------------------------------------------------------- Comment By: Vincent Harcq (vharcq) Date: 2002-03-14 21:15 Message: Logged In: YES user_id=125677 Yep, the same occurs on ejb side if i remember well. I am not sure I want to solve that asap. We woud need a TagHandler and it is quite boring for such a simple tag. What I do is only define this in one "bean" so I have no problem. This parameter is also a good candidate for a merge because it is the kind of value that should be completely out of the sources. I drop down the priority. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=402704&aid=527254&group_id=31602 _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
