Skip to content

Instantly share code, notes, and snippets.

@mojavelinux
Created October 24, 2010 23:02
Show Gist options
  • Save mojavelinux/644116 to your computer and use it in GitHub Desktop.
Save mojavelinux/644116 to your computer and use it in GitHub Desktop.
Example of using the resource producer from Seam Solder to inject descriptor instances
public class ConfigInfo
{
@Inject @Standard
private WebAppDescriptor webXml;
@Inject @Resource("WEB-INF/beans.xml")
private BeansDescriptor beansXml;
public int getFilterCount()
{
return webXml.getFilters().size();
}
public int getActiveInterceptorCount()
{
beansXml.getInterceptors().size();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment