Created
January 7, 2015 09:29
-
-
Save pfrayer/5c35d13e3f5f0fa3936f to your computer and use it in GitHub Desktop.
Get all loaded beans in Seam 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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