<meta http-equiv="content-type" content="text/html; charset=utf-8">Seam 3 module writers,<div><br>Be sure that if you are producing a common type for internal use, such as a javax.naming.Context, that you qualify it to your module (or purpose). Otherwise, any other module that provides that type will conflict with your module (AmbigousResolutionException).<div>
<br>Here&#39;s an example:</div><div><br>   @Produces<br>   public Context getContext() throws NamingException<br>   {<br>      return new InitialContext();<br>   }</div><div><br>Here&#39;s another:</div><div><br>   public @Produces @ConversationScoped EntityManager getEntityManager()<br>
   {<br>      return entityManager;<br>   }</div><div><br>These should be qualified. In the first case, perhaps something like this for the foobar module:</div><div><br>@Produces @org.jboss.seam.foobar.annotations.Module<br>
public Context getContext() throws NamingException<br>{<br>   return new InitialContext();<br>}</div><div><br>If the type is common, but your module is expected to produce it, then it&#39;s okay for it to be unqualified (@Default qualifier). For example, the international module may be expected to produce a java.util.Locale. The developer shouldn&#39;t use two international modules, so this is fine. I would call this a @Default type which your module <i>exports</i>. It would be good to provide this list in your documentation.</div>
<div><br>If you have any feedback or additional suggestions, feel free to comment.</div><div><br><div>Dan</div><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br>
<br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br><a href="http://www.google.com/profiles/dan.j.allen">http://www.google.com/profiles/dan.j.allen</a><br>

</div></div>