From 1c62980cab09046299e845854a9265396606c8a7 Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Mon, 17 Jun 2024 16:44:56 -0500 Subject: [PATCH 01/14] Issue #24858 introduce data config element --- .../bnd.bnd | 3 + .../OSGI-INF/l10n/metatype.properties | 49 +++++++++++++++ .../resources/OSGI-INF/metatype/metatype.xml | 33 ++++++++++ .../cdi/DataExtensionProvider.java | 60 ++++++++++++++++++- .../persistence/service/DBStoreEMBuilder.java | 11 ++-- 5 files changed, 147 insertions(+), 9 deletions(-) create mode 100644 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties create mode 100644 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/metatype/metatype.xml diff --git a/dev/io.openliberty.data.internal.persistence/bnd.bnd b/dev/io.openliberty.data.internal.persistence/bnd.bnd index 9c0e908b1993..d976d16414b7 100644 --- a/dev/io.openliberty.data.internal.persistence/bnd.bnd +++ b/dev/io.openliberty.data.internal.persistence/bnd.bnd @@ -46,6 +46,9 @@ Private-Package: \ io.openliberty.data.internal.persistence.resources.*,\ io.openliberty.data.internal.persistence.validation.* +Include-Resource:\ + OSGI-INF=resources/OSGI-INF + -cdiannotations: -dsannotations: \ diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties new file mode 100644 index 000000000000..f90f74a8d423 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties @@ -0,0 +1,49 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create Tables +createTables.desc=Establishes the default behavior of whether or not to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop Tables +dropTables.desc=Establishes the default behavior of whether or not to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log Values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + The default is to never log values. This setting allows opting in per\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/metatype/metatype.xml b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/metatype/metatype.xml new file mode 100644 index 000000000000..bf58421c0928 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/metatype/metatype.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + diff --git a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java index 7d35c6a92afe..06b551f8495a 100644 --- a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java +++ b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java @@ -15,6 +15,7 @@ import java.io.IOException; import java.util.Collection; import java.util.Collections; +import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Queue; @@ -28,9 +29,11 @@ import org.osgi.service.cm.Configuration; import org.osgi.service.cm.ConfigurationAdmin; import org.osgi.service.component.ComponentContext; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.ConfigurationPolicy; import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Modified; import org.osgi.service.component.annotations.Reference; import org.osgi.service.component.annotations.ReferenceCardinality; import org.osgi.service.component.annotations.ReferencePolicy; @@ -72,8 +75,8 @@ * Simulates a provider for relational databases by delegating * JPQL queries to the Jakarta Persistence layer. */ -@Component(configurationPid = "io.openliberty.data.internal.persistence.cdi.DataExtensionProvider", - configurationPolicy = ConfigurationPolicy.IGNORE, +@Component(configurationPid = "io.openliberty.data", + configurationPolicy = ConfigurationPolicy.OPTIONAL, service = { CDIExtensionMetadata.class, DataExtensionProvider.class, DeferredMetaDataFactory.class, @@ -101,6 +104,11 @@ public class DataExtensionProvider implements // @Reference public ConfigurationAdmin configAdmin; + /** + * Configured value for createTables. + */ + public volatile boolean createTables; + /** * Map of application name to map of Repository.dataStore to databaseStore config that is generated by the extension. * Entries are removed when the application stops, at which point the config is removed. @@ -113,6 +121,11 @@ public class DataExtensionProvider implements // */ public final Map>> delegatorsAllApps = new ConcurrentHashMap<>(); + /** + * Configured value for dropTables. + */ + public volatile boolean dropTables; + /** * EntityManagerBuilder futures per application, to complete once the application starts. */ @@ -124,6 +137,11 @@ public class DataExtensionProvider implements // @Reference public LocalTransactionCurrent localTranCurrent; + /** + * Configured interface/method/package names for logValues. + */ + public volatile Set logValues; + @Reference public MetaDataIdentifierService metadataIdSvc; @@ -139,6 +157,25 @@ public class DataExtensionProvider implements // */ private transient Object validationService; + /** + * OSGi service activate. + * + * @param props config properties. + */ + @Activate + protected void activate(Map props) { + createTables = Boolean.TRUE.equals(props.get("createTables")); + + dropTables = Boolean.TRUE.equals(props.get("dropTables")); + + @SuppressWarnings("unchecked") + Collection list = (Collection) props.get("logValues"); + Set names = list == null ? Set.of() : new HashSet<>(list.size()); + if (list != null) + names.addAll(list); + logValues = names; + } + /** * Makes DataSource and EntityManagerFactory beans that are produced by the application visible to our extension * so that we can use them to implement the repository. @@ -349,6 +386,25 @@ public String getMetaDataIdentifier(String appName, public void initialize(ComponentMetaData metadata) throws IllegalStateException { } + /** + * Invoked when configuration is modified. + * + * @param props config properties. + */ + @Modified + protected void modified(Map props) { + createTables = Boolean.TRUE.equals(props.get("createTables")); + + dropTables = Boolean.TRUE.equals(props.get("dropTables")); + + @SuppressWarnings("unchecked") + Collection list = (Collection) props.get("logValues"); + Set names = list == null ? Set.of() : new HashSet<>(list.size()); + if (list != null) + names.addAll(list); + logValues = names; + } + /** * Arrange for the specified EntityManagerBuilders to initialize once the application is started. * diff --git a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/service/DBStoreEMBuilder.java b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/service/DBStoreEMBuilder.java index d60a5924c015..139328724f8b 100644 --- a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/service/DBStoreEMBuilder.java +++ b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/service/DBStoreEMBuilder.java @@ -41,7 +41,6 @@ import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.Map; -import java.util.Objects; import java.util.Queue; import java.util.Set; import java.util.SortedMap; @@ -275,12 +274,10 @@ public DBStoreEMBuilder(DataExtensionProvider provider, ClassLoader repositoryCl else svcProps.put("NonJTADataSourceFactory.target", "(&(service.pid=${nonTransactionalDataSourceRef})(transactional=false))"); - // TODO should the databaseStore properties be configurable somehow when DataSourceDefinition is used? - // The following would allow them in the annotation's properties list, as "data.createTables=true", "data.tablePrefix=TEST" - svcProps.put("createTables", !"FALSE".equalsIgnoreCase((String) dsRef.getProperty("properties.0.data.createTables"))); - svcProps.put("dropTables", !"TRUE".equalsIgnoreCase((String) dsRef.getProperty("properties.0.data.dropTables"))); - svcProps.put("tablePrefix", Objects.requireNonNullElse((String) dsRef.getProperty("properties.0.data.tablePrefix"), "")); - svcProps.put("keyGenerationStrategy", Objects.requireNonNullElse((String) dsRef.getProperty("properties.0.data.keyGenerationStrategy"), "AUTO")); + svcProps.put("createTables", provider.createTables); + svcProps.put("dropTables", provider.dropTables); + svcProps.put("tablePrefix", ""); + svcProps.put("keyGenerationStrategy", "AUTO"); dbStoreConfig = provider.configAdmin.createFactoryConfiguration("com.ibm.ws.persistence.databaseStore", bc.getBundle().getLocation()); dbStoreConfig.update(svcProps); From dc111a34e90e22bf5f3716087c72faddc1f1b06d Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Mon, 17 Jun 2024 16:46:49 -0500 Subject: [PATCH 02/14] Issue #24858 add simplicity objects --- .../ibm/websphere/simplicity/config/Data.java | 85 +++++++++++++++++++ .../simplicity/config/DatabaseStore.java | 48 ++++++++--- .../config/ServerConfiguration.java | 48 +++++++---- 3 files changed, 153 insertions(+), 28 deletions(-) create mode 100644 dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/Data.java diff --git a/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/Data.java b/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/Data.java new file mode 100644 index 000000000000..dde34e37c8b1 --- /dev/null +++ b/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/Data.java @@ -0,0 +1,85 @@ +/******************************************************************************* + * Copyright (c) 2024 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package com.ibm.websphere.simplicity.config; + +import java.util.Set; +import java.util.TreeSet; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; + +/** + * Represents the element in server.xml + */ +public class Data extends ConfigElement { + + // attributes + + private String createTables; + private String dropTables; + private String logValues; + + // nested elements + + @XmlElement(name = "logValues") + private Set logValuesList; + + public String getCreateTables() { + return createTables; + } + + public String getDropTables() { + return dropTables; + } + + public String getLogValues() { + return logValues; + } + + public Set getLogValuesElements() { + if (logValuesList == null) { + logValuesList = new TreeSet(); + } + return logValuesList; + } + + @XmlAttribute + public void setCreateTables(String value) { + createTables = value; + } + + @XmlAttribute + public void setDropTables(String value) { + dropTables = value; + } + + @XmlAttribute + public void setLogValues(String value) { + logValues = value; + } + + @Override + public String toString() { + StringBuilder buf = new StringBuilder(getClass().getSimpleName()).append('{'); + if (createTables != null) + buf.append("createTables=").append(createTables).append(' '); + if (dropTables != null) + buf.append("dropTables=").append(dropTables).append(' '); + if (logValues != null) + buf.append("logValues=").append(logValues).append(' '); + if (logValuesList != null) + buf.append("logValues subelements: ").append(logValuesList).append(' '); + buf.append('}'); + return buf.toString(); + } +} diff --git a/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/DatabaseStore.java b/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/DatabaseStore.java index 228e13e98246..1afff3834bb5 100644 --- a/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/DatabaseStore.java +++ b/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/DatabaseStore.java @@ -1,10 +1,10 @@ /******************************************************************************* - * Copyright (c) 2014 IBM Corporation and others. + * Copyright (c) 2014,2024 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-2.0/ - * + * * SPDX-License-Identifier: EPL-2.0 * * Contributors: @@ -26,6 +26,9 @@ public class DatabaseStore extends ConfigElement { @XmlElement(name = "authData") private ConfigElementList authDatas; + /** The drop tables indicator. */ + private String dropTables; + /** Config reference to the dataSource attribute. */ private String dataSourceRef; @@ -45,7 +48,7 @@ public class DatabaseStore extends ConfigElement { /** * Set the authDataRef attribute. - * + * * @param authDataRef The authDataRef attribute to be set. */ @XmlAttribute @@ -55,7 +58,7 @@ public void setAuthDataRef(String authDataRef) { /** * Returns the authDataRef attribute value. - * + * * @return The authDataRef attribute value. */ public String getAuthDataRef() { @@ -66,9 +69,28 @@ public ConfigElementList getAuthDatas() { return authDatas == null ? (authDatas = new ConfigElementList()) : authDatas; } + /** + * Sets the drop tables indicator attribute value. + * + * @param value The drop tables indicator. + */ + @XmlAttribute + public void setDropTables(String value) { + dropTables = value; + } + + /** + * Returns the drop tables indicator. + * + * @return The drop tables indicator. + */ + public String getDropTables() { + return dropTables; + } + /** * Sets the dataSourceRef attribute. - * + * * @param dataSourceRef The set attribute. */ @XmlAttribute @@ -78,7 +100,7 @@ public void setDataSourceRef(String dataSourceRef) { /** * Returns the dataSourceRef attribute value. - * + * * @return The dataSourceRef attribute value. */ public String getDataSourceRef() { @@ -100,7 +122,7 @@ public String getKeyGenerationStrategy() { /** * Sets the schema name attribute value. - * + * * @param schema The schema name attribute value. */ @XmlAttribute @@ -110,7 +132,7 @@ public void setSchema(String schema) { /** * Returns the schema name attribute value. - * + * * @return The schema name attribute value. */ public String getSchema() { @@ -119,7 +141,7 @@ public String getSchema() { /** * Sets the table prefix name attribute value. - * + * * @param tablePrefix the table prefix name attribute value. */ @XmlAttribute @@ -129,7 +151,7 @@ public void setTablePrefix(String tablePrefix) { /** * Returns the table prefix name. - * + * * @return The table prefix name. */ public String getTablePrefix() { @@ -138,7 +160,7 @@ public String getTablePrefix() { /** * Sets the create tables indicator attribute value. - * + * * @param createTables The create tables indicator. */ @XmlAttribute @@ -148,7 +170,7 @@ public void setCreateTables(String createTables) { /** * Returns the create tables indicator. - * + * * @return The create tables indicator. */ public String getCreateTables() { @@ -175,6 +197,8 @@ public String toString() { buf.append("authDataRef=\"" + authDataRef + "\", "); if (createTables != null) buf.append("createTables=\"" + createTables + "\", "); + if (dropTables != null) + buf.append("dropTables=\"" + dropTables + "\", "); if (dataSources != null) buf.append(dataSources).append(' '); if (authDatas != null) diff --git a/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/ServerConfiguration.java b/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/ServerConfiguration.java index 99c1d107eec4..918c737670e0 100644 --- a/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/ServerConfiguration.java +++ b/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/ServerConfiguration.java @@ -63,6 +63,9 @@ public abstract class ServerConfiguration implements Cloneable { @XmlElement(name = "cdi12") private ConfigElementList cdi12; + @XmlElement(name = "data") + private ConfigElementList data; + @XmlElement(name = "httpEndpoint") private ConfigElementList httpEndpoints; @@ -469,6 +472,19 @@ public ConfigElementList getConnectionFactories() { return this.connectionFactories; } + /** + * Returns a list of configured top level data elements. + * + * @return A list of configured top level data elements. + */ + public ConfigElementList getData() { + if (this.data == null) { + this.data = new ConfigElementList(); + } + + return this.data; + } + /** * Retrieves the list of HttpEndpoints in this configuration * @@ -902,10 +918,10 @@ public ConfigElementList getConnectionManagers() { /** * Removes all applications with a specific name * - * @param name - * the name of the applications to remove - * @return the removed applications (no longer bound to the server - * configuration) + * @param name + * the name of the applications to remove + * @return the removed applications (no longer bound to the server + * configuration) */ public ConfigElementList removeApplicationsByName(String name) { ConfigElementList installedApps = this.getApplications(); @@ -923,14 +939,14 @@ public ConfigElementList removeApplicationsByName(String name) { * Adds an application to the current config, or updates an application with * a specific name if it already exists * - * @param name - * the name of the application - * @param path - * the fully qualified path to the application archive on the - * liberty machine - * @param type - * the type of the application (ear/war/etc) - * @return the deployed application + * @param name + * the name of the application + * @param path + * the fully qualified path to the application archive on the + * liberty machine + * @param type + * the type of the application (ear/war/etc) + * @return the deployed application */ public Application addApplication(String name, String path, String type) { ConfigElementList apps = this.getApplications(); @@ -1231,8 +1247,8 @@ public void updateDatabaseArtifacts() throws Exception { * which is currently deprecated. But this method is specific to Database rotation. If we start using the * fat.modify tag and modifiableConfigElement interface for other modification purposes this method can be un-deprecated * - * @param element The config element to check. - * @param modifiableConfigElements The list containing all modifiable elements. + * @param element The config element to check. + * @param modifiableConfigElements The list containing all modifiable elements. * @throws Exception */ @Deprecated @@ -1266,9 +1282,9 @@ private void findModifiableConfigElements(Object element, List removeUnknownElement(String tagName) { List removedElements = new LinkedList(); From 9cbfcc47ae50f27512e7bef9eb7559f97067b4ee Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Mon, 17 Jun 2024 16:54:14 -0500 Subject: [PATCH 03/14] Issue #24858 remove create/dropTables hack from tests --- .../fat/src/test/jakarta/data/jpa/DataJPATest.java | 7 +------ .../test/jakarta/data/jpa/DataJPATestCheckpoint.java | 10 +--------- .../server.xml | 3 --- .../io.openliberty.data.internal.fat.jpa/server.xml | 3 --- .../test/jakarta/data/jpa/web/DataJPATestServlet.java | 5 +---- 5 files changed, 3 insertions(+), 25 deletions(-) diff --git a/dev/io.openliberty.data.internal_fat_jpa/fat/src/test/jakarta/data/jpa/DataJPATest.java b/dev/io.openliberty.data.internal_fat_jpa/fat/src/test/jakarta/data/jpa/DataJPATest.java index 4b32a3ce4b7f..93689dd10740 100644 --- a/dev/io.openliberty.data.internal_fat_jpa/fat/src/test/jakarta/data/jpa/DataJPATest.java +++ b/dev/io.openliberty.data.internal_fat_jpa/fat/src/test/jakarta/data/jpa/DataJPATest.java @@ -58,11 +58,6 @@ public static void setUp() throws Exception { @AfterClass public static void tearDown() throws Exception { - // TODO if we decide to add the ability to put Jakarta Data properties onto DataSourceDefinition properties, - // then an update will be needed to com.ibm.ws.jdbc.internal.JDBCDriverService.create to ignore them for the data source: - // W DSRA8020E: Warning: The property 'data.createTables' does not exist on the DataSource class ... - server.stopServer("DSRA8020E.*data.createTables", - "DSRA8020E.*data.dropTables", - "DSRA8020E.*data.tablePrefix"); + server.stopServer(); } } diff --git a/dev/io.openliberty.data.internal_fat_jpa/fat/src/test/jakarta/data/jpa/DataJPATestCheckpoint.java b/dev/io.openliberty.data.internal_fat_jpa/fat/src/test/jakarta/data/jpa/DataJPATestCheckpoint.java index 1019bf7f8116..3ba21bd0acf4 100644 --- a/dev/io.openliberty.data.internal_fat_jpa/fat/src/test/jakarta/data/jpa/DataJPATestCheckpoint.java +++ b/dev/io.openliberty.data.internal_fat_jpa/fat/src/test/jakarta/data/jpa/DataJPATestCheckpoint.java @@ -58,19 +58,11 @@ public static void setUp() throws Exception { WebArchive war = ShrinkHelper.buildDefaultApp("DataJPATestApp", "test.jakarta.data.jpa.web"); ShrinkHelper.exportAppToServer(server, war); server.setCheckpoint(CheckpointPhase.AFTER_APP_START, true, null); - server.addCheckpointRegexIgnoreMessage("DSRA8020E.*data.createTables"); - server.addCheckpointRegexIgnoreMessage("DSRA8020E.*data.dropTables"); - server.addCheckpointRegexIgnoreMessage("DSRA8020E.*data.tablePrefix"); server.startServer(); } @AfterClass public static void tearDown() throws Exception { - // TODO if we decide to add the ability to put Jakarta Data properties onto DataSourceDefinition properties, - // then an update will be needed to com.ibm.ws.jdbc.internal.JDBCDriverService.create to ignore them for the data source: - // W DSRA8020E: Warning: The property 'data.createTables' does not exist on the DataSource class ... - server.stopServer("DSRA8020E.*data.createTables", - "DSRA8020E.*data.dropTables", - "DSRA8020E.*data.tablePrefix"); + server.stopServer(); } } diff --git a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml index 9adfe71d9099..7d97c0b18963 100644 --- a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml +++ b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml @@ -37,9 +37,6 @@ - - - diff --git a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.fat.jpa/server.xml b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.fat.jpa/server.xml index ce8a2dbb53ee..fbcd57fbd850 100644 --- a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.fat.jpa/server.xml +++ b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.fat.jpa/server.xml @@ -35,9 +35,6 @@ - - - diff --git a/dev/io.openliberty.data.internal_fat_jpa/test-applications/DataJPATestApp/src/test/jakarta/data/jpa/web/DataJPATestServlet.java b/dev/io.openliberty.data.internal_fat_jpa/test-applications/DataJPATestApp/src/test/jakarta/data/jpa/web/DataJPATestServlet.java index b2cd37d1c2eb..e7501c978d72 100644 --- a/dev/io.openliberty.data.internal_fat_jpa/test-applications/DataJPATestApp/src/test/jakarta/data/jpa/web/DataJPATestServlet.java +++ b/dev/io.openliberty.data.internal_fat_jpa/test-applications/DataJPATestApp/src/test/jakarta/data/jpa/web/DataJPATestServlet.java @@ -95,10 +95,7 @@ user = "${repository.database.user}", password = "${repository.database.password}", properties = { - "createDatabase=create", - "data.createTables=${repository.database.tables.create}", - "data.dropTables=${repository.database.tables.drop}", - "data.tablePrefix=${repository.database.tables.prefix}" + "createDatabase=create" }) @SuppressWarnings("serial") @WebServlet("/*") From d4a6080ee73d2a2c2aad92d4f87e6a0abfddea2a Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Mon, 17 Jun 2024 16:55:32 -0500 Subject: [PATCH 04/14] Issue #24858 create new test for data createTables and dropTables --- .../jakarta/data/config/DataConfigTest.java | 111 ++++++++++++++++-- .../server.xml | 2 +- .../jakarta/data/config/web/Employees.java | 2 +- .../jakarta/data/config/web/Students.java | 2 +- 4 files changed, 101 insertions(+), 16 deletions(-) diff --git a/dev/io.openliberty.data.internal_fat_config/fat/src/test/jakarta/data/config/DataConfigTest.java b/dev/io.openliberty.data.internal_fat_config/fat/src/test/jakarta/data/config/DataConfigTest.java index 859fdf1de2ba..57b2ad327fbc 100644 --- a/dev/io.openliberty.data.internal_fat_config/fat/src/test/jakarta/data/config/DataConfigTest.java +++ b/dev/io.openliberty.data.internal_fat_config/fat/src/test/jakarta/data/config/DataConfigTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 IBM Corporation and others. + * Copyright (c) 2023,2024 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -22,6 +22,9 @@ import com.ibm.websphere.simplicity.ShrinkHelper; import com.ibm.websphere.simplicity.config.Application; +import com.ibm.websphere.simplicity.config.ConfigElementList; +import com.ibm.websphere.simplicity.config.Data; +import com.ibm.websphere.simplicity.config.DataSource; import com.ibm.websphere.simplicity.config.DatabaseStore; import com.ibm.websphere.simplicity.config.ServerConfiguration; @@ -59,17 +62,17 @@ public static void tearDown() throws Exception { } /** - * Tests configuration for dropping and creating tables. + * Tests configuration of databaseStore for dropping and creating tables. */ @Test - public void testDropAndCreateTables() throws Exception { + public void testDatabaseStoreDropAndCreateTables() throws Exception { // start with createTables=true dropTables=false - runTest(server, APP_NAME, "testEntitiesCanBeAdded&invokedBy=testDropAndCreateTables_1"); + runTest(server, APP_NAME, "testEntitiesCanBeAdded&invokedBy=testDatabaseStoreDropAndCreateTables_1"); // switch to createTables=false dropTables=false ServerConfiguration config = server.getServerConfiguration(); - DatabaseStore defaultDatabaseStore = config.getDatabaseStores().getById("defaultDatabaseStore"); - defaultDatabaseStore.setCreateTables("false"); + DatabaseStore myDataStore = config.getDatabaseStores().getById("MyDataStore"); + myDataStore.setCreateTables("false"); // TODO can application restart be triggered automatically? Application app = config.getApplications().getBy("location", "DataConfigTestApp.war"); app.setExtraAttribute("forceRestart", "1"); @@ -79,11 +82,11 @@ public void testDropAndCreateTables() throws Exception { server.waitForConfigUpdateInLogUsingMark(Set.of(APP_NAME)); try { // Data must remain because tables were not dropped - runTest(server, APP_NAME, "testEntitiesFound&invokedBy=testDropAndCreateTables_2"); + runTest(server, APP_NAME, "testEntitiesFound&invokedBy=testDatabaseStoreDropAndCreateTables_2"); // switch to createTables=true dropTables=true - defaultDatabaseStore.setCreateTables("true"); - defaultDatabaseStore.setExtraAttribute("dropTables", "true"); // TODO use .setDropTables if this config gets added permanently + myDataStore.setCreateTables("true"); + myDataStore.setDropTables("true"); app.setExtraAttribute("forceRestart", "2"); // TODO can application restart be triggered automatically? // save server.setMarkToEndOfLog(); @@ -91,10 +94,10 @@ public void testDropAndCreateTables() throws Exception { server.waitForConfigUpdateInLogUsingMark(Set.of(APP_NAME)); // tables must be empty because they were dropped and recreated - runTest(server, APP_NAME, "testEntitiesCanBeAdded&invokedBy=testDropAndCreateTables_3"); + runTest(server, APP_NAME, "testEntitiesCanBeAdded&invokedBy=testDatabaseStoreDropAndCreateTables_3"); // switch to createTables=false dropTables=true - defaultDatabaseStore.setCreateTables("false"); + myDataStore.setCreateTables("false"); app.setExtraAttribute("forceRestart", "3"); // TODO can application restart be triggered automatically? // save server.setMarkToEndOfLog(); @@ -102,7 +105,7 @@ public void testDropAndCreateTables() throws Exception { server.waitForConfigUpdateInLogUsingMark(Set.of(APP_NAME)); // tables must not exist - runTest(server, APP_NAME, "testEntitiesDoNotHaveTables&invokedBy=testDropAndCreateTables_4"); + runTest(server, APP_NAME, "testEntitiesDoNotHaveTables&invokedBy=testDatabaseStoreDropAndCreateTables_4"); } finally { // restore to original server.setMarkToEndOfLog(); @@ -111,6 +114,88 @@ public void testDropAndCreateTables() throws Exception { } // tables must be empty after being recreated - runTest(server, APP_NAME, "testEntitiesNotFound&invokedBy=testDropAndCreateTables_5"); + runTest(server, APP_NAME, "testEntitiesNotFound&invokedBy=testDatabaseStoreDropAndCreateTables_5"); + } + + /** + * Tests configuration of the data element for dropping and creating tables. + */ + @Test + public void testDataDropAndCreateTables() throws Exception { + // use the entities to ensure async processing is complete before changing configuration + runTest(server, APP_NAME, "testEntitiesNotFound&invokedBy=testDataDropAndCreateTables_0"); + + // start with createTables=true dropTables=false, + // but switch MyDataStore from databaseStore to dataSource + ServerConfiguration config = server.getServerConfiguration(); + config.getDatabaseStores().removeById("MyDataStore"); + DataSource MyDataStore = (DataSource) config.getDataSources().getById("DefaultDataSource").clone(); + MyDataStore.setId("MyDataStore"); + config.getDataSources().add(MyDataStore); + Data data; + ConfigElementList datas = config.getData(); + if (datas.isEmpty()) { + data = new Data(); + datas.add(data); + } else { + data = datas.get(0); + } + data.setCreateTables("true"); + data.setDropTables("false"); + // TODO can application restart be triggered automatically? + Application app = config.getApplications().getBy("location", "DataConfigTestApp.war"); + app.setExtraAttribute("forceRestart", "1"); + // save + server.setMarkToEndOfLog(); + server.updateServerConfiguration(config); + server.waitForConfigUpdateInLogUsingMark(Set.of(APP_NAME)); + try { + runTest(server, APP_NAME, "testEntitiesCanBeAdded&invokedBy=testDataDropAndCreateTables_1"); + + // switch to createTables=false dropTables=false + data.setCreateTables("false"); + data.setDropTables("false"); + // TODO can application restart be triggered automatically? + config.getApplications().getBy("location", "DataConfigTestApp.war"); + app.setExtraAttribute("forceRestart", "2"); + // save + server.setMarkToEndOfLog(); + server.updateServerConfiguration(config); + server.waitForConfigUpdateInLogUsingMark(Set.of(APP_NAME)); + + // Data must remain because tables were not dropped + runTest(server, APP_NAME, "testEntitiesFound&invokedBy=testDataDropAndCreateTables_2"); + + // switch to createTables=true dropTables=true + data.setCreateTables("true"); + data.setDropTables("true"); + app.setExtraAttribute("forceRestart", "3"); // TODO can application restart be triggered automatically? + // save + server.setMarkToEndOfLog(); + server.updateServerConfiguration(config); + server.waitForConfigUpdateInLogUsingMark(Set.of(APP_NAME)); + + // tables must be empty because they were dropped and recreated + runTest(server, APP_NAME, "testEntitiesCanBeAdded&invokedBy=testDataDropAndCreateTables_3"); + + // switch to createTables=false dropTables=true + data.setCreateTables("false"); + app.setExtraAttribute("forceRestart", "4"); // TODO can application restart be triggered automatically? + // save + server.setMarkToEndOfLog(); + server.updateServerConfiguration(config); + server.waitForConfigUpdateInLogUsingMark(Set.of(APP_NAME)); + + // tables must not exist + runTest(server, APP_NAME, "testEntitiesDoNotHaveTables&invokedBy=testDataDropAndCreateTables_4"); + } finally { + // restore to original + server.setMarkToEndOfLog(); + server.updateServerConfiguration(savedConfig); + server.waitForConfigUpdateInLogUsingMark(Set.of(APP_NAME)); + } + + // tables must be empty after being recreated + runTest(server, APP_NAME, "testEntitiesNotFound&invokedBy=testDataDropAndCreateTables_5"); } } diff --git a/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml b/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml index 1b5604521d02..6ab868d1c90a 100644 --- a/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml +++ b/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml @@ -26,7 +26,7 @@ - + diff --git a/dev/io.openliberty.data.internal_fat_config/test-applications/DataConfigTestApp/src/test/jakarta/data/config/web/Employees.java b/dev/io.openliberty.data.internal_fat_config/test-applications/DataConfigTestApp/src/test/jakarta/data/config/web/Employees.java index 7f6376de3bcc..f0cb2bf18e93 100644 --- a/dev/io.openliberty.data.internal_fat_config/test-applications/DataConfigTestApp/src/test/jakarta/data/config/web/Employees.java +++ b/dev/io.openliberty.data.internal_fat_config/test-applications/DataConfigTestApp/src/test/jakarta/data/config/web/Employees.java @@ -20,7 +20,7 @@ /** * */ -@Repository +@Repository(dataStore = "MyDataStore") public interface Employees extends BasicRepository { DataSource getDataSource(); } \ No newline at end of file diff --git a/dev/io.openliberty.data.internal_fat_config/test-applications/DataConfigTestApp/src/test/jakarta/data/config/web/Students.java b/dev/io.openliberty.data.internal_fat_config/test-applications/DataConfigTestApp/src/test/jakarta/data/config/web/Students.java index 795982d6d68a..db6f796117db 100644 --- a/dev/io.openliberty.data.internal_fat_config/test-applications/DataConfigTestApp/src/test/jakarta/data/config/web/Students.java +++ b/dev/io.openliberty.data.internal_fat_config/test-applications/DataConfigTestApp/src/test/jakarta/data/config/web/Students.java @@ -20,7 +20,7 @@ /** * */ -@Repository +@Repository(dataStore = "MyDataStore") public interface Students extends BasicRepository { Connection getConnection(); } \ No newline at end of file From 40161de18016da933b828334151d235ba609e454 Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Tue, 18 Jun 2024 08:33:24 -0500 Subject: [PATCH 05/14] Issue #24858 fix error found by metatype validator: must use sentence case --- .../resources/OSGI-INF/l10n/metatype.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties index f90f74a8d423..96268b741455 100644 --- a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties @@ -19,7 +19,7 @@ data=Built-in Jakarta Data Provider data.desc=Configures the built-in Jakarta Data provider -createTables=Create Tables +createTables=Create tables createTables.desc=Establishes the default behavior of whether or not to\ attempt to create tables for entities of Jakarta Data repositories\ if the repository dataStore attribute points to a DataSource.\ @@ -32,7 +32,7 @@ createTables.desc=Establishes the default behavior of whether or not to\ If the database user does not have authority to create tables, the\ ddlGen tool can be used to obtain DDL for the database administrator to run. -dropTables=Drop Tables +dropTables=Drop tables dropTables.desc=Establishes the default behavior of whether or not to\ remove tables for entities of Jakarta Data repositories\ if the repository dataStore attribute points to a DataSource.\ @@ -42,7 +42,7 @@ dropTables.desc=Establishes the default behavior of whether or not to\ in which case table removal is determined by the databaseStore configuration.\ The default for this setting is to not remove tables. -logValues=Log Values +logValues=Log values logValues.desc=List of fully qualified repository interface, method, or\ package names for which to log data that is supplied to the repository.\ The default is to never log values. This setting allows opting in per\ From a81b5ae8f9f10ba71fbcd67159cc2c8175bf5e41 Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Tue, 18 Jun 2024 09:24:10 -0500 Subject: [PATCH 06/14] Issue #24858 updates requested by ID team --- .../resources/OSGI-INF/l10n/metatype.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties index 96268b741455..94fe11ace8a8 100644 --- a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties @@ -20,7 +20,7 @@ data=Built-in Jakarta Data Provider data.desc=Configures the built-in Jakarta Data provider createTables=Create tables -createTables.desc=Establishes the default behavior of whether or not to\ +createTables.desc=Establishes the default behavior of whether to\ attempt to create tables for entities of Jakarta Data repositories\ if the repository dataStore attribute points to a DataSource.\ This setting is ignored when the dataStore is a persistence unit reference,\ @@ -33,7 +33,7 @@ createTables.desc=Establishes the default behavior of whether or not to\ ddlGen tool can be used to obtain DDL for the database administrator to run. dropTables=Drop tables -dropTables.desc=Establishes the default behavior of whether or not to\ +dropTables.desc=Establishes the default behavior of whether to\ remove tables for entities of Jakarta Data repositories\ if the repository dataStore attribute points to a DataSource.\ This setting is ignored when the dataStore is a persistence unit reference,\ @@ -45,5 +45,5 @@ dropTables.desc=Establishes the default behavior of whether or not to\ logValues=Log values logValues.desc=List of fully qualified repository interface, method, or\ package names for which to log data that is supplied to the repository.\ - The default is to never log values. This setting allows opting in per\ + The default is to never log values. This setting supports opting in for each\ repository, repository method, or package. From 0987d85b2b71b5a5a283ff7b6b05491d24accb1d Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Wed, 19 Jun 2024 14:13:19 -0500 Subject: [PATCH 07/14] Issue #28661 remove toleration of Jakarta EE 10 by data-1.0 and dataContainer-1.0 --- .../visibility/auto/io.openliberty.data1.0-jdbc.feature | 3 +-- .../public/data-1.0/io.openliberty.data-1.0.feature | 8 ++++---- .../io.openliberty.dataContainer-1.0.feature | 4 ++-- .../server.xml | 8 ++++---- .../servers/io.openliberty.data.internal.fat/server.env | 1 + .../servers/io.openliberty.data.internal.fat/server.xml | 8 ++++---- .../io.openliberty.data.internal.fat.config/server.xml | 4 ++-- .../io.openliberty.data.internal.fat.datastore/server.xml | 4 ++-- .../server.xml | 6 +++--- .../io.openliberty.data.internal.fat.jpa/server.xml | 6 +++--- .../src/test/jakarta/data/jpa/web/DataJPATestServlet.java | 6 ++++-- .../server.xml | 4 ++-- .../io.openliberty.data.internal.fat.nosql/server.xml | 6 +++--- .../server.xml | 8 ++++---- 14 files changed, 39 insertions(+), 37 deletions(-) create mode 100644 dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.env diff --git a/dev/com.ibm.websphere.appserver.features/visibility/auto/io.openliberty.data1.0-jdbc.feature b/dev/com.ibm.websphere.appserver.features/visibility/auto/io.openliberty.data1.0-jdbc.feature index 2821bd809009..4c4f5722e55f 100644 --- a/dev/com.ibm.websphere.appserver.features/visibility/auto/io.openliberty.data1.0-jdbc.feature +++ b/dev/com.ibm.websphere.appserver.features/visibility/auto/io.openliberty.data1.0-jdbc.feature @@ -1,13 +1,12 @@ -include= ~${workspace}/cnf/resources/bnd/feature.props symbolicName=io.openliberty.data1.0-jdbc -#TODO temporarily using EE 10 versions. Expect this to change for EE 11 visibility=private IBM-Provision-Capability: \ osgi.identity; filter:="(&(type=osgi.subsystem.feature)(|(osgi.identity=io.openliberty.data-1.1)(osgi.identity=io.openliberty.data-1.0)))", \ osgi.identity; filter:="(&(type=osgi.subsystem.feature)(|(osgi.identity=com.ibm.websphere.appserver.jdbc-4.3)(osgi.identity=com.ibm.websphere.appserver.jdbc-4.2)))" -features=\ com.ibm.websphere.appserver.transaction-2.0,\ - com.ibm.websphere.appserver.jdbc-4.2; ibm.tolerates:="4.3",\ + com.ibm.websphere.appserver.jdbc-4.3; ibm.tolerates:="4.2",\ io.openliberty.persistenceService-2.0 -bundles=\ io.openliberty.data.internal.persistence diff --git a/dev/com.ibm.websphere.appserver.features/visibility/public/data-1.0/io.openliberty.data-1.0.feature b/dev/com.ibm.websphere.appserver.features/visibility/public/data-1.0/io.openliberty.data-1.0.feature index 027e66dc654e..1518df5e0b34 100644 --- a/dev/com.ibm.websphere.appserver.features/visibility/public/data-1.0/io.openliberty.data-1.0.feature +++ b/dev/com.ibm.websphere.appserver.features/visibility/public/data-1.0/io.openliberty.data-1.0.feature @@ -13,11 +13,11 @@ IBM-API-Package: \ jakarta.data.repository; type="spec",\ jakarta.data.spi; type="spec" Subsystem-Name: Jakarta Data 1.0 -#TODO io.openliberty.jakartaeePlatform-11.0 and stop tolerating EE 10 -features=\ - com.ibm.websphere.appserver.eeCompatible-10.0; ibm.tolerates:="11.0",\ - io.openliberty.cdi-4.0; ibm.tolerates:="4.1",\ - io.openliberty.jakarta.data-1.0 + com.ibm.websphere.appserver.eeCompatible-11.0,\ + io.openliberty.cdi-4.1,\ + io.openliberty.jakarta.data-1.0,\ + io.openliberty.jakartaeePlatform-11.0 -bundles=\ io.openliberty.data.internal,\ io.openliberty.data.internal.beandef,\ diff --git a/dev/com.ibm.websphere.appserver.features/visibility/public/dataContainer-1.0/io.openliberty.dataContainer-1.0.feature b/dev/com.ibm.websphere.appserver.features/visibility/public/dataContainer-1.0/io.openliberty.dataContainer-1.0.feature index 8fa55da03c73..7da5b84d9183 100644 --- a/dev/com.ibm.websphere.appserver.features/visibility/public/dataContainer-1.0/io.openliberty.dataContainer-1.0.feature +++ b/dev/com.ibm.websphere.appserver.features/visibility/public/dataContainer-1.0/io.openliberty.dataContainer-1.0.feature @@ -14,8 +14,8 @@ IBM-API-Package: \ jakarta.data.spi; type="spec" Subsystem-Name: Jakarta Data 1.0 Container -features=\ - com.ibm.websphere.appserver.eeCompatible-10.0; ibm.tolerates:="11.0",\ - io.openliberty.cdi-4.0; ibm.tolerates:="4.1",\ + com.ibm.websphere.appserver.eeCompatible-11.0,\ + io.openliberty.cdi-4.1,\ io.openliberty.jakarta.data-1.0,\ io.openliberty.noShip-1.0 -bundles=\ diff --git a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.checkpoint.fat/server.xml b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.checkpoint.fat/server.xml index 86822968a0d1..ee84465ebce3 100644 --- a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.checkpoint.fat/server.xml +++ b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.checkpoint.fat/server.xml @@ -1,5 +1,5 @@ + concurrent-3.1 data-1.0 jdbc-4.3 jndi-1.0 - - servlet-6.0 + + servlet-6.1 diff --git a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.env b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.env new file mode 100644 index 000000000000..11d40a2b58f9 --- /dev/null +++ b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.env @@ -0,0 +1 @@ +xJAVA_HOME=/Users/njr/drivers/jdk-21.jdk/Contents/Home diff --git a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.xml b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.xml index 89797bf5f79c..bcc6c4bcf7cf 100644 --- a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.xml +++ b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.xml @@ -1,5 +1,5 @@ + concurrent-3.1 data-1.0 jdbc-4.3 jndi-1.0 - - servlet-6.0 + + servlet-6.1 diff --git a/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml b/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml index 6ab868d1c90a..4615fc3a46f3 100644 --- a/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml +++ b/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml @@ -16,8 +16,8 @@ componenttest-2.0 data-1.0 jndi-1.0 - persistence-3.1 - servlet-6.0 + persistence-3.2 + servlet-6.1 diff --git a/dev/io.openliberty.data.internal_fat_datastore/publish/servers/io.openliberty.data.internal.fat.datastore/server.xml b/dev/io.openliberty.data.internal_fat_datastore/publish/servers/io.openliberty.data.internal.fat.datastore/server.xml index 4810994fce26..025aea57ee35 100644 --- a/dev/io.openliberty.data.internal_fat_datastore/publish/servers/io.openliberty.data.internal.fat.datastore/server.xml +++ b/dev/io.openliberty.data.internal_fat_datastore/publish/servers/io.openliberty.data.internal.fat.datastore/server.xml @@ -17,8 +17,8 @@ data-1.0 enterpriseBeans-4.0 jndi-1.0 - persistence-3.1 - servlet-6.0 + persistence-3.2 + servlet-6.1 diff --git a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml index 7d97c0b18963..7a93054f9fd8 100644 --- a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml +++ b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml @@ -1,5 +1,5 @@ - cdi-4.0 - restfulWS-3.1 + cdi-4.1 + restfulWS-4.0 data-1.0 nosql-1.0 - mpConfig-3.0 + mpConfig-3.1 jsonb-3.0 diff --git a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core/server.xml b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core/server.xml index 599f97a89a6e..94fc6c38a2fa 100644 --- a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core/server.xml +++ b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core/server.xml @@ -1,5 +1,5 @@ - cdi-4.0 - restfulWS-3.1 + cdi-4.1 + restfulWS-4.0 data-1.0 - persistence-3.1 + persistence-3.2 localConnector-1.0 diff --git a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.full/server.xml b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.full/server.xml index a8072625e317..14cc19e5f56f 100644 --- a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.full/server.xml +++ b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.full/server.xml @@ -1,5 +1,5 @@ - jakartaee-10.0 + jakartaee-11.0 data-1.0 diff --git a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.web/server.xml b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.web/server.xml index 426157ebee34..c5c6a9e9865a 100644 --- a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.web/server.xml +++ b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.web/server.xml @@ -1,5 +1,5 @@ - webProfile-10.0 + webProfile-11.0 data-1.0 - persistence-3.1 + persistence-3.2 localConnector-1.0 From 27e046239bb1095058dbb20492df07aa291c883c Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Thu, 20 Jun 2024 09:13:40 -0500 Subject: [PATCH 10/14] Issue #28661 remove special cases for tolerating data in EE10 --- .../test/src/com/ibm/ws/feature/tests/VisibilityTest.java | 4 ---- .../public/data-1.0/io.openliberty.data-1.0.feature | 3 +-- .../src/com/ibm/websphere/simplicity/config/Data.java | 2 +- .../src/componenttest/rules/repeater/JakartaEE10Action.java | 2 -- .../openliberty/jakartaee10/internal/tests/EE10Features.java | 4 +--- .../io/openliberty/jakartaee9/internal/tests/EE9Features.java | 2 -- 6 files changed, 3 insertions(+), 14 deletions(-) diff --git a/dev/com.ibm.websphere.appserver.features/test/src/com/ibm/ws/feature/tests/VisibilityTest.java b/dev/com.ibm.websphere.appserver.features/test/src/com/ibm/ws/feature/tests/VisibilityTest.java index 8b8eb327c66e..173e4437813f 100644 --- a/dev/com.ibm.websphere.appserver.features/test/src/com/ibm/ws/feature/tests/VisibilityTest.java +++ b/dev/com.ibm.websphere.appserver.features/test/src/com/ibm/ws/feature/tests/VisibilityTest.java @@ -805,12 +805,8 @@ public void testTolerates() { allowedToleratedFeatures.add("com.ibm.websphere.appserver.appSecurity-"); allowedToleratedFeatures.add("com.ibm.websphere.appserver.jdbc-"); - // data-1.0 will be updated to not tolerate EE 10 features when it ships with EE 11.0 and - // can depend on EE 11 features because they are also in beta. // restfulWSLogging-3.0 hopefully never will see the light of day and will be done differently. Set expectedFailingFeatures = new HashSet<>(); - expectedFailingFeatures.add("io.openliberty.data-1.0"); - expectedFailingFeatures.add("io.openliberty.dataContainer-1.0"); expectedFailingFeatures.add("io.openliberty.restfulWSLogging-3.0"); Map visibilityMap = new HashMap<>(); for (Entry entry : features.entrySet()) { diff --git a/dev/com.ibm.websphere.appserver.features/visibility/public/data-1.0/io.openliberty.data-1.0.feature b/dev/com.ibm.websphere.appserver.features/visibility/public/data-1.0/io.openliberty.data-1.0.feature index 1518df5e0b34..fa1b1a998c21 100644 --- a/dev/com.ibm.websphere.appserver.features/visibility/public/data-1.0/io.openliberty.data-1.0.feature +++ b/dev/com.ibm.websphere.appserver.features/visibility/public/data-1.0/io.openliberty.data-1.0.feature @@ -16,8 +16,7 @@ Subsystem-Name: Jakarta Data 1.0 -features=\ com.ibm.websphere.appserver.eeCompatible-11.0,\ io.openliberty.cdi-4.1,\ - io.openliberty.jakarta.data-1.0,\ - io.openliberty.jakartaeePlatform-11.0 + io.openliberty.jakarta.data-1.0 -bundles=\ io.openliberty.data.internal,\ io.openliberty.data.internal.beandef,\ diff --git a/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/Data.java b/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/Data.java index dde34e37c8b1..b7290281b398 100644 --- a/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/Data.java +++ b/dev/fattest.simplicity/src/com/ibm/websphere/simplicity/config/Data.java @@ -19,7 +19,7 @@ import javax.xml.bind.annotation.XmlElement; /** - * Represents the element in server.xml + * Represents the element in server.xml */ public class Data extends ConfigElement { diff --git a/dev/fattest.simplicity/src/componenttest/rules/repeater/JakartaEE10Action.java b/dev/fattest.simplicity/src/componenttest/rules/repeater/JakartaEE10Action.java index 211ab75bcb3b..eb934b940fbc 100644 --- a/dev/fattest.simplicity/src/componenttest/rules/repeater/JakartaEE10Action.java +++ b/dev/fattest.simplicity/src/componenttest/rules/repeater/JakartaEE10Action.java @@ -71,8 +71,6 @@ public class JakartaEE10Action extends JakartaEEAction { "cdi-4.0", "concurrent-3.0", "connectors-2.1", - "data-1.0", // TODO temporarily enabled with EE10 for testing/experimentation. Later, switch this to EE11 - "dataContainer-1.0", // TODO temporarily enabled with EE10 for testing/experimentation. Later, switch this to EE11 "expressionLanguage-5.0", "enterpriseBeans-4.0", "enterpriseBeansHome-4.0", diff --git a/dev/io.openliberty.jakartaee10.internal_fat/fat/src/io/openliberty/jakartaee10/internal/tests/EE10Features.java b/dev/io.openliberty.jakartaee10.internal_fat/fat/src/io/openliberty/jakartaee10/internal/tests/EE10Features.java index 92cee5451c04..fb2ea91198fa 100644 --- a/dev/io.openliberty.jakartaee10.internal_fat/fat/src/io/openliberty/jakartaee10/internal/tests/EE10Features.java +++ b/dev/io.openliberty.jakartaee10.internal_fat/fat/src/io/openliberty/jakartaee10/internal/tests/EE10Features.java @@ -284,11 +284,9 @@ private static Set getExtendedCompatibleFeatures(Set compatibleF features.remove("audit-2.0"); - // springBoot-3.0, data-1.0 and nosql-1.0 require Java 17 so if we are currently not using Java 17 or later, remove it from the list of features. + // springBoot-3.0 and nosql-1.0 require Java 17 so if we are currently not using Java 17 or later, remove it from the list of features. if (JavaInfo.JAVA_VERSION < 17) { features.remove("springBoot-3.0"); - features.remove("data-1.0"); - features.remove("dataContainer-1.0"); features.remove("nosql-1.0"); } diff --git a/dev/io.openliberty.jakartaee9.internal_fat/fat/src/io/openliberty/jakartaee9/internal/tests/EE9Features.java b/dev/io.openliberty.jakartaee9.internal_fat/fat/src/io/openliberty/jakartaee9/internal/tests/EE9Features.java index 1c0efefec60a..57d22b600229 100644 --- a/dev/io.openliberty.jakartaee9.internal_fat/fat/src/io/openliberty/jakartaee9/internal/tests/EE9Features.java +++ b/dev/io.openliberty.jakartaee9.internal_fat/fat/src/io/openliberty/jakartaee9/internal/tests/EE9Features.java @@ -294,8 +294,6 @@ private static Set getExtendedCompatibleFeatures(Set compatibleF } if (JavaInfo.JAVA_VERSION < 17) { - features.remove("data-1.0"); - features.remove("dataContainer-1.0"); features.remove("nosql-1.0"); } From 76d21ea1731a3bead14092e4c3c1a58aac435bdc Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Wed, 19 Jun 2024 09:27:51 -0500 Subject: [PATCH 11/14] Issue #24858 data logValues config --- .../resources/OSGI-INF/metatype/metatype.xml | 2 +- .../internal/persistence/RepositoryImpl.java | 18 ++- .../cdi/DataExtensionProvider.java | 138 +++++++++++++++++- 3 files changed, 153 insertions(+), 5 deletions(-) diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/metatype/metatype.xml b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/metatype/metatype.xml index bf58421c0928..bcf2fdadf995 100644 --- a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/metatype/metatype.xml +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/metatype/metatype.xml @@ -27,7 +27,7 @@ - + diff --git a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/RepositoryImpl.java b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/RepositoryImpl.java index 3d389aea98e6..bb2619d22f4e 100644 --- a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/RepositoryImpl.java +++ b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/RepositoryImpl.java @@ -62,6 +62,7 @@ import com.ibm.ws.ffdc.FFDCFilter; import com.ibm.ws.ffdc.annotation.FFDCIgnore; +import io.openliberty.data.internal.persistence.QueryInfo.Type; import io.openliberty.data.internal.persistence.cdi.DataExtension; import io.openliberty.data.internal.persistence.cdi.DataExtensionProvider; import io.openliberty.data.internal.persistence.cdi.FutureEMBuilder; @@ -686,7 +687,8 @@ else if ("toString".equals(methodName)) final boolean trace = TraceComponent.isAnyTracingEnabled(); if (trace && tc.isEntryEnabled()) - Tr.entry(this, tc, "invoke " + repositoryInterface.getSimpleName() + '.' + method.getName(), args); + Tr.entry(this, tc, "invoke " + repositoryInterface.getSimpleName() + '.' + method.getName(), + provider.loggable(repositoryInterface, method, args)); try { if (isDisposed.get()) throw new IllegalStateException("Repository instance " + repositoryInterface.getName() + @@ -1236,8 +1238,18 @@ else if (status != Status.STATUS_NO_TRANSACTION) } } - if (trace && tc.isEntryEnabled()) - Tr.exit(this, tc, "invoke " + repositoryInterface.getSimpleName() + '.' + method.getName(), returnValue); + if (trace && tc.isEntryEnabled()) { + boolean hideValue = queryInfo.type == Type.FIND + || queryInfo.type == Type.FIND_AND_DELETE + || queryInfo.type == Type.INSERT + || queryInfo.type == Type.SAVE + || queryInfo.type == Type.UPDATE_WITH_ENTITY_PARAM_AND_RESULT; + Object valueToLog = hideValue // + ? provider.loggable(repositoryInterface, method, returnValue) // + : returnValue; + Tr.exit(this, tc, "invoke " + repositoryInterface.getSimpleName() + '.' + method.getName(), + valueToLog); + } return returnValue; } catch (Throwable x) { if (!isDefaultMethod && x instanceof Exception) diff --git a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java index 06b551f8495a..98b6a2c3022d 100644 --- a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java +++ b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java @@ -13,13 +13,17 @@ package io.openliberty.data.internal.persistence.cdi; import java.io.IOException; +import java.lang.reflect.Array; +import java.lang.reflect.Method; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Map; +import java.util.Optional; import java.util.Queue; import java.util.Set; +import java.util.concurrent.CompletionStage; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; @@ -68,6 +72,11 @@ import io.openliberty.data.internal.persistence.service.DataComponentMetaData; import io.openliberty.data.internal.persistence.service.DataModuleMetaData; import io.openliberty.data.internal.version.DataVersionCompatibility; +import jakarta.data.Limit; +import jakarta.data.Order; +import jakarta.data.Sort; +import jakarta.data.page.Page; +import jakarta.data.page.PageRequest; import jakarta.enterprise.inject.spi.Extension; import jakarta.persistence.EntityManagerFactory; @@ -140,7 +149,7 @@ public class DataExtensionProvider implements // /** * Configured interface/method/package names for logValues. */ - public volatile Set logValues; + private volatile Set logValues = Set.of(); @Reference public MetaDataIdentifierService metadataIdSvc; @@ -386,6 +395,133 @@ public String getMetaDataIdentifier(String appName, public void initialize(ComponentMetaData metadata) throws IllegalStateException { } + /** + * Prepare values, which might include customer data, for logging. + * If the repository class/package/method is not considered loggable + * then return a copy of the values for logging where customer data + * is replaced with a placeholder. + * + * @param repoClass repository class. + * @param method repository method. + * @param values values. + * @return loggable values. + */ + @Trivial + public Object[] loggable(Class repoClass, Method method, Object... values) { + if (values == null || + values.length == 0 || + !logValues.isEmpty() && + (logValues.contains(method.getName()) || + logValues.contains(repoClass.getPackageName()) || + logValues.contains(repoClass.getName()))) + return values; + + Object[] loggable = new Object[values.length]; + for (int i = 0; i < values.length; i++) + if (values[i] == null || + values[i] instanceof PageRequest || + values[i] instanceof Order || + values[i] instanceof Sort || + values[i] instanceof Sort[] || + values[i] instanceof Limit) + loggable[i] = values[i]; + else // obscure customer data + loggable[i] = loggable(values[i]); + + return loggable; + } + + /** + * Prepare a value, which might include customer data, for logging. + * If the repository class/package/method is not considered loggable + * then return a copy of the value for logging where customer data + * is replaced with a placeholder. + * + * @param repoClass repository class. + * @param method repository method. + * @param value value. + * @return loggable value. + */ + @Trivial + public Object loggable(Class repoClass, Method method, Object value) { + if (value == null || + !logValues.isEmpty() && + (logValues.contains(method.getName()) || + logValues.contains(repoClass.getPackageName()) || + logValues.contains(repoClass.getName()))) + return value; + + return loggable(value); + } + + /** + * Obscures a value from customer data while including some useful, + * non-sensitive data. + * + * @param value customer data. Must not be null. + * @return loggable value that does not include customer data. + */ + @Trivial + private Object loggable(Object value) { + Object loggable; + Class c = value.getClass(); + Class a = c.getComponentType(); + if (a != null) { + StringBuilder s = new StringBuilder(); + int len = Array.getLength(value); + int maxOutput = len <= 20 ? len : 20; + s.append(a.getName()).append('[').append(len).append("]: {"); + for (int i = 0; i < maxOutput; i++) { + Object v = loggable(Array.get(value, i)); + s.append(i == 0 ? " " : ", ").append(v); + } + if (len > maxOutput) + s.append(", ..."); + s.append(" }"); + loggable = s.toString(); + } else if (value instanceof Optional) { + StringBuilder s = new StringBuilder(); + Optional opt = (Optional) value; + s.append("Optional "); + if (opt.isPresent()) + s.append("{ ").append(loggable(opt.get())).append(" }"); + else + s.append("EMPTY"); + loggable = s.toString(); + } else if (value instanceof Page) { + loggable = value; // customer values already obscured + } else if (value instanceof CompletionStage) { + loggable = value; // customer values already obscured + } else if (value instanceof Iterable) { + StringBuilder s = new StringBuilder(); + int len = value instanceof Collection ? ((Collection) value).size() : -1; + int maxOutput = 20; + s.append(c.getName()); + if (len >= 0) + s.append('(').append(len).append("): {"); + else + s.append(": {"); + Iterator it = ((Iterable) value).iterator(); + for (int size = 0; size < maxOutput && it.hasNext(); size++) { + Object v = loggable(it.next()); + s.append(size == 0 ? " " : ", ").append(v); + } + if (it.hasNext()) + s.append(", ..."); + s.append(" }"); + loggable = s.toString(); + } else { + String name = c.getName(); + loggable = c.isPrimitive() || value instanceof Number ? // + name : // + new StringBuilder(name.length() + 9) // + .append(name) // + .append('@') // + .append(Integer.toHexString(value.hashCode())); + } + return loggable; + } + /** * Invoked when configuration is modified. * From c4a31b9f76635adb2db2a3640fff7808095df041 Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Fri, 21 Jun 2024 10:21:38 -0500 Subject: [PATCH 12/14] Issue #28661 data logValues --- .../OSGI-INF/l10n/metatype.properties | 2 + .../persistence/CursoredPageImpl.java | 41 +++++++++++++++++++ .../data/internal/persistence/PageImpl.java | 27 ++++++++++++ .../cdi/DataExtensionProvider.java | 27 +++++++----- .../server.xml | 2 + .../server.xml | 2 + .../server.xml | 2 + .../server.xml | 9 ++++ .../server.xml | 4 ++ .../server.xml | 4 ++ .../server.xml | 5 +++ .../data/validation/DataValidationTest.java | 33 ++++++++++++++- .../server.xml | 6 +++ .../server.xml | 4 +- .../server.xml | 4 +- .../server.xml | 2 + .../server.xml | 2 + 17 files changed, 162 insertions(+), 14 deletions(-) diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties index 94fe11ace8a8..3b629f0e8444 100644 --- a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties @@ -45,5 +45,7 @@ dropTables.desc=Establishes the default behavior of whether to\ logValues=Log values logValues.desc=List of fully qualified repository interface, method, or\ package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ The default is to never log values. This setting supports opting in for each\ repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/CursoredPageImpl.java b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/CursoredPageImpl.java index f319724f5cd8..c36a37da4ca1 100644 --- a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/CursoredPageImpl.java +++ b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/CursoredPageImpl.java @@ -189,6 +189,47 @@ public PageRequest pageRequest() { return pageRequest; } + /** + * Convert to readable text of the form: + * + * CursoredPage 4/10 of MyEntity, size 10/10, CURSOR_NEXT(name ASC IgnoreCase, id ASC) @ff22b3c5 + * + * @return textual representation of the page. + */ + @Override + @Trivial + public String toString() { + int maxPageSize = pageRequest.size(); + int size = Math.min(results.size(), maxPageSize); + StringBuilder s = new StringBuilder(200) // + .append("CursoredPage ").append(pageRequest.page()); + if (totalElements >= 0) { + s.append('/'); + s.append(totalElements / maxPageSize + (totalElements % maxPageSize > 0 ? 1 : 0)); + } + if (!results.isEmpty()) { + s.append(" of ").append(results.get(0).getClass().getSimpleName()); + } + s.append(", size ").append(size); + s.append('/').append(maxPageSize); + s.append(isForward ? ", CURSOR_NEXT(" : " CURSOR_PREVIOUS("); + + boolean firstSort = true; + for (Sort sort : queryInfo.sorts) { + if (firstSort) + firstSort = false; + else + s.append(", "); + s.append(sort.property()); // + s.append(sort.isAscending() // + ? sort.ignoreCase() ? " ASC IgnoreCase" : " ASC" // + : sort.ignoreCase() ? " DESC IgnoreCase" : " DESC"); + } + + s.append(") @").append(Integer.toHexString(hashCode())); + return s.toString(); + } + @Override public long totalElements() { if (totalElements == -1) diff --git a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/PageImpl.java b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/PageImpl.java index 89f0597a31be..2691ba6eaf59 100644 --- a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/PageImpl.java +++ b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/PageImpl.java @@ -173,6 +173,33 @@ public Stream stream() { return content().stream(); } + /** + * Convert to readable text of the form: + * + * Page 4/10 of MyEntity, size 10/10 @ff22b3c5 + * + * @return textual representation of the page. + */ + @Override + @Trivial + public String toString() { + int maxPageSize = pageRequest.size(); + int size = Math.min(results.size(), maxPageSize); + StringBuilder s = new StringBuilder(80) // + .append("Page ").append(pageRequest.page()); + if (totalElements >= 0) { + s.append('/'); + s.append(totalElements / maxPageSize + (totalElements % maxPageSize > 0 ? 1 : 0)); + } + if (!results.isEmpty()) { + s.append(" of ").append(results.get(0).getClass().getSimpleName()); + } + s.append(", size ").append(size); + s.append('/').append(maxPageSize); + s.append(" @").append(Integer.toHexString(hashCode())); + return s.toString(); + } + @Override public long totalElements() { if (totalElements == -1) diff --git a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java index 98b6a2c3022d..8b0b0f40be66 100644 --- a/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java +++ b/dev/io.openliberty.data.internal.persistence/src/io/openliberty/data/internal/persistence/cdi/DataExtensionProvider.java @@ -181,7 +181,8 @@ protected void activate(Map props) { Collection list = (Collection) props.get("logValues"); Set names = list == null ? Set.of() : new HashSet<>(list.size()); if (list != null) - names.addAll(list); + for (String item : list) + names.add(item.trim()); logValues = names; } @@ -408,12 +409,14 @@ public void initialize(ComponentMetaData metadata) throws IllegalStateException */ @Trivial public Object[] loggable(Class repoClass, Method method, Object... values) { + String className; if (values == null || values.length == 0 || !logValues.isEmpty() && - (logValues.contains(method.getName()) || + (logValues.contains("*") || logValues.contains(repoClass.getPackageName()) || - logValues.contains(repoClass.getName()))) + logValues.contains(className = repoClass.getName()) || + logValues.contains(className + '.' + method.getName()))) return values; Object[] loggable = new Object[values.length]; @@ -444,11 +447,13 @@ public Object[] loggable(Class repoClass, Method method, Object... values) { */ @Trivial public Object loggable(Class repoClass, Method method, Object value) { + String className; if (value == null || !logValues.isEmpty() && - (logValues.contains(method.getName()) || + (logValues.contains("*") || logValues.contains(repoClass.getPackageName()) || - logValues.contains(repoClass.getName()))) + logValues.contains(className = repoClass.getName()) || + logValues.contains(className + '.' + method.getName()))) return value; return loggable(value); @@ -480,14 +485,13 @@ private Object loggable(Object value) { s.append(" }"); loggable = s.toString(); } else if (value instanceof Optional) { - StringBuilder s = new StringBuilder(); Optional opt = (Optional) value; - s.append("Optional "); if (opt.isPresent()) - s.append("{ ").append(loggable(opt.get())).append(" }"); + loggable = new StringBuilder().append("Optional { ") // + .append(loggable(opt.get())).append(" }") // + .toString(); else - s.append("EMPTY"); - loggable = s.toString(); + loggable = value; } else if (value instanceof Page) { loggable = value; // customer values already obscured } else if (value instanceof CompletionStage) { @@ -537,7 +541,8 @@ protected void modified(Map props) { Collection list = (Collection) props.get("logValues"); Set names = list == null ? Set.of() : new HashSet<>(list.size()); if (list != null) - names.addAll(list); + for (String item : list) + names.add(item.trim()); logValues = names; } diff --git a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.checkpoint.fat/server.xml b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.checkpoint.fat/server.xml index ee84465ebce3..b1c3ee4cd7f0 100644 --- a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.checkpoint.fat/server.xml +++ b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.checkpoint.fat/server.xml @@ -33,6 +33,8 @@ + + diff --git a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.xml b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.xml index bcc6c4bcf7cf..c26ae2dd31fa 100644 --- a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.xml +++ b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.xml @@ -33,6 +33,8 @@ + + diff --git a/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml b/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml index 4615fc3a46f3..3a2a6a860e6e 100644 --- a/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml +++ b/dev/io.openliberty.data.internal_fat_config/publish/servers/io.openliberty.data.internal.fat.config/server.xml @@ -22,6 +22,8 @@ + + diff --git a/dev/io.openliberty.data.internal_fat_datastore/publish/servers/io.openliberty.data.internal.fat.datastore/server.xml b/dev/io.openliberty.data.internal_fat_datastore/publish/servers/io.openliberty.data.internal.fat.datastore/server.xml index 025aea57ee35..d77de1f1cd0b 100644 --- a/dev/io.openliberty.data.internal_fat_datastore/publish/servers/io.openliberty.data.internal.fat.datastore/server.xml +++ b/dev/io.openliberty.data.internal_fat_datastore/publish/servers/io.openliberty.data.internal.fat.datastore/server.xml @@ -23,6 +23,15 @@ + + test.jakarta.data.datastore.ejb + test.jakarta.data.datastore.global.lib.GlobalLibRepo + test.jakarta.data.datastore.lib + test.jakarta.data.datastore.web + test.jakarta.data.datastore.web2 + test.jakarta.data.datastore.webapp + + diff --git a/dev/io.openliberty.data.internal_fat_exp/publish/servers/io.openliberty.data.internal.fat.exp/server.xml b/dev/io.openliberty.data.internal_fat_exp/publish/servers/io.openliberty.data.internal.fat.exp/server.xml index 83aa387561f5..6c15a7012e6b 100644 --- a/dev/io.openliberty.data.internal_fat_exp/publish/servers/io.openliberty.data.internal.fat.exp/server.xml +++ b/dev/io.openliberty.data.internal_fat_exp/publish/servers/io.openliberty.data.internal.fat.exp/server.xml @@ -25,6 +25,10 @@ + + * + + diff --git a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml index 7a93054f9fd8..78af769284f8 100644 --- a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml +++ b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.checkpoint.fat.jpa/server.xml @@ -22,6 +22,10 @@ + + test.jakarta.data.jpa.web + + diff --git a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.fat.jpa/server.xml b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.fat.jpa/server.xml index 2e51f357b40c..77d44f87ad19 100644 --- a/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.fat.jpa/server.xml +++ b/dev/io.openliberty.data.internal_fat_jpa/publish/servers/io.openliberty.data.internal.fat.jpa/server.xml @@ -22,6 +22,11 @@ + + test.jakarta.data.jpa.web + ee.jakarta.tck.data.framework.read.only + + diff --git a/dev/io.openliberty.data.internal_fat_validation/fat/src/test/jakarta/data/validation/DataValidationTest.java b/dev/io.openliberty.data.internal_fat_validation/fat/src/test/jakarta/data/validation/DataValidationTest.java index 38dcfa5650f9..8875a1869223 100644 --- a/dev/io.openliberty.data.internal_fat_validation/fat/src/test/jakarta/data/validation/DataValidationTest.java +++ b/dev/io.openliberty.data.internal_fat_validation/fat/src/test/jakarta/data/validation/DataValidationTest.java @@ -12,6 +12,11 @@ *******************************************************************************/ package test.jakarta.data.validation; +import static org.junit.Assert.assertEquals; + +import java.util.ArrayList; +import java.util.List; + import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -46,6 +51,32 @@ public static void setUp() throws Exception { @AfterClass public static void tearDown() throws Exception { - server.stopServer(); + // Verify that data logValues config limits the Entitlements repository + // to only logging customer data on its findById method, + // and that it does not log customer data from its save method. + boolean found4 = false; + boolean found5 = false; + List unexpected = new ArrayList<>(); + try { + for (String line : server.findStringsInLogsAndTrace("Entitlement#")) { + if (line.contains(" eclipselink.ps.")) + ; // EclipseLink logging, not ours + else if (line.contains("Entitlement#4:US-SNAP AS_NEEDED for person4@openliberty.io")) + found4 = true; // returned by findById which is allowed to log data + else if (line.contains("Entitlement#5:US-TANF MONTHLY for person5@openliberty.io from age 13")) + found5 = true; // returned by findById which is allowed to log data + else + unexpected.add(line); + } + } finally { + server.stopServer(); + } + + // TODO enable once the logValues config is properly implemented + //assertEquals("Found " + unexpected.size() + + // " unexpected lines of customer data (containing ...Entitlement#...) in logs.", + // 0, unexpected.size()); + assertEquals(true, found4); + assertEquals(true, found5); } } diff --git a/dev/io.openliberty.data.internal_fat_validation/publish/servers/io.openliberty.data.internal.fat.validation/server.xml b/dev/io.openliberty.data.internal_fat_validation/publish/servers/io.openliberty.data.internal.fat.validation/server.xml index 23b0ad8eb46f..c800ff429402 100644 --- a/dev/io.openliberty.data.internal_fat_validation/publish/servers/io.openliberty.data.internal.fat.validation/server.xml +++ b/dev/io.openliberty.data.internal_fat_validation/publish/servers/io.openliberty.data.internal.fat.validation/server.xml @@ -23,6 +23,12 @@ + + test.jakarta.data.validation.web.Creatures + test.jakarta.data.validation.web.Entitlements.findById + test.jakarta.data.validation.web.Rectangles + + diff --git a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core.nosql/server.xml b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core.nosql/server.xml index 369c00e36800..b5cbc166abd3 100644 --- a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core.nosql/server.xml +++ b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core.nosql/server.xml @@ -39,7 +39,9 @@ ${server.config.dir}/dropins - + + + diff --git a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core/server.xml b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core/server.xml index 94fc6c38a2fa..993aa4626397 100644 --- a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core/server.xml +++ b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.core/server.xml @@ -32,7 +32,9 @@ ${server.config.dir}/dropins - + + + diff --git a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.full/server.xml b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.full/server.xml index 14cc19e5f56f..843040e1116b 100644 --- a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.full/server.xml +++ b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.full/server.xml @@ -32,6 +32,8 @@ ${server.config.dir}/dropins + + diff --git a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.web/server.xml b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.web/server.xml index c5c6a9e9865a..fd8ecde4ad92 100644 --- a/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.web/server.xml +++ b/dev/io.openliberty.jakarta.data.1.0_fat_tck/publish/servers/io.openliberty.jakarta.data.1.0.web/server.xml @@ -33,6 +33,8 @@ ${server.config.dir}/dropins + + From 9f2b7aeb24c8298212f4e20aad41fd1d031284c1 Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Fri, 21 Jun 2024 10:38:41 -0500 Subject: [PATCH 13/14] metatype properties files for all languages are required, but intially english only --- .../OSGI-INF/l10n/metatype_cs.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_de.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_es.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_fr.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_hu.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_it.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_ja.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_ko.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_pl.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_pt_BR.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_ro.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_ru.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_zh.properties | 51 +++++++++++++++++++ .../OSGI-INF/l10n/metatype_zh_TW.properties | 51 +++++++++++++++++++ 14 files changed, 714 insertions(+) create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_cs.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_de.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_es.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_fr.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_hu.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_it.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ja.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ko.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_pl.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_pt_BR.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ro.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ru.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_zh.properties create mode 100755 dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_zh_TW.properties diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_cs.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_cs.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_cs.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_de.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_de.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_de.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_es.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_es.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_es.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_fr.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_fr.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_fr.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_hu.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_hu.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_hu.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_it.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_it.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_it.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ja.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ja.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ja.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ko.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ko.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ko.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_pl.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_pl.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_pl.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_pt_BR.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_pt_BR.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_pt_BR.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ro.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ro.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ro.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ru.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ru.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_ru.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_zh.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_zh.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_zh.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. diff --git a/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_zh_TW.properties b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_zh_TW.properties new file mode 100755 index 000000000000..3b629f0e8444 --- /dev/null +++ b/dev/io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype_zh_TW.properties @@ -0,0 +1,51 @@ +############################################################################### +# Copyright (c) 2024 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# ------------------------------------------------------------------------------------------------- +#CMVCPATHNAME io.openliberty.data.internal.persistence/resources/OSGI-INF/l10n/metatype.properties +#ISMESSAGEFILE FALSE +#NLS_ENCODING=UNICODE +#NLS_MESSAGEFORMAT_NONE + +data=Built-in Jakarta Data Provider +data.desc=Configures the built-in Jakarta Data provider + +createTables=Create tables +createTables.desc=Establishes the default behavior of whether to\ + attempt to create tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table creation is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table creation is determined by the databaseStore configuration.\ + The default for this setting is to attempt to create tables.\ + Disable this setting for performance reasons after the tables are created.\ + If the database user does not have authority to create tables, the\ + ddlGen tool can be used to obtain DDL for the database administrator to run. + +dropTables=Drop tables +dropTables.desc=Establishes the default behavior of whether to\ + remove tables for entities of Jakarta Data repositories\ + if the repository dataStore attribute points to a DataSource.\ + This setting is ignored when the dataStore is a persistence unit reference,\ + in which case table removal is determined by persistence unit properties.\ + This setting is also ignored when the dataStore is the id of a databaseStore,\ + in which case table removal is determined by the databaseStore configuration.\ + The default for this setting is to not remove tables. + +logValues=Log values +logValues.desc=List of fully qualified repository interface, method, or\ + package names for which to log data that is supplied to the repository.\ + Alternatively, the value * indicates to log values for all methods of\ + all repositories.\ + The default is to never log values. This setting supports opting in for each\ + repository, repository method, or package. From bb73b3039bab99f8acfdc4b13124e51712a8581c Mon Sep 17 00:00:00 2001 From: Nathan Rauh Date: Fri, 21 Jun 2024 11:42:28 -0500 Subject: [PATCH 14/14] Review comment for accidentally checked in server.env --- .../publish/servers/io.openliberty.data.internal.fat/server.env | 1 - 1 file changed, 1 deletion(-) delete mode 100644 dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.env diff --git a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.env b/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.env deleted file mode 100644 index 11d40a2b58f9..000000000000 --- a/dev/io.openliberty.data.internal_fat/publish/servers/io.openliberty.data.internal.fat/server.env +++ /dev/null @@ -1 +0,0 @@ -xJAVA_HOME=/Users/njr/drivers/jdk-21.jdk/Contents/Home