================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.46 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider.java Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.46 Mon May 29 13:11:46 2006 *************** *** 47,52 **** --- 47,55 ---- public class EntityManagerFactoryProvider implements javax.persistence.spi.PersistenceProvider { + //TEMPORARY + public static boolean useRepeatablePreDeploy = false; + // The following constants are used in persistence xml or in createSessionManagerFactory methods to specify properties. // Many property declarations were moved to oracle.toplink.essentials.config.TopLinkProperties class. *************** *** 117,127 **** } JavaSECMPInitializer initializer = JavaSECMPInitializer.getJavaSECMPInitializer(nonNullProperties); EntityManagerSetupImpl emSetupImpl = initializer.getEntityManagerSetupImpl(name); ! if(emSetupImpl.isUndeployed()) { ! ((SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo()).setClassLoader(JavaSECMPInitializer.getMainLoader()); ! ((SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo()).setNewTempClassLoader(JavaSECMPInitializer.getMainLoader()); ! // the first parameter is ignored if predeploy called after undeploy ! emSetupImpl.predeploy(null, nonNullProperties); } EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties); --- 120,131 ---- } JavaSECMPInitializer initializer = JavaSECMPInitializer.getJavaSECMPInitializer(nonNullProperties); EntityManagerSetupImpl emSetupImpl = initializer.getEntityManagerSetupImpl(name); ! if(useRepeatablePreDeploy) { ! if(emSetupImpl.isUndeployed()) { ! ((SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo()).setClassLoader(JavaSECMPInitializer.getMainLoader()); ! // the first parameter is ignored if predeploy called after undeploy ! emSetupImpl.predeploy(null, nonNullProperties); ! } } EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties); *************** *** 147,156 **** Map nonNullProperties = (properties == null) ? new HashMap() : properties; EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(); emSetupImpl.setIsInContainerMode(true); ! ClassTransformer transformer = null; ! if(!emSetupImpl.isDeployed()) { ! transformer = emSetupImpl.predeploy(info, nonNullProperties); ! } if (transformer != null){ info.addTransformer(transformer); } --- 151,157 ---- Map nonNullProperties = (properties == null) ? new HashMap() : properties; EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(); emSetupImpl.setIsInContainerMode(true); ! ClassTransformer transformer = emSetupImpl.predeploy(info, nonNullProperties); if (transformer != null){ info.addTransformer(transformer); } ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/mappings/OneToOneMapping.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.15 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/mappings/OneToOneMapping.java Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.15 Mon May 29 13:12:01 2006 *************** *** 680,689 **** Expression criteria; Expression builder = new ExpressionBuilder(); ! for (Iterator entries = getSourceToTargetKeyFields().entrySet().iterator(); entries.hasNext();) { ! Map.Entry entry = (Map.Entry) entries.next(); ! DatabaseField foreignKey = (DatabaseField)entry.getKey(); ! DatabaseField targetKey = (DatabaseField)entry.getValue(); Expression expression = builder.getField(targetKey).equal(builder.getParameter(foreignKey)); criteria = expression.and(getSelectionCriteria()); setSelectionCriteria(criteria); --- 680,689 ---- Expression criteria; Expression builder = new ExpressionBuilder(); ! for (Iterator keys = getSourceToTargetKeyFields().keySet().iterator(); keys.hasNext();) { ! DatabaseField foreignKey = (DatabaseField)keys.next(); ! DatabaseField targetKey = (DatabaseField)getSourceToTargetKeyFields().get(foreignKey); ! Expression expression = builder.getField(targetKey).equal(builder.getParameter(foreignKey)); criteria = expression.and(getSelectionCriteria()); setSelectionCriteria(criteria); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.67 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.67 Mon May 29 13:12:27 2006 *************** *** 81,87 **** protected ServerSession session = null; protected boolean isInContainerMode = false; // indicates whether weaving was used on the first run through predeploy (in STATE_INITIAL) ! protected boolean enableLazyForOneToOne = false; public static final String STATE_INITIAL = "Initial"; public static final String STATE_PREDEPLOYED = "Predeployed"; --- 81,89 ---- protected ServerSession session = null; protected boolean isInContainerMode = false; // indicates whether weaving was used on the first run through predeploy (in STATE_INITIAL) ! protected boolean enableLazyForOneToOneInitial; ! ! public static final String STATIC_WEAVING = "toplink.weaving.static-only"; public static final String STATE_INITIAL = "Initial"; public static final String STATE_PREDEPLOYED = "Predeployed"; *************** *** 201,207 **** } if(state == STATE_UNDEPLOYED) { ! throw new PersistenceException(EntityManagerSetupException.cannotDeployWithoutPredeploy(persistenceUnitInfo.getPersistenceUnitName())); } Map deployProperties = EntityManagerFactoryProvider.mergeMaps(additionalProperties, predeployProperties); --- 203,213 ---- } if(state == STATE_UNDEPLOYED) { ! if(EntityManagerFactoryProvider.useRepeatablePreDeploy) { ! throw new PersistenceException(EntityManagerSetupException.cannotDeployWithoutPredeploy(persistenceUnitInfo.getPersistenceUnitName())); ! } else { ! this.addSessionToGlobalSessionManager(); ! } } Map deployProperties = EntityManagerFactoryProvider.mergeMaps(additionalProperties, predeployProperties); *************** *** 496,514 **** } // this flag is used to disable work done as a result of the LAZY hint on OneToOne mappings if(state == STATE_INITIAL ) { enableLazyForOneToOne = true; String weaving = getConfigPropertyAsString(TopLinkProperties.WEAVING); if (weaving != null && weaving.equalsIgnoreCase("false")) { enableLazyForOneToOne = false; } } // ORM XML is processed first since it will be the winner any time there is a conflict ! processEntityMappingsXML(privateClassLoader, session, entities, enableLazyForOneToOne); // Annotations are processed second and provide values for anything unspecified in XML ! processor = new EJBAnnotationsProcessor(session, privateClassLoader, enableLazyForOneToOne, entityMappingsProcessor.getDescriptorMetadataMap(), entityMappingsProcessor.getMetadataProject()); session = (ServerSession)processor.processORAnnotations(); // The connector will be reconstructed when the session is actually deployed --- 502,530 ---- } // this flag is used to disable work done as a result of the LAZY hint on OneToOne mappings + boolean enableLazyForOneToOne = false; + boolean oneToOneStaticWeaving = false; if(state == STATE_INITIAL ) { enableLazyForOneToOne = true; String weaving = getConfigPropertyAsString(TopLinkProperties.WEAVING); + String isStaticWeavingInProgress = getConfigPropertyAsString(STATIC_WEAVING, "false"); if (weaving != null && weaving.equalsIgnoreCase("false")) { enableLazyForOneToOne = false; + } else if (!isStaticWeavingInProgress.equalsIgnoreCase("true") && weaving != null && weaving.equalsIgnoreCase("static")){ + oneToOneStaticWeaving = true; } + enableLazyForOneToOneInitial = enableLazyForOneToOne; + } else /*if(state == STATE_UNDEPLOYED)*/ { + // Never weave after undeploy + oneToOneStaticWeaving = enableLazyForOneToOneInitial; + enableLazyForOneToOne = false; } // ORM XML is processed first since it will be the winner any time there is a conflict ! processEntityMappingsXML(privateClassLoader, session, entities, enableLazyForOneToOne, oneToOneStaticWeaving); // Annotations are processed second and provide values for anything unspecified in XML ! processor = new EJBAnnotationsProcessor(session, privateClassLoader, enableLazyForOneToOne, oneToOneStaticWeaving, entityMappingsProcessor.getDescriptorMetadataMap(), entityMappingsProcessor.getMetadataProject()); session = (ServerSession)processor.processORAnnotations(); // The connector will be reconstructed when the session is actually deployed *************** *** 675,682 **** } } ! private void processEntityMappingsXML(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne){ ! entityMappingsProcessor = new EntityMappingsXMLProcessor(enableLazyForOneToOne); entityMappingsProcessor.setClassLoader(privateClassLoader); List mappingFileStreams = new Vector(); --- 691,698 ---- } } ! private void processEntityMappingsXML(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving){ ! entityMappingsProcessor = new EntityMappingsXMLProcessor(enableLazyForOneToOne, oneToOneStaticWeaving); entityMappingsProcessor.setClassLoader(privateClassLoader); List mappingFileStreams = new Vector(); *************** *** 1076,1082 **** session.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); // session is about to be null-ified - save it for the last log ServerSession tempSession = session; ! session = null; deploymentLock.release(); tempSession.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); } --- 1092,1100 ---- session.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); // session is about to be null-ified - save it for the last log ServerSession tempSession = session; ! if(EntityManagerFactoryProvider.useRepeatablePreDeploy) { ! session = null; ! } deploymentLock.release(); tempSession.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); } ================================================================================ Merge Diffs: /ade/tware_toplink10i/tltest/resource/essentials/ejb30-testing/META-INF/orm-annotation-merge-relationships-entity-mappings.xml vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.5 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tltest/resource/essentials/ejb30-testing/META-INF/orm-annotation-merge-relationships-entity-mappings.xml Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.5 Mon May 29 13:19:28 2006 *************** *** 14,20 **** SELECT OBJECT(item) FROM XMLMergeItem item WHERE item.name = ?1 ! --- 14,20 ---- SELECT OBJECT(item) FROM XMLMergeItem item WHERE item.name = ?1 ! ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000010/AB0952363AC40CBFE034080020E8C54E.45 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000010/AB0952363AC40CBFE034080020E8C54E.45 Tue May 30 11:18:52 2006 *************** *** 77,84 **** import oracle.toplink.essentials.internal.ejb.cmp3.annotations.AnnotationsLogger; import oracle.toplink.essentials.internal.ejb.cmp3.annotations.columns.AnnotationsColumn; - import oracle.toplink.essentials.internal.weaving.TopLinkWeaved; - /** * Common metatata processor for the annotation and xml processors. * --- 77,82 ---- *************** *** 100,105 **** --- 98,106 ---- // Boolean to specify if we should weave for value holders. protected boolean m_enableLazyForOneToOne; + + // Boolean to specify whether classes have been weaved with valueholders + protected boolean m_oneToOneStaticWeaving; // Entities we need to go through a second time, that have relationships. protected HashSet m_relatedEntities; *************** *** 1959,1966 **** protected void setAccessorMethods(DatabaseMapping mapping, MetadataAccessor accessor) { MetadataDescriptor md = accessor.getMetadataDescriptor(); // if static weaving is used, we will used the well-known format for the method names weaving produces ! if (mapping.isOneToOneMapping() && ((OneToOneMapping)mapping).usesIndirection() && ! (TopLinkWeaved.class.isAssignableFrom(accessor.getMetadataDescriptor().getJavaClass()))){ mapping.setGetMethodName("_toplink_get" + mapping.getAttributeName() + "_vh"); mapping.setSetMethodName("_toplink_set" + mapping.getAttributeName() + "_vh"); } else if (md.usesPropertyAccess()) { --- 1960,1966 ---- protected void setAccessorMethods(DatabaseMapping mapping, MetadataAccessor accessor) { MetadataDescriptor md = accessor.getMetadataDescriptor(); // if static weaving is used, we will used the well-known format for the method names weaving produces ! if (m_oneToOneStaticWeaving && mapping.isOneToOneMapping() && ((OneToOneMapping)mapping).usesIndirection()){ mapping.setGetMethodName("_toplink_get" + mapping.getAttributeName() + "_vh"); mapping.setSetMethodName("_toplink_set" + mapping.getAttributeName() + "_vh"); } else if (md.usesPropertyAccess()) { ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/annotations/EJBAnnotationsProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000012/AB0952363AC40CBFE034080020E8C54E.129 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/annotations/EJBAnnotationsProcessor.java Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000012/AB0952363AC40CBFE034080020E8C54E.129 Tue May 30 11:36:14 2006 *************** *** 155,161 **** /** * INTERNAL: */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, Collection classes, boolean enableLazyForOneToOne) { m_loader = loader; m_classes = classes; m_session = session; --- 155,161 ---- /** * INTERNAL: */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, Collection classes, boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving) { m_loader = loader; m_classes = classes; m_session = session; *************** *** 164,169 **** --- 164,170 ---- m_metadataProject = new MetadataProject(); m_logger = new AnnotationsLogger(m_session); m_enableLazyForOneToOne = enableLazyForOneToOne; + m_oneToOneStaticWeaving = oneToOneStaticWeaving; m_relatedEntities = new HashSet(); m_entitiesWithQueries = new HashSet(); } *************** *** 172,179 **** * INTERNAL: * Called for XML/Annotation merging. */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, boolean enableLazyForOneToOne, HashMap metadataDescriptors, MetadataProject metadataProject) { ! this(session, loader, metadataDescriptors.keySet(), enableLazyForOneToOne); m_metadataProject = metadataProject; --- 173,180 ---- * INTERNAL: * Called for XML/Annotation merging. */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving, HashMap metadataDescriptors, MetadataProject metadataProject) { ! this(session, loader, metadataDescriptors.keySet(), enableLazyForOneToOne, oneToOneStaticWeaving); m_metadataProject = metadataProject; ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/xml/EntityMappingsXMLProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000013/AB0952363AC40CBFE034080020E8C54E.105 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/xml/EntityMappingsXMLProcessor.java Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000013/AB0952363AC40CBFE034080020E8C54E.105 Tue May 30 11:36:24 2006 *************** *** 110,117 **** /** * INTERNAL: */ ! public EntityMappingsXMLProcessor(boolean enableLazyForOneToOne) { m_enableLazyForOneToOne = enableLazyForOneToOne; m_namedQueries = new HashMap(); m_namedNativeQueries = new HashMap(); m_validator = new XMLValidator(); --- 110,118 ---- /** * INTERNAL: */ ! public EntityMappingsXMLProcessor(boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving) { m_enableLazyForOneToOne = enableLazyForOneToOne; + m_oneToOneStaticWeaving = oneToOneStaticWeaving; m_namedQueries = new HashMap(); m_namedNativeQueries = new HashMap(); m_validator = new XMLValidator(); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tltest/source/essentials/oracle/toplink/essentials/testing/tests/weaving/RelationshipWeaverTestSuite.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000014/AB0952363AC40CBFE034080020E8C54E.11 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tltest/source/essentials/oracle/toplink/essentials/testing/tests/weaving/RelationshipWeaverTestSuite.java Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000014/AB0952363AC40CBFE034080020E8C54E.11 Tue May 30 11:41:13 2006 *************** *** 83,89 **** Session session = new Project(new DatabaseLogin()).createServerSession(); session.setLogLevel(SessionLog.OFF); EJBAnnotationsProcessor eap = new EJBAnnotationsProcessor( ! (AbstractSession) session, setupClassLoader, entities, true); eap.processORAnnotations(); TopLinkWeaver tw = (TopLinkWeaver) TransformerFactory.createTransformer(session, entities, Thread.currentThread().getContextClassLoader()); --- 83,89 ---- Session session = new Project(new DatabaseLogin()).createServerSession(); session.setLogLevel(SessionLog.OFF); EJBAnnotationsProcessor eap = new EJBAnnotationsProcessor( ! (AbstractSession) session, setupClassLoader, entities, true, false); eap.processORAnnotations(); TopLinkWeaver tw = (TopLinkWeaver) TransformerFactory.createTransformer(session, entities, Thread.currentThread().getContextClassLoader()); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/xml/merge/relationships/Customer.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000015/AB0952363AC40CBFE034080020E8C54E.4 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/xml/merge/relationships/Customer.java Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000015/AB0952363AC40CBFE034080020E8C54E.4 Tue May 30 11:47:37 2006 *************** *** 50,56 **** public Customer() {} @Id ! @GeneratedValue(strategy=TABLE, generator="XML_MERGE_CUSTOMER_TABLE_GENERATOR") // This table generator is overridden in the XML, therefore it should // not be processed. If it is processed, because the table name is so long // it will cause an error. No error means everyone is happy. --- 50,56 ---- public Customer() {} @Id ! @GeneratedValue(strategy=TABLE, generator="XML_MERGE_CUSTOMER_GENERATOR_TABLE") // This table generator is overridden in the XML, therefore it should // not be processed. If it is processed, because the table name is so long // it will cause an error. No error means everyone is happy. ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/StaticWeaver.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000016/AB0952363AC40CBFE034080020E8C54E.1 Report generated at Tue May 30 13:48:11 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/StaticWeaver.java Tue May 30 13:48:11 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000016/AB0952363AC40CBFE034080020E8C54E.1 Tue May 30 13:07:10 2006 *************** *** 21,26 **** --- 21,27 ---- * -Dtoplink.weaving.output.path= * -Dtoplink.validation-only=true * -Dtoplink.weaving.overwrite.existing=true if you wish the output of static weaving to overwrite existing classes + * -Dtoplink.weaving.static-only=true * * Weaving will occur for all persistence units found on the classpath. */ ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.46 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.46 Mon May 29 13:11:46 2006 *************** *** 47,52 **** --- 47,55 ---- public class EntityManagerFactoryProvider implements javax.persistence.spi.PersistenceProvider { + //TEMPORARY + public static boolean useRepeatablePreDeploy = false; + // The following constants are used in persistence xml or in createSessionManagerFactory methods to specify properties. // Many property declarations were moved to oracle.toplink.essentials.config.TopLinkProperties class. *************** *** 117,127 **** } JavaSECMPInitializer initializer = JavaSECMPInitializer.getJavaSECMPInitializer(nonNullProperties); EntityManagerSetupImpl emSetupImpl = initializer.getEntityManagerSetupImpl(name); ! if(emSetupImpl.isUndeployed()) { ! ((SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo()).setClassLoader(JavaSECMPInitializer.getMainLoader()); ! ((SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo()).setNewTempClassLoader(JavaSECMPInitializer.getMainLoader()); ! // the first parameter is ignored if predeploy called after undeploy ! emSetupImpl.predeploy(null, nonNullProperties); } EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties); --- 120,131 ---- } JavaSECMPInitializer initializer = JavaSECMPInitializer.getJavaSECMPInitializer(nonNullProperties); EntityManagerSetupImpl emSetupImpl = initializer.getEntityManagerSetupImpl(name); ! if(useRepeatablePreDeploy) { ! if(emSetupImpl.isUndeployed()) { ! ((SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo()).setClassLoader(JavaSECMPInitializer.getMainLoader()); ! // the first parameter is ignored if predeploy called after undeploy ! emSetupImpl.predeploy(null, nonNullProperties); ! } } EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties); *************** *** 147,156 **** Map nonNullProperties = (properties == null) ? new HashMap() : properties; EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(); emSetupImpl.setIsInContainerMode(true); ! ClassTransformer transformer = null; ! if(!emSetupImpl.isDeployed()) { ! transformer = emSetupImpl.predeploy(info, nonNullProperties); ! } if (transformer != null){ info.addTransformer(transformer); } --- 151,157 ---- Map nonNullProperties = (properties == null) ? new HashMap() : properties; EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(); emSetupImpl.setIsInContainerMode(true); ! ClassTransformer transformer = emSetupImpl.predeploy(info, nonNullProperties); if (transformer != null){ info.addTransformer(transformer); } ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/mappings/OneToOneMapping.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.15 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/mappings/OneToOneMapping.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.15 Mon May 29 13:12:01 2006 *************** *** 680,689 **** Expression criteria; Expression builder = new ExpressionBuilder(); ! for (Iterator entries = getSourceToTargetKeyFields().entrySet().iterator(); entries.hasNext();) { ! Map.Entry entry = (Map.Entry) entries.next(); ! DatabaseField foreignKey = (DatabaseField)entry.getKey(); ! DatabaseField targetKey = (DatabaseField)entry.getValue(); Expression expression = builder.getField(targetKey).equal(builder.getParameter(foreignKey)); criteria = expression.and(getSelectionCriteria()); setSelectionCriteria(criteria); --- 680,689 ---- Expression criteria; Expression builder = new ExpressionBuilder(); ! for (Iterator keys = getSourceToTargetKeyFields().keySet().iterator(); keys.hasNext();) { ! DatabaseField foreignKey = (DatabaseField)keys.next(); ! DatabaseField targetKey = (DatabaseField)getSourceToTargetKeyFields().get(foreignKey); ! Expression expression = builder.getField(targetKey).equal(builder.getParameter(foreignKey)); criteria = expression.and(getSelectionCriteria()); setSelectionCriteria(criteria); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.67 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.67 Mon May 29 13:12:27 2006 *************** *** 81,87 **** protected ServerSession session = null; protected boolean isInContainerMode = false; // indicates whether weaving was used on the first run through predeploy (in STATE_INITIAL) ! protected boolean enableLazyForOneToOne = false; public static final String STATE_INITIAL = "Initial"; public static final String STATE_PREDEPLOYED = "Predeployed"; --- 81,89 ---- protected ServerSession session = null; protected boolean isInContainerMode = false; // indicates whether weaving was used on the first run through predeploy (in STATE_INITIAL) ! protected boolean enableLazyForOneToOneInitial; ! ! public static final String STATIC_WEAVING = "toplink.weaving.static-only"; public static final String STATE_INITIAL = "Initial"; public static final String STATE_PREDEPLOYED = "Predeployed"; *************** *** 201,207 **** } if(state == STATE_UNDEPLOYED) { ! throw new PersistenceException(EntityManagerSetupException.cannotDeployWithoutPredeploy(persistenceUnitInfo.getPersistenceUnitName())); } Map deployProperties = EntityManagerFactoryProvider.mergeMaps(additionalProperties, predeployProperties); --- 203,213 ---- } if(state == STATE_UNDEPLOYED) { ! if(EntityManagerFactoryProvider.useRepeatablePreDeploy) { ! throw new PersistenceException(EntityManagerSetupException.cannotDeployWithoutPredeploy(persistenceUnitInfo.getPersistenceUnitName())); ! } else { ! this.addSessionToGlobalSessionManager(); ! } } Map deployProperties = EntityManagerFactoryProvider.mergeMaps(additionalProperties, predeployProperties); *************** *** 496,514 **** } // this flag is used to disable work done as a result of the LAZY hint on OneToOne mappings if(state == STATE_INITIAL ) { enableLazyForOneToOne = true; String weaving = getConfigPropertyAsString(TopLinkProperties.WEAVING); if (weaving != null && weaving.equalsIgnoreCase("false")) { enableLazyForOneToOne = false; } } // ORM XML is processed first since it will be the winner any time there is a conflict ! processEntityMappingsXML(privateClassLoader, session, entities, enableLazyForOneToOne); // Annotations are processed second and provide values for anything unspecified in XML ! processor = new EJBAnnotationsProcessor(session, privateClassLoader, enableLazyForOneToOne, entityMappingsProcessor.getDescriptorMetadataMap(), entityMappingsProcessor.getMetadataProject()); session = (ServerSession)processor.processORAnnotations(); // The connector will be reconstructed when the session is actually deployed --- 502,530 ---- } // this flag is used to disable work done as a result of the LAZY hint on OneToOne mappings + boolean enableLazyForOneToOne = false; + boolean oneToOneStaticWeaving = false; if(state == STATE_INITIAL ) { enableLazyForOneToOne = true; String weaving = getConfigPropertyAsString(TopLinkProperties.WEAVING); + String isStaticWeavingInProgress = getConfigPropertyAsString(STATIC_WEAVING, "false"); if (weaving != null && weaving.equalsIgnoreCase("false")) { enableLazyForOneToOne = false; + } else if (!isStaticWeavingInProgress.equalsIgnoreCase("true") && weaving != null && weaving.equalsIgnoreCase("static")){ + oneToOneStaticWeaving = true; } + enableLazyForOneToOneInitial = enableLazyForOneToOne; + } else /*if(state == STATE_UNDEPLOYED)*/ { + // Never weave after undeploy + oneToOneStaticWeaving = enableLazyForOneToOneInitial; + enableLazyForOneToOne = false; } // ORM XML is processed first since it will be the winner any time there is a conflict ! processEntityMappingsXML(privateClassLoader, session, entities, enableLazyForOneToOne, oneToOneStaticWeaving); // Annotations are processed second and provide values for anything unspecified in XML ! processor = new EJBAnnotationsProcessor(session, privateClassLoader, enableLazyForOneToOne, oneToOneStaticWeaving, entityMappingsProcessor.getDescriptorMetadataMap(), entityMappingsProcessor.getMetadataProject()); session = (ServerSession)processor.processORAnnotations(); // The connector will be reconstructed when the session is actually deployed *************** *** 675,682 **** } } ! private void processEntityMappingsXML(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne){ ! entityMappingsProcessor = new EntityMappingsXMLProcessor(enableLazyForOneToOne); entityMappingsProcessor.setClassLoader(privateClassLoader); List mappingFileStreams = new Vector(); --- 691,698 ---- } } ! private void processEntityMappingsXML(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving){ ! entityMappingsProcessor = new EntityMappingsXMLProcessor(enableLazyForOneToOne, oneToOneStaticWeaving); entityMappingsProcessor.setClassLoader(privateClassLoader); List mappingFileStreams = new Vector(); *************** *** 1076,1082 **** session.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); // session is about to be null-ified - save it for the last log ServerSession tempSession = session; ! session = null; deploymentLock.release(); tempSession.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); } --- 1092,1100 ---- session.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); // session is about to be null-ified - save it for the last log ServerSession tempSession = session; ! if(EntityManagerFactoryProvider.useRepeatablePreDeploy) { ! session = null; ! } deploymentLock.release(); tempSession.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); } ================================================================================ Merge Diffs: /ade/tware_toplink10i/tltest/resource/essentials/ejb30-testing/META-INF/orm-annotation-merge-relationships-entity-mappings.xml vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.5 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tltest/resource/essentials/ejb30-testing/META-INF/orm-annotation-merge-relationships-entity-mappings.xml Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.5 Mon May 29 13:19:28 2006 *************** *** 14,20 **** SELECT OBJECT(item) FROM XMLMergeItem item WHERE item.name = ?1 ! --- 14,20 ---- SELECT OBJECT(item) FROM XMLMergeItem item WHERE item.name = ?1 ! ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000010/AB0952363AC40CBFE034080020E8C54E.45 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000010/AB0952363AC40CBFE034080020E8C54E.45 Tue May 30 11:18:52 2006 *************** *** 77,84 **** import oracle.toplink.essentials.internal.ejb.cmp3.annotations.AnnotationsLogger; import oracle.toplink.essentials.internal.ejb.cmp3.annotations.columns.AnnotationsColumn; - import oracle.toplink.essentials.internal.weaving.TopLinkWeaved; - /** * Common metatata processor for the annotation and xml processors. * --- 77,82 ---- *************** *** 100,105 **** --- 98,106 ---- // Boolean to specify if we should weave for value holders. protected boolean m_enableLazyForOneToOne; + + // Boolean to specify whether classes have been weaved with valueholders + protected boolean m_oneToOneStaticWeaving; // Entities we need to go through a second time, that have relationships. protected HashSet m_relatedEntities; *************** *** 1959,1966 **** protected void setAccessorMethods(DatabaseMapping mapping, MetadataAccessor accessor) { MetadataDescriptor md = accessor.getMetadataDescriptor(); // if static weaving is used, we will used the well-known format for the method names weaving produces ! if (mapping.isOneToOneMapping() && ((OneToOneMapping)mapping).usesIndirection() && ! (TopLinkWeaved.class.isAssignableFrom(accessor.getMetadataDescriptor().getJavaClass()))){ mapping.setGetMethodName("_toplink_get" + mapping.getAttributeName() + "_vh"); mapping.setSetMethodName("_toplink_set" + mapping.getAttributeName() + "_vh"); } else if (md.usesPropertyAccess()) { --- 1960,1966 ---- protected void setAccessorMethods(DatabaseMapping mapping, MetadataAccessor accessor) { MetadataDescriptor md = accessor.getMetadataDescriptor(); // if static weaving is used, we will used the well-known format for the method names weaving produces ! if (m_oneToOneStaticWeaving && mapping.isOneToOneMapping() && ((OneToOneMapping)mapping).usesIndirection()){ mapping.setGetMethodName("_toplink_get" + mapping.getAttributeName() + "_vh"); mapping.setSetMethodName("_toplink_set" + mapping.getAttributeName() + "_vh"); } else if (md.usesPropertyAccess()) { ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/annotations/EJBAnnotationsProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000012/AB0952363AC40CBFE034080020E8C54E.129 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/annotations/EJBAnnotationsProcessor.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000012/AB0952363AC40CBFE034080020E8C54E.129 Tue May 30 11:36:14 2006 *************** *** 155,161 **** /** * INTERNAL: */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, Collection classes, boolean enableLazyForOneToOne) { m_loader = loader; m_classes = classes; m_session = session; --- 155,161 ---- /** * INTERNAL: */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, Collection classes, boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving) { m_loader = loader; m_classes = classes; m_session = session; *************** *** 164,169 **** --- 164,170 ---- m_metadataProject = new MetadataProject(); m_logger = new AnnotationsLogger(m_session); m_enableLazyForOneToOne = enableLazyForOneToOne; + m_oneToOneStaticWeaving = oneToOneStaticWeaving; m_relatedEntities = new HashSet(); m_entitiesWithQueries = new HashSet(); } *************** *** 172,179 **** * INTERNAL: * Called for XML/Annotation merging. */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, boolean enableLazyForOneToOne, HashMap metadataDescriptors, MetadataProject metadataProject) { ! this(session, loader, metadataDescriptors.keySet(), enableLazyForOneToOne); m_metadataProject = metadataProject; --- 173,180 ---- * INTERNAL: * Called for XML/Annotation merging. */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving, HashMap metadataDescriptors, MetadataProject metadataProject) { ! this(session, loader, metadataDescriptors.keySet(), enableLazyForOneToOne, oneToOneStaticWeaving); m_metadataProject = metadataProject; ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/xml/EntityMappingsXMLProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000013/AB0952363AC40CBFE034080020E8C54E.105 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/xml/EntityMappingsXMLProcessor.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000013/AB0952363AC40CBFE034080020E8C54E.105 Tue May 30 11:36:24 2006 *************** *** 110,117 **** /** * INTERNAL: */ ! public EntityMappingsXMLProcessor(boolean enableLazyForOneToOne) { m_enableLazyForOneToOne = enableLazyForOneToOne; m_namedQueries = new HashMap(); m_namedNativeQueries = new HashMap(); m_validator = new XMLValidator(); --- 110,118 ---- /** * INTERNAL: */ ! public EntityMappingsXMLProcessor(boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving) { m_enableLazyForOneToOne = enableLazyForOneToOne; + m_oneToOneStaticWeaving = oneToOneStaticWeaving; m_namedQueries = new HashMap(); m_namedNativeQueries = new HashMap(); m_validator = new XMLValidator(); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tltest/source/essentials/oracle/toplink/essentials/testing/tests/weaving/RelationshipWeaverTestSuite.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000014/AB0952363AC40CBFE034080020E8C54E.11 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tltest/source/essentials/oracle/toplink/essentials/testing/tests/weaving/RelationshipWeaverTestSuite.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000014/AB0952363AC40CBFE034080020E8C54E.11 Tue May 30 11:41:13 2006 *************** *** 83,89 **** Session session = new Project(new DatabaseLogin()).createServerSession(); session.setLogLevel(SessionLog.OFF); EJBAnnotationsProcessor eap = new EJBAnnotationsProcessor( ! (AbstractSession) session, setupClassLoader, entities, true); eap.processORAnnotations(); TopLinkWeaver tw = (TopLinkWeaver) TransformerFactory.createTransformer(session, entities, Thread.currentThread().getContextClassLoader()); --- 83,89 ---- Session session = new Project(new DatabaseLogin()).createServerSession(); session.setLogLevel(SessionLog.OFF); EJBAnnotationsProcessor eap = new EJBAnnotationsProcessor( ! (AbstractSession) session, setupClassLoader, entities, true, false); eap.processORAnnotations(); TopLinkWeaver tw = (TopLinkWeaver) TransformerFactory.createTransformer(session, entities, Thread.currentThread().getContextClassLoader()); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/xml/merge/relationships/Customer.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000015/AB0952363AC40CBFE034080020E8C54E.4 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/xml/merge/relationships/Customer.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000015/AB0952363AC40CBFE034080020E8C54E.4 Tue May 30 11:47:37 2006 *************** *** 50,56 **** public Customer() {} @Id ! @GeneratedValue(strategy=TABLE, generator="XML_MERGE_CUSTOMER_TABLE_GENERATOR") // This table generator is overridden in the XML, therefore it should // not be processed. If it is processed, because the table name is so long // it will cause an error. No error means everyone is happy. --- 50,56 ---- public Customer() {} @Id ! @GeneratedValue(strategy=TABLE, generator="XML_MERGE_CUSTOMER_GENERATOR_TABLE") // This table generator is overridden in the XML, therefore it should // not be processed. If it is processed, because the table name is so long // it will cause an error. No error means everyone is happy. ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/StaticWeaver.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000016/AB0952363AC40CBFE034080020E8C54E.1 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/StaticWeaver.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000016/AB0952363AC40CBFE034080020E8C54E.1 Tue May 30 13:07:10 2006 *************** *** 21,26 **** --- 21,27 ---- * -Dtoplink.weaving.output.path= * -Dtoplink.validation-only=true * -Dtoplink.weaving.overwrite.existing=true if you wish the output of static weaving to overwrite existing classes + * -Dtoplink.weaving.static-only=true * * Weaving will occur for all persistence units found on the classpath. */ ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/LoggingLocalizationResource.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000021/AB0952363AC40CBFE034080020E8C54E.23 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/LoggingLocalizationResource.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000021/AB0952363AC40CBFE034080020E8C54E.23 Wed May 31 15:55:34 2006 *************** *** 246,253 **** { "weaver_disable_by_system_property", "Weaving disabled by system property {0}"}, { "weaver_change_tracking_disabled_missing_field", "Weaving for change tracking not enabled for class [{0}] because it does not have field [{1}]."}, { "weaver_change_tracking_disabled_not_supported", "Weaving for change tracking not enabled for class [{0}] because it is not supported by the mapping for field [{1}]."}, ! { "weaver_not_overwriting", "Weaver is not overwriting class {0} because it has not been set to overwrite."}, ! { "weaver_could_not_write", "Weaver encountered an exception while trying to write class {0} to the file system. The exception was: {1}"}, { "field_type_set_to_java_lang_string", "The default table generator could not locate or convert a java type ({1}) into a database type for database field ({0}). The generator uses 'java.lang.String' as default java type for the field." }, { "relational_descriptor_support_only", "The default table generator currently only supports generating default table schema from a relational project."}, --- 246,252 ---- { "weaver_disable_by_system_property", "Weaving disabled by system property {0}"}, { "weaver_change_tracking_disabled_missing_field", "Weaving for change tracking not enabled for class [{0}] because it does not have field [{1}]."}, { "weaver_change_tracking_disabled_not_supported", "Weaving for change tracking not enabled for class [{0}] because it is not supported by the mapping for field [{1}]."}, ! { "weaver_not_overwriting", "Weaver is not overwriting class {1} because it has not been set to overwrite."}, { "field_type_set_to_java_lang_string", "The default table generator could not locate or convert a java type ({1}) into a database type for database field ({0}). The generator uses 'java.lang.String' as default java type for the field." }, { "relational_descriptor_support_only", "The default table generator currently only supports generating default table schema from a relational project."}, ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/weaving/TopLinkWeaver.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000022/AB0952363AC40CBFE034080020E8C54E.12 Report generated at Thu Jun 1 09:12:37 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/weaving/TopLinkWeaver.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000022/AB0952363AC40CBFE034080020E8C54E.12 Wed May 31 15:56:06 2006 *************** *** 50,56 **** public static final String WEAVING_OUTPUT_PATH = "toplink.weaving.output.path"; public static final String WEAVING_SHOULD_OVERWRITE = "toplink.weaving.overwrite.existing"; public static final String WEAVER_NOT_OVERWRITING = "weaver_not_overwriting"; - public static final String WEAVER_COULD_NOT_WRITE = "weaver_could_not_write"; protected Session session; // for logging // Map where the key is className in JVM '/' format --- 50,55 ---- *************** *** 135,142 **** fos.write(classBytes); fos.close(); } catch (Exception e){ ! ((oracle.toplink.essentials.internal.sessions.AbstractSession)session).log( ! SessionLog.WARNING, SessionLog.WEAVER, WEAVER_COULD_NOT_WRITE, className, e); } } --- 134,140 ---- fos.write(classBytes); fos.close(); } catch (Exception e){ ! e.printStackTrace(); } } ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.46 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.46 Mon May 29 13:11:46 2006 *************** *** 47,52 **** --- 47,55 ---- public class EntityManagerFactoryProvider implements javax.persistence.spi.PersistenceProvider { + //TEMPORARY + public static boolean useRepeatablePreDeploy = false; + // The following constants are used in persistence xml or in createSessionManagerFactory methods to specify properties. // Many property declarations were moved to oracle.toplink.essentials.config.TopLinkProperties class. *************** *** 117,127 **** } JavaSECMPInitializer initializer = JavaSECMPInitializer.getJavaSECMPInitializer(nonNullProperties); EntityManagerSetupImpl emSetupImpl = initializer.getEntityManagerSetupImpl(name); ! if(emSetupImpl.isUndeployed()) { ! ((SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo()).setClassLoader(JavaSECMPInitializer.getMainLoader()); ! ((SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo()).setNewTempClassLoader(JavaSECMPInitializer.getMainLoader()); ! // the first parameter is ignored if predeploy called after undeploy ! emSetupImpl.predeploy(null, nonNullProperties); } EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties); --- 120,131 ---- } JavaSECMPInitializer initializer = JavaSECMPInitializer.getJavaSECMPInitializer(nonNullProperties); EntityManagerSetupImpl emSetupImpl = initializer.getEntityManagerSetupImpl(name); ! if(useRepeatablePreDeploy) { ! if(emSetupImpl.isUndeployed()) { ! ((SEPersistenceUnitInfo)emSetupImpl.getPersistenceUnitInfo()).setClassLoader(JavaSECMPInitializer.getMainLoader()); ! // the first parameter is ignored if predeploy called after undeploy ! emSetupImpl.predeploy(null, nonNullProperties); ! } } EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties); *************** *** 147,156 **** Map nonNullProperties = (properties == null) ? new HashMap() : properties; EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(); emSetupImpl.setIsInContainerMode(true); ! ClassTransformer transformer = null; ! if(!emSetupImpl.isDeployed()) { ! transformer = emSetupImpl.predeploy(info, nonNullProperties); ! } if (transformer != null){ info.addTransformer(transformer); } --- 151,157 ---- Map nonNullProperties = (properties == null) ? new HashMap() : properties; EntityManagerSetupImpl emSetupImpl = new EntityManagerSetupImpl(); emSetupImpl.setIsInContainerMode(true); ! ClassTransformer transformer = emSetupImpl.predeploy(info, nonNullProperties); if (transformer != null){ info.addTransformer(transformer); } ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/mappings/OneToOneMapping.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.15 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/mappings/OneToOneMapping.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.15 Mon May 29 13:12:01 2006 *************** *** 680,689 **** Expression criteria; Expression builder = new ExpressionBuilder(); ! for (Iterator entries = getSourceToTargetKeyFields().entrySet().iterator(); entries.hasNext();) { ! Map.Entry entry = (Map.Entry) entries.next(); ! DatabaseField foreignKey = (DatabaseField)entry.getKey(); ! DatabaseField targetKey = (DatabaseField)entry.getValue(); Expression expression = builder.getField(targetKey).equal(builder.getParameter(foreignKey)); criteria = expression.and(getSelectionCriteria()); setSelectionCriteria(criteria); --- 680,689 ---- Expression criteria; Expression builder = new ExpressionBuilder(); ! for (Iterator keys = getSourceToTargetKeyFields().keySet().iterator(); keys.hasNext();) { ! DatabaseField foreignKey = (DatabaseField)keys.next(); ! DatabaseField targetKey = (DatabaseField)getSourceToTargetKeyFields().get(foreignKey); ! Expression expression = builder.getField(targetKey).equal(builder.getParameter(foreignKey)); criteria = expression.and(getSelectionCriteria()); setSelectionCriteria(criteria); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.67 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.67 Mon May 29 13:12:27 2006 *************** *** 81,87 **** protected ServerSession session = null; protected boolean isInContainerMode = false; // indicates whether weaving was used on the first run through predeploy (in STATE_INITIAL) ! protected boolean enableLazyForOneToOne = false; public static final String STATE_INITIAL = "Initial"; public static final String STATE_PREDEPLOYED = "Predeployed"; --- 81,89 ---- protected ServerSession session = null; protected boolean isInContainerMode = false; // indicates whether weaving was used on the first run through predeploy (in STATE_INITIAL) ! protected boolean enableLazyForOneToOneInitial; ! ! public static final String STATIC_WEAVING = "toplink.weaving.static-only"; public static final String STATE_INITIAL = "Initial"; public static final String STATE_PREDEPLOYED = "Predeployed"; *************** *** 201,207 **** } if(state == STATE_UNDEPLOYED) { ! throw new PersistenceException(EntityManagerSetupException.cannotDeployWithoutPredeploy(persistenceUnitInfo.getPersistenceUnitName())); } Map deployProperties = EntityManagerFactoryProvider.mergeMaps(additionalProperties, predeployProperties); --- 203,213 ---- } if(state == STATE_UNDEPLOYED) { ! if(EntityManagerFactoryProvider.useRepeatablePreDeploy) { ! throw new PersistenceException(EntityManagerSetupException.cannotDeployWithoutPredeploy(persistenceUnitInfo.getPersistenceUnitName())); ! } else { ! this.addSessionToGlobalSessionManager(); ! } } Map deployProperties = EntityManagerFactoryProvider.mergeMaps(additionalProperties, predeployProperties); *************** *** 496,514 **** } // this flag is used to disable work done as a result of the LAZY hint on OneToOne mappings if(state == STATE_INITIAL ) { enableLazyForOneToOne = true; String weaving = getConfigPropertyAsString(TopLinkProperties.WEAVING); if (weaving != null && weaving.equalsIgnoreCase("false")) { enableLazyForOneToOne = false; } } // ORM XML is processed first since it will be the winner any time there is a conflict ! processEntityMappingsXML(privateClassLoader, session, entities, enableLazyForOneToOne); // Annotations are processed second and provide values for anything unspecified in XML ! processor = new EJBAnnotationsProcessor(session, privateClassLoader, enableLazyForOneToOne, entityMappingsProcessor.getDescriptorMetadataMap(), entityMappingsProcessor.getMetadataProject()); session = (ServerSession)processor.processORAnnotations(); // The connector will be reconstructed when the session is actually deployed --- 502,530 ---- } // this flag is used to disable work done as a result of the LAZY hint on OneToOne mappings + boolean enableLazyForOneToOne = false; + boolean oneToOneStaticWeaving = false; if(state == STATE_INITIAL ) { enableLazyForOneToOne = true; String weaving = getConfigPropertyAsString(TopLinkProperties.WEAVING); + String isStaticWeavingInProgress = getConfigPropertyAsString(STATIC_WEAVING, "false"); if (weaving != null && weaving.equalsIgnoreCase("false")) { enableLazyForOneToOne = false; + } else if (!isStaticWeavingInProgress.equalsIgnoreCase("true") && weaving != null && weaving.equalsIgnoreCase("static")){ + oneToOneStaticWeaving = true; } + enableLazyForOneToOneInitial = enableLazyForOneToOne; + } else /*if(state == STATE_UNDEPLOYED)*/ { + // Never weave after undeploy + oneToOneStaticWeaving = enableLazyForOneToOneInitial; + enableLazyForOneToOne = false; } // ORM XML is processed first since it will be the winner any time there is a conflict ! processEntityMappingsXML(privateClassLoader, session, entities, enableLazyForOneToOne, oneToOneStaticWeaving); // Annotations are processed second and provide values for anything unspecified in XML ! processor = new EJBAnnotationsProcessor(session, privateClassLoader, enableLazyForOneToOne, oneToOneStaticWeaving, entityMappingsProcessor.getDescriptorMetadataMap(), entityMappingsProcessor.getMetadataProject()); session = (ServerSession)processor.processORAnnotations(); // The connector will be reconstructed when the session is actually deployed *************** *** 675,682 **** } } ! private void processEntityMappingsXML(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne){ ! entityMappingsProcessor = new EntityMappingsXMLProcessor(enableLazyForOneToOne); entityMappingsProcessor.setClassLoader(privateClassLoader); List mappingFileStreams = new Vector(); --- 691,698 ---- } } ! private void processEntityMappingsXML(ClassLoader privateClassLoader, AbstractSession session, Collection entities, boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving){ ! entityMappingsProcessor = new EntityMappingsXMLProcessor(enableLazyForOneToOne, oneToOneStaticWeaving); entityMappingsProcessor.setClassLoader(privateClassLoader); List mappingFileStreams = new Vector(); *************** *** 1076,1082 **** session.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); // session is about to be null-ified - save it for the last log ServerSession tempSession = session; ! session = null; deploymentLock.release(); tempSession.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); } --- 1092,1100 ---- session.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); // session is about to be null-ified - save it for the last log ServerSession tempSession = session; ! if(EntityManagerFactoryProvider.useRepeatablePreDeploy) { ! session = null; ! } deploymentLock.release(); tempSession.log(SessionLog.FINEST, SessionLog.PROPERTIES, "undeploy_end", new Object[]{getPersistenceUnitInfo().getPersistenceUnitName(), state, deploymentCount}); } ================================================================================ Merge Diffs: /ade/tware_toplink10i/tltest/resource/essentials/ejb30-testing/META-INF/orm-annotation-merge-relationships-entity-mappings.xml vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.5 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tltest/resource/essentials/ejb30-testing/META-INF/orm-annotation-merge-relationships-entity-mappings.xml Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000004/AB0952363AC40CBFE034080020E8C54E.5 Mon May 29 13:19:28 2006 *************** *** 14,20 **** SELECT OBJECT(item) FROM XMLMergeItem item WHERE item.name = ?1 ! --- 14,20 ---- SELECT OBJECT(item) FROM XMLMergeItem item WHERE item.name = ?1 ! ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000010/AB0952363AC40CBFE034080020E8C54E.45 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/metadata/MetadataProcessor.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000010/AB0952363AC40CBFE034080020E8C54E.45 Tue May 30 11:18:52 2006 *************** *** 77,84 **** import oracle.toplink.essentials.internal.ejb.cmp3.annotations.AnnotationsLogger; import oracle.toplink.essentials.internal.ejb.cmp3.annotations.columns.AnnotationsColumn; - import oracle.toplink.essentials.internal.weaving.TopLinkWeaved; - /** * Common metatata processor for the annotation and xml processors. * --- 77,82 ---- *************** *** 100,105 **** --- 98,106 ---- // Boolean to specify if we should weave for value holders. protected boolean m_enableLazyForOneToOne; + + // Boolean to specify whether classes have been weaved with valueholders + protected boolean m_oneToOneStaticWeaving; // Entities we need to go through a second time, that have relationships. protected HashSet m_relatedEntities; *************** *** 1959,1966 **** protected void setAccessorMethods(DatabaseMapping mapping, MetadataAccessor accessor) { MetadataDescriptor md = accessor.getMetadataDescriptor(); // if static weaving is used, we will used the well-known format for the method names weaving produces ! if (mapping.isOneToOneMapping() && ((OneToOneMapping)mapping).usesIndirection() && ! (TopLinkWeaved.class.isAssignableFrom(accessor.getMetadataDescriptor().getJavaClass()))){ mapping.setGetMethodName("_toplink_get" + mapping.getAttributeName() + "_vh"); mapping.setSetMethodName("_toplink_set" + mapping.getAttributeName() + "_vh"); } else if (md.usesPropertyAccess()) { --- 1960,1966 ---- protected void setAccessorMethods(DatabaseMapping mapping, MetadataAccessor accessor) { MetadataDescriptor md = accessor.getMetadataDescriptor(); // if static weaving is used, we will used the well-known format for the method names weaving produces ! if (m_oneToOneStaticWeaving && mapping.isOneToOneMapping() && ((OneToOneMapping)mapping).usesIndirection()){ mapping.setGetMethodName("_toplink_get" + mapping.getAttributeName() + "_vh"); mapping.setSetMethodName("_toplink_set" + mapping.getAttributeName() + "_vh"); } else if (md.usesPropertyAccess()) { ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/annotations/EJBAnnotationsProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000012/AB0952363AC40CBFE034080020E8C54E.129 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/annotations/EJBAnnotationsProcessor.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000012/AB0952363AC40CBFE034080020E8C54E.129 Tue May 30 11:36:14 2006 *************** *** 155,161 **** /** * INTERNAL: */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, Collection classes, boolean enableLazyForOneToOne) { m_loader = loader; m_classes = classes; m_session = session; --- 155,161 ---- /** * INTERNAL: */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, Collection classes, boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving) { m_loader = loader; m_classes = classes; m_session = session; *************** *** 164,169 **** --- 164,170 ---- m_metadataProject = new MetadataProject(); m_logger = new AnnotationsLogger(m_session); m_enableLazyForOneToOne = enableLazyForOneToOne; + m_oneToOneStaticWeaving = oneToOneStaticWeaving; m_relatedEntities = new HashSet(); m_entitiesWithQueries = new HashSet(); } *************** *** 172,179 **** * INTERNAL: * Called for XML/Annotation merging. */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, boolean enableLazyForOneToOne, HashMap metadataDescriptors, MetadataProject metadataProject) { ! this(session, loader, metadataDescriptors.keySet(), enableLazyForOneToOne); m_metadataProject = metadataProject; --- 173,180 ---- * INTERNAL: * Called for XML/Annotation merging. */ ! public EJBAnnotationsProcessor(AbstractSession session, ClassLoader loader, boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving, HashMap metadataDescriptors, MetadataProject metadataProject) { ! this(session, loader, metadataDescriptors.keySet(), enableLazyForOneToOne, oneToOneStaticWeaving); m_metadataProject = metadataProject; ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/xml/EntityMappingsXMLProcessor.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000013/AB0952363AC40CBFE034080020E8C54E.105 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/xml/EntityMappingsXMLProcessor.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000013/AB0952363AC40CBFE034080020E8C54E.105 Tue May 30 11:36:24 2006 *************** *** 110,117 **** /** * INTERNAL: */ ! public EntityMappingsXMLProcessor(boolean enableLazyForOneToOne) { m_enableLazyForOneToOne = enableLazyForOneToOne; m_namedQueries = new HashMap(); m_namedNativeQueries = new HashMap(); m_validator = new XMLValidator(); --- 110,118 ---- /** * INTERNAL: */ ! public EntityMappingsXMLProcessor(boolean enableLazyForOneToOne, boolean oneToOneStaticWeaving) { m_enableLazyForOneToOne = enableLazyForOneToOne; + m_oneToOneStaticWeaving = oneToOneStaticWeaving; m_namedQueries = new HashMap(); m_namedNativeQueries = new HashMap(); m_validator = new XMLValidator(); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tltest/source/essentials/oracle/toplink/essentials/testing/tests/weaving/RelationshipWeaverTestSuite.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000014/AB0952363AC40CBFE034080020E8C54E.11 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tltest/source/essentials/oracle/toplink/essentials/testing/tests/weaving/RelationshipWeaverTestSuite.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000014/AB0952363AC40CBFE034080020E8C54E.11 Tue May 30 11:41:13 2006 *************** *** 83,89 **** Session session = new Project(new DatabaseLogin()).createServerSession(); session.setLogLevel(SessionLog.OFF); EJBAnnotationsProcessor eap = new EJBAnnotationsProcessor( ! (AbstractSession) session, setupClassLoader, entities, true); eap.processORAnnotations(); TopLinkWeaver tw = (TopLinkWeaver) TransformerFactory.createTransformer(session, entities, Thread.currentThread().getContextClassLoader()); --- 83,89 ---- Session session = new Project(new DatabaseLogin()).createServerSession(); session.setLogLevel(SessionLog.OFF); EJBAnnotationsProcessor eap = new EJBAnnotationsProcessor( ! (AbstractSession) session, setupClassLoader, entities, true, false); eap.processORAnnotations(); TopLinkWeaver tw = (TopLinkWeaver) TransformerFactory.createTransformer(session, entities, Thread.currentThread().getContextClassLoader()); ================================================================================ Merge Diffs: /ade/tware_toplink10i/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/xml/merge/relationships/Customer.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000015/AB0952363AC40CBFE034080020E8C54E.4 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/models/cmp3/xml/merge/relationships/Customer.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000015/AB0952363AC40CBFE034080020E8C54E.4 Tue May 30 11:47:37 2006 *************** *** 50,56 **** public Customer() {} @Id ! @GeneratedValue(strategy=TABLE, generator="XML_MERGE_CUSTOMER_TABLE_GENERATOR") // This table generator is overridden in the XML, therefore it should // not be processed. If it is processed, because the table name is so long // it will cause an error. No error means everyone is happy. --- 50,56 ---- public Customer() {} @Id ! @GeneratedValue(strategy=TABLE, generator="XML_MERGE_CUSTOMER_GENERATOR_TABLE") // This table generator is overridden in the XML, therefore it should // not be processed. If it is processed, because the table name is so long // it will cause an error. No error means everyone is happy. ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/StaticWeaver.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000016/AB0952363AC40CBFE034080020E8C54E.1 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/ejb/cmp3/StaticWeaver.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000016/AB0952363AC40CBFE034080020E8C54E.1 Tue May 30 13:07:10 2006 *************** *** 21,26 **** --- 21,27 ---- * -Dtoplink.weaving.output.path= * -Dtoplink.validation-only=true * -Dtoplink.weaving.overwrite.existing=true if you wish the output of static weaving to overwrite existing classes + * -Dtoplink.weaving.static-only=true * * Weaving will occur for all persistence units found on the classpath. */ ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/LoggingLocalizationResource.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000021/AB0952363AC40CBFE034080020E8C54E.23 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/LoggingLocalizationResource.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000021/AB0952363AC40CBFE034080020E8C54E.23 Wed May 31 15:55:34 2006 *************** *** 246,253 **** { "weaver_disable_by_system_property", "Weaving disabled by system property {0}"}, { "weaver_change_tracking_disabled_missing_field", "Weaving for change tracking not enabled for class [{0}] because it does not have field [{1}]."}, { "weaver_change_tracking_disabled_not_supported", "Weaving for change tracking not enabled for class [{0}] because it is not supported by the mapping for field [{1}]."}, ! { "weaver_not_overwriting", "Weaver is not overwriting class {0} because it has not been set to overwrite."}, ! { "weaver_could_not_write", "Weaver encountered an exception while trying to write class {0} to the file system. The exception was: {1}"}, { "field_type_set_to_java_lang_string", "The default table generator could not locate or convert a java type ({1}) into a database type for database field ({0}). The generator uses 'java.lang.String' as default java type for the field." }, { "relational_descriptor_support_only", "The default table generator currently only supports generating default table schema from a relational project."}, --- 246,252 ---- { "weaver_disable_by_system_property", "Weaving disabled by system property {0}"}, { "weaver_change_tracking_disabled_missing_field", "Weaving for change tracking not enabled for class [{0}] because it does not have field [{1}]."}, { "weaver_change_tracking_disabled_not_supported", "Weaving for change tracking not enabled for class [{0}] because it is not supported by the mapping for field [{1}]."}, ! { "weaver_not_overwriting", "Weaver is not overwriting class {1} because it has not been set to overwrite."}, { "field_type_set_to_java_lang_string", "The default table generator could not locate or convert a java type ({1}) into a database type for database field ({0}). The generator uses 'java.lang.String' as default java type for the field." }, { "relational_descriptor_support_only", "The default table generator currently only supports generating default table schema from a relational project."}, ================================================================================ Merge Diffs: /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/weaving/TopLinkWeaver.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000022/AB0952363AC40CBFE034080020E8C54E.12 Report generated at Thu Jun 1 09:52:18 2006 -------------------------------------------------------------------------------- *** /ade/tware_toplink10i/tldev/source/essentials/oracle/toplink/essentials/internal/weaving/TopLinkWeaver.java Thu Jun 1 09:12:37 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/tware/tware_10essentials_redeploy_setup_060529/ade_storage/000022/AB0952363AC40CBFE034080020E8C54E.12 Wed May 31 15:56:06 2006 *************** *** 50,56 **** public static final String WEAVING_OUTPUT_PATH = "toplink.weaving.output.path"; public static final String WEAVING_SHOULD_OVERWRITE = "toplink.weaving.overwrite.existing"; public static final String WEAVER_NOT_OVERWRITING = "weaver_not_overwriting"; - public static final String WEAVER_COULD_NOT_WRITE = "weaver_could_not_write"; protected Session session; // for logging // Map where the key is className in JVM '/' format --- 50,55 ---- *************** *** 135,142 **** fos.write(classBytes); fos.close(); } catch (Exception e){ ! ((oracle.toplink.essentials.internal.sessions.AbstractSession)session).log( ! SessionLog.WARNING, SessionLog.WEAVER, WEAVER_COULD_NOT_WRITE, className, e); } } --- 134,140 ---- fos.write(classBytes); fos.close(); } catch (Exception e){ ! e.printStackTrace(); } }