[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2908) Component.callCreateMethod exception handling
Sergey Petrakovsky (JIRA)
jira-events at lists.jboss.org
Fri Apr 18 07:28:54 EDT 2008
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
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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list