Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to EE 11 only and promote dataContainer-1.0 to beta #28816

Merged
merged 14 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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<String, String> visibilityMap = new HashMap<>();
for (Entry<String, FeatureInfo> entry : features.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ 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",\
com.ibm.websphere.appserver.eeCompatible-11.0,\
io.openliberty.cdi-4.1,\
io.openliberty.jakarta.data-1.0
-bundles=\
io.openliberty.data.internal,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ 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",\
io.openliberty.jakarta.data-1.0,\
io.openliberty.noShip-1.0
com.ibm.websphere.appserver.eeCompatible-11.0,\
io.openliberty.cdi-4.1,\
io.openliberty.jakarta.data-1.0
-bundles=\
io.openliberty.data.internal.beandef
kind=noship
edition=full
kind=beta
edition=core
WLP-Activation-Type: parallel
WLP-InstantOn-Enabled: true
WLP-Platform: jakartaee-11.0
Original file line number Diff line number Diff line change
@@ -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 <data> 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<String> logValuesList;

public String getCreateTables() {
return createTables;
}

public String getDropTables() {
return dropTables;
}

public String getLogValues() {
return logValues;
}

public Set<String> getLogValuesElements() {
if (logValuesList == null) {
logValuesList = new TreeSet<String>();
}
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();
}
}
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -26,6 +26,9 @@ public class DatabaseStore extends ConfigElement {
@XmlElement(name = "authData")
private ConfigElementList<AuthData> authDatas;

/** The drop tables indicator. */
private String dropTables;

/** Config reference to the dataSource attribute. */
private String dataSourceRef;

Expand All @@ -45,7 +48,7 @@ public class DatabaseStore extends ConfigElement {

/**
* Set the authDataRef attribute.
*
*
* @param authDataRef The authDataRef attribute to be set.
*/
@XmlAttribute
Expand All @@ -55,7 +58,7 @@ public void setAuthDataRef(String authDataRef) {

/**
* Returns the authDataRef attribute value.
*
*
* @return The authDataRef attribute value.
*/
public String getAuthDataRef() {
Expand All @@ -66,9 +69,28 @@ public ConfigElementList<AuthData> getAuthDatas() {
return authDatas == null ? (authDatas = new ConfigElementList<AuthData>()) : 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
Expand All @@ -78,7 +100,7 @@ public void setDataSourceRef(String dataSourceRef) {

/**
* Returns the dataSourceRef attribute value.
*
*
* @return The dataSourceRef attribute value.
*/
public String getDataSourceRef() {
Expand All @@ -100,7 +122,7 @@ public String getKeyGenerationStrategy() {

/**
* Sets the schema name attribute value.
*
*
* @param schema The schema name attribute value.
*/
@XmlAttribute
Expand All @@ -110,7 +132,7 @@ public void setSchema(String schema) {

/**
* Returns the schema name attribute value.
*
*
* @return The schema name attribute value.
*/
public String getSchema() {
Expand All @@ -119,7 +141,7 @@ public String getSchema() {

/**
* Sets the table prefix name attribute value.
*
*
* @param tablePrefix the table prefix name attribute value.
*/
@XmlAttribute
Expand All @@ -129,7 +151,7 @@ public void setTablePrefix(String tablePrefix) {

/**
* Returns the table prefix name.
*
*
* @return The table prefix name.
*/
public String getTablePrefix() {
Expand All @@ -138,7 +160,7 @@ public String getTablePrefix() {

/**
* Sets the create tables indicator attribute value.
*
*
* @param createTables The create tables indicator.
*/
@XmlAttribute
Expand All @@ -148,7 +170,7 @@ public void setCreateTables(String createTables) {

/**
* Returns the create tables indicator.
*
*
* @return The create tables indicator.
*/
public String getCreateTables() {
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public abstract class ServerConfiguration implements Cloneable {
@XmlElement(name = "cdi12")
private ConfigElementList<Cdi12> cdi12;

@XmlElement(name = "data")
private ConfigElementList<Data> data;

@XmlElement(name = "httpEndpoint")
private ConfigElementList<HttpEndpoint> httpEndpoints;

Expand Down Expand Up @@ -469,6 +472,19 @@ public ConfigElementList<ConnectionFactory> getConnectionFactories() {
return this.connectionFactories;
}

/**
* Returns a list of configured top level data elements.
*
* @return A list of configured top level data elements.
*/
public ConfigElementList<Data> getData() {
if (this.data == null) {
this.data = new ConfigElementList<Data>();
}

return this.data;
}

/**
* Retrieves the list of HttpEndpoints in this configuration
*
Expand Down Expand Up @@ -902,10 +918,10 @@ public ConfigElementList<ConnectionManager> 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<Application> removeApplicationsByName(String name) {
ConfigElementList<Application> installedApps = this.getApplications();
Expand All @@ -923,14 +939,14 @@ public ConfigElementList<Application> 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<Application> apps = this.getApplications();
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1266,9 +1282,9 @@ private void findModifiableConfigElements(Object element, List<ModifiableConfigE
* configuration for a feature which is not part of the product, for example one
* that is built and installed by a FAT bucket.
*
* @param tagName The tag name that should be removed.
* @param tagName The tag name that should be removed.
*
* @returns A list of the items that were removed.
* @returns A list of the items that were removed.
*/
public List<Element> removeUnknownElement(String tagName) {
List<Element> removedElements = new LinkedList<Element>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions dev/io.openliberty.data.internal.persistence/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -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: \
Expand Down
Loading