Question

Can anyone please suggest to me how to initialize org.jboss.seam.contexts Context as well as session context inside IR?

I need to do it for my testing purposes.

Was it helpful?

Solution

You need to first create an application context and set the property.

Context appContext = new ApplicationContext();
// Set a value
appContext.set("flagvalue", new Object());
// Get a value
Contexts.getSessionContext().get("flagvalue");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top