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).
Here's an example:
@Produces
public Context getContext() throws NamingException
{
return new InitialContext();
}
Here's another:
public @Produces @ConversationScoped EntityManager getEntityManager()
{
return entityManager;
}
These should be qualified. In the first case, perhaps something like this for the foobar module:
@Produces @org.jboss.seam.foobar.annotations.Module
public Context getContext() throws NamingException
{
return new InitialContext();
}
If the type is common, but your module is expected to produce it, then it'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't use two international modules, so this is fine. I would call this a @Default type which your module exports. It would be good to provide this list in your documentation.
If you have any feedback or additional suggestions, feel free to comment.