[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-1325) Entity component does not properly cache Entity instances in application context
Gavin King (JIRA)
jira-events at lists.jboss.org
Thu May 17 17:46:52 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1325?page=all ]
Gavin King closed JBSEAM-1325.
------------------------------
Fix Version/s: 1.3.0.BETA1
Resolution: Done
Assignee: Gavin King
thanks, fixed
> Entity component does not properly cache Entity instances in application context
> --------------------------------------------------------------------------------
>
> Key: JBSEAM-1325
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1325
> Project: JBoss Seam
> Issue Type: Bug
> Affects Versions: 1.2.1.GA, 1.2.0.GA
> Reporter: Chris Rudd
> Assigned To: Gavin King
> Fix For: 1.3.0.BETA1
>
>
> The Entity.forClass method does not put the newly created Entity instance into the application context corectly. In the set its using set(name, model) instead of set(name,entity).
> public static Entity forClass(Class clazz)
> {
> if ( !Contexts.isApplicationContextActive() )
> {
> throw new IllegalStateException("No application context active");
> }
>
> String name = getModelName(clazz);
> Model model = (Model) Contexts.getApplicationContext().get(name);
> if ( model==null || !(model instanceof Entity) )
> {
> Entity entity = new Entity(clazz);
> Contexts.getApplicationContext().set(name, model);
> return entity;
> }
> else
> {
> return (Entity) model;
> }
> }
--
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