]
Norman Richards reassigned JBSEAM-2908:
---------------------------------------
Assignee: Norman Richards
Component.callCreateMethod exception handling
---------------------------------------------
Key: JBSEAM-2908
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2908
Project: Seam
Issue Type: Bug
Affects Versions: 2.0.1.GA
Reporter: Sergey Petrakovsky
Assigned To: Norman Richards
Fix For: 2.0.2.CR2, 2.1.0.BETA1
If any exception occurs in component's create method, it still will be created in
context, but will not be initialized correctly. Using of this component results many
troubles. Component will be recreated only in another scope (if it's session scoped -
in another session!).
Component should be removed from conext if any exception was thrown.
Component.java:
......2050..
Object instance;
try{
instance = instantiate();
if (getScope()!=STATELESS) {
//put it in the context _before_ calling postconstuct or create
getScope().getContext().set(name, instance);
}
postConstruct(instance);
if (getScope()!=STATELESS) {
callCreateMethod(instance);
if (Events.exists()) {
Events.instance().raiseEvent("org.jboss.seam.postCreate." +
name, instance);
}
}
} catch (Exception e) {
//getScope().getContext().remove(name);
throw new InstantiationException("Could not instantiate Seam component:
" + name, e);
}
....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: