Skip to content

Instantly share code, notes, and snippets.

@pfrayer
Created January 7, 2015 09:29
Show Gist options
  • Save pfrayer/5c35d13e3f5f0fa3936f to your computer and use it in GitHub Desktop.
Save pfrayer/5c35d13e3f5f0fa3936f to your computer and use it in GitHub Desktop.
Get all loaded beans in Seam 2
public void test(){
Context context = Contexts.getApplicationContext();
for (String name: context.getNames()) {
Object object = context.get(name);
if(object instanceof org.jboss.seam.Component) {
Component component = (Component) object;
if(component.isStartup()){
System.out.println(component.getName()+"-"+component.getType()+"-"+component.getScope()+"-"+component.getTimeout()+"-"+component.isStartup()+"-"+component.isSynchronize());
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment