FILE COMPARISON Produced: 7/13/2007 6:03:03 PM Mode: Differences with Context Left file: C:\Documents and Settings\cdelahun.ST-MDC\Local Settings\Temp\TCVef48.tmp\EntityManagerSetupImpl.1.56.java Right file: C:\Glassfish\glassfish\entity-persistence\src\java\oracle\toplink\essentials\internal\ejb\cmp3\EntityManagerSetupImpl.java 97 protected int factoryCount = 0; = 97 protected int factoryCount = 0; 98 protected ServerSession session = null; 98 protected ServerSession session = null; 99 // true if predeploy called by createContainerEntityManagerFactory; false - createEntityManagerFactory 99 // true if predeploy called by createContainerEntityManagerFactory; false - createEntityManagerFactory 100 protected boolean isInContainerMode = false; 100 protected boolean isInContainerMode = false; 101 // indicates whether weaving was used on the first run through predeploy (in STATE_INITIAL) 101 // indicates whether weaving was used on the first run through predeploy (in STATE_INITIAL) 102 protected boolean enableLazyForOneToOne = false; 102 protected boolean enableLazyForOneToOne = false; ------------------------------------------------------------------------ <> 103 // indicates that classes have already been woven 104 protected boolean isWeavingStatic = false; ------------------------------------------------------------------------ 103 protected SecurableObjectHolder securableObjectHolder = new SecurableObjectHolder(); = 105 protected SecurableObjectHolder securableObjectHolder = new SecurableObjectHolder(); 104 106 105 // factoryCount==0; session==null 107 // factoryCount==0; session==null 106 public static final String STATE_INITIAL = "Initial"; 108 public static final String STATE_INITIAL = "Initial"; 107 109 108 // session != null 110 // session != null ------------------------------------------------------------------------ ------------------------------------------------------------------------ 581 } = 583 } 582 } 584 } 583 585 584 // this flag is used to disable work done as a result of the LAZY hint on OneToOne mappings 586 // this flag is used to disable work done as a result of the LAZY hint on OneToOne mappings 585 if(state == STATE_INITIAL || state == STATE_UNDEPLOYED) { 587 if(state == STATE_INITIAL || state == STATE_UNDEPLOYED) { 586 enableLazyForOneToOne = true; 588 enableLazyForOneToOne = true; ------------------------------------------------------------------------ -+ 589 isWeavingStatic = false; ------------------------------------------------------------------------ 587 String weaving = getConfigPropertyAsString(TopLinkProperties.WEAVING); = 590 String weaving = getConfigPropertyAsString(TopLinkProperties.WEAVING); 588 if (weaving != null && weaving.equalsIgnoreCase("false")) { 591 if (weaving != null && weaving.equalsIgnoreCase("false")) { 589 enableLazyForOneToOne = false; 592 enableLazyForOneToOne = false; ------------------------------------------------------------------------ -+ 593 }else if (weaving != null && weaving.equalsIgnoreCase("static")) { 594 isWeavingStatic = true; ------------------------------------------------------------------------ 590 } = 595 } 591 } 596 } 592 597 593 boolean throwExceptionOnFail = "true".equalsIgnoreCase( 598 boolean throwExceptionOnFail = "true".equalsIgnoreCase( 594 EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(EntityManagerFactoryProvider.TOPLINK_ORM_THROW_EXCEPTIONS, predeployProperties, "true", session)); 599 EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(EntityManagerFactoryProvider.TOPLINK_ORM_THROW_EXCEPTIONS, predeployProperties, "true", session)); 595 600 ------------------------------------------------------------------------ ------------------------------------------------------------------------ 621 // but rather done by JavaSECMPInitializer.callPredeploy (typically in preMain). = 626 // but rather done by JavaSECMPInitializer.callPredeploy (typically in preMain). 622 if((state != STATE_INITIAL && state != STATE_UNDEPLOYED) || this.isInContainerMode()) { 627 if((state != STATE_INITIAL && state != STATE_UNDEPLOYED) || this.isInContainerMode()) { 623 factoryCount++; 628 factoryCount++; 624 } 629 } 625 state = STATE_PREDEPLOYED; 630 state = STATE_PREDEPLOYED; 626 session.log(SessionLog.FINEST, SessionLog.PROPERTIES, "predeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, factoryCount}); 631 session.log(SessionLog.FINEST, SessionLog.PROPERTIES, "predeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, factoryCount}); ------------------------------------------------------------------------ <> 632 //gf3146: if static weaving is used, we should not return a transformer. Transformer should still be created though as it modifies descriptros 633 if (isWeavingStatic) { 634 return null; 635 } else { 627 return transformer; 636 return transformer; 637 } ------------------------------------------------------------------------ 628 } catch (RuntimeException ex) { = 638 } catch (RuntimeException ex) { 629 state = STATE_PREDEPLOY_FAILED; 639 state = STATE_PREDEPLOY_FAILED; 630 session = null; 640 session = null; 631 throw new PersistenceException(EntityManagerSetupException.predeployFailed(persistenceUnitInfo.getPersistenceUnitName(), ex)); 641 throw new PersistenceException(EntityManagerSetupException.predeployFailed(persistenceUnitInfo.getPersistenceUnitName(), ex)); 632 } 642 } 633 } 643 } ------------------------------------------------------------------------