[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-2908) Component.callCreateMethod exception handling

Pete Muir (JIRA) jira-events at lists.jboss.org
Fri Apr 18 10:50:44 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-2908?page=all ]

Pete Muir updated JBSEAM-2908:
------------------------------

    Fix Version/s: 2.0.2.CR2
                   2.1.0.BETA1

> 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
>             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: 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