From f9433fca048b2aea75b6de3c6f5d93c403b410b2 Mon Sep 17 00:00:00 2001
From: Maduranga Siriwardena
Date: Thu, 14 Mar 2024 11:28:08 +0530
Subject: [PATCH 1/5] Add attempt 1
---
.../org.wso2.carbon.feature.mgt.core/pom.xml | 28 +-
.../pom.xml | 10 +-
.../org.wso2.carbon.p2.touchpoint/pom.xml | 4 +-
.../main/java/javax/cache/CacheManager.java | 17 +-
.../caching/impl/CarbonCacheManager.java | 29 +-
.../pom.xml | 2 +-
core/org.wso2.carbon.base/pom.xml | 14 +-
.../base/api/ServerConfigurationService.java | 1 +
.../base/internal/CarbonBaseActivator.java | 10 +-
.../wso2/carbon/base/CarbonBaseUtilsTest.java | 2 +-
.../carbon/base/ServerConfigurationTest.java | 1 +
.../src/test/resources/testng.xml | 32 +
.../bootstrap/CarbonSecurityManager.java | 3 -
.../org.wso2.carbon.coordination.core/pom.xml | 1 -
core/org.wso2.carbon.core.common/pom.xml | 2 +-
core/org.wso2.carbon.core.services/pom.xml | 6 +-
core/org.wso2.carbon.core/pom.xml | 25 +-
.../carbon/core/init/CarbonServerManager.java | 59 +-
.../core/internal/CarbonCoreDataHolder.java | 16 +
.../carbon/core/transports/CarbonServlet.java | 10 +-
.../wso2/carbon/core/util/SignatureUtil.java | 7 +-
core/org.wso2.carbon.http.bridge/pom.xml | 2 +-
.../pom.xml | 5 +-
core/org.wso2.carbon.osgi.security/pom.xml | 10 +-
core/org.wso2.carbon.registry.api/pom.xml | 3 +
core/org.wso2.carbon.registry.core/pom.xml | 41 +-
.../registry/app/RemoteRegistryService.java | 2 +
.../core/jdbc/EmbeddedRegistryService.java | 4 +-
.../jdbc/InMemoryEmbeddedRegistryService.java | 3 +
.../src/test/resources/testng.xml | 29 +
core/org.wso2.carbon.registry.xboot/pom.xml | 37 -
.../src/main/java/java/sql/NClob.java | 25 -
.../src/main/java/java/sql/RowId.java | 25 -
.../src/main/java/java/sql/SQLXML.java | 25 -
core/org.wso2.carbon.securevault/pom.xml | 5 +-
.../pom.xml | 3 +
core/org.wso2.carbon.tomcat.ext/pom.xml | 2 +-
core/org.wso2.carbon.tomcat/pom.xml | 7 +-
core/org.wso2.carbon.ui/pom.xml | 43 +-
.../carbon/ui/BundleEntryHttpContext.java | 114 ++
.../carbon/ui/CarbonSecuredHttpContext.java | 4 +-
.../org/wso2/carbon/ui/CarbonUILoginUtil.java | 14 +-
.../carbon/ui/ContextPathServletAdaptor.java | 382 ++++++
.../carbon/ui/CustomTilesInitializer.java | 26 +
.../ui/CustomTilesInitializerListener.java | 66 +
.../ui/DefaultComponentEntryHttpContext.java | 1 -
.../wso2/carbon/ui/FilterServletAdaptor.java | 89 ++
.../java/org/wso2/carbon/ui/JspServlet.java | 1 +
.../ui/SecuredComponentEntryHttpContext.java | 1 -
.../org/wso2/carbon/ui/TilesJspServlet.java | 99 +-
.../wso2/carbon/ui/UIResourceRegistry.java | 57 +-
.../wso2/carbon/ui/action/ActionHelper.java | 25 +-
.../ui/deployment/UIBundleDeployer.java | 24 +-
.../ui/internal/CarbonUIServiceComponent.java | 88 +-
.../carbon/ui/util/UIResourceProvider.java | 4 +-
.../{tiles/main_defs.xml => tiles.xml} | 0
.../resources/web/WEB-INF/tlds/tiles-jsp.tld | 1136 +++++++++--------
.../src/main/resources/web/WEB-INF/web.xml | 18 +-
core/org.wso2.carbon.user.core/pom.xml | 5 +
core/org.wso2.carbon.utils/pom.xml | 3 +
core/pom.xml | 4 +-
.../org.wso2.carbon.roles.mgt/pom.xml | 2 +-
core/server-role-manager/pom.xml | 1 +
.../features/feature-licensed/1.0.0/pom.xml | 3 +-
.../features/feature-unlicensed/pom.xml | 3 +-
.../features/feature1/1.0.0/pom.xml | 3 +-
.../features/feature1/1.0.1/pom.xml | 3 +-
.../features/feature2/1.0.0/pom.xml | 3 +-
.../features/feature2/1.0.1/pom.xml | 3 +-
.../features/feature3/1.0.0/pom.xml | 3 +-
.../features/feature3/1.0.1/pom.xml | 3 +-
.../licensed-unlicensed-features/pom.xml | 3 +-
.../sample-feature-repo1/repository/pom.xml | 3 +-
.../tests-integration/tests/pom.xml | 33 +-
.../CarbonServerBasicOperationTestCase.java | 11 +-
.../kernel/carbon-home/bin/wso2server.sh | 2 +-
distribution/kernel/pom.xml | 32 +-
.../org.wso2.carbon.styles.feature/pom.xml | 1 +
.../product/modules/p2-profile-gen/pom.xml | 8 +
.../pom.xml | 13 +-
features/org.wso2.carbon.core.feature/pom.xml | 1 +
.../pom.xml | 267 ++--
.../pom.xml | 1 +
.../org.wso2.carbon.core.ui.feature/pom.xml | 2 +
.../org.wso2.carbon.hazelcast.feature/pom.xml | 1 +
parent/pom.xml | 407 +++---
samples/pom.xml | 2 +-
.../org.wso2.carbon.student.mgt.ui/pom.xml | 1 -
.../pom.xml | 7 +-
.../pom.xml | 3 +-
.../pom.xml | 3 +-
samples/student-manager/features/pom.xml | 4 -
samples/student-manager/pom.xml | 2 +-
samples/student-manager/repository/pom.xml | 1 +
tests/caching/pom.xml | 4 +-
95 files changed, 2419 insertions(+), 1131 deletions(-)
create mode 100644 core/org.wso2.carbon.base/src/test/resources/testng.xml
create mode 100644 core/org.wso2.carbon.registry.core/src/test/resources/testng.xml
delete mode 100644 core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/NClob.java
delete mode 100644 core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/RowId.java
delete mode 100644 core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java
create mode 100644 core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleEntryHttpContext.java
create mode 100644 core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/ContextPathServletAdaptor.java
create mode 100644 core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializer.java
create mode 100644 core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializerListener.java
create mode 100644 core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/FilterServletAdaptor.java
rename core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/{tiles/main_defs.xml => tiles.xml} (100%)
diff --git a/core/feature-manager/org.wso2.carbon.feature.mgt.core/pom.xml b/core/feature-manager/org.wso2.carbon.feature.mgt.core/pom.xml
index 77578b7a6ff..1b843e59cfa 100644
--- a/core/feature-manager/org.wso2.carbon.feature.mgt.core/pom.xml
+++ b/core/feature-manager/org.wso2.carbon.feature.mgt.core/pom.xml
@@ -40,7 +40,7 @@
org.wso2.carbon.utils
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.artifact.repository
@@ -48,7 +48,7 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
+ org.eclipse.platform
org.eclipse.osgi.services
@@ -68,7 +68,7 @@
org.eclipse.equinox.http.servlet
- org.eclipse.osgi
+ org.eclipse.platform
org.eclipse.equinox.jsp.jasper
@@ -90,39 +90,39 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
+ org.eclipse.platform
org.eclipse.osgi.services
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.common
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.core
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.director
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.engine
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.metadata
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.metadata.repository
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.repository
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.simpleconfigurator
@@ -162,6 +162,10 @@
org.wso2.carbon.feature.mgt.core.*
+
+
+ osgi.service;objectClass=org.eclipse.equinox.p2.core.IProvisioningAgentProvider
+
diff --git a/core/feature-manager/org.wso2.carbon.feature.mgt.services/pom.xml b/core/feature-manager/org.wso2.carbon.feature.mgt.services/pom.xml
index 7d90b69b15d..921eabfa64f 100644
--- a/core/feature-manager/org.wso2.carbon.feature.mgt.services/pom.xml
+++ b/core/feature-manager/org.wso2.carbon.feature.mgt.services/pom.xml
@@ -54,23 +54,23 @@
org.wso2.carbon.feature.mgt.core
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.core
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.engine
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.metadata
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.repository
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.common
diff --git a/core/feature-manager/org.wso2.carbon.p2.touchpoint/pom.xml b/core/feature-manager/org.wso2.carbon.p2.touchpoint/pom.xml
index 092fc6a3513..1b77f11487a 100644
--- a/core/feature-manager/org.wso2.carbon.p2.touchpoint/pom.xml
+++ b/core/feature-manager/org.wso2.carbon.p2.touchpoint/pom.xml
@@ -16,11 +16,11 @@
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.common
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.engine
diff --git a/core/javax.cache/src/main/java/javax/cache/CacheManager.java b/core/javax.cache/src/main/java/javax/cache/CacheManager.java
index ba48b75ecb3..9e8eddda562 100644
--- a/core/javax.cache/src/main/java/javax/cache/CacheManager.java
+++ b/core/javax.cache/src/main/java/javax/cache/CacheManager.java
@@ -7,8 +7,6 @@
package javax.cache;
-import javax.transaction.UserTransaction;
-
/**
* A CacheManager is used for looking up Caches and controls their lifecycle. It represents a collection of caches.
*
@@ -127,13 +125,14 @@ public interface CacheManager {
*/
boolean removeCache(String cacheName);
- /**
- * This method will return a UserTransaction.
- *
- * @return the UserTransaction.
- * @throws UnsupportedOperationException if JTA is not supported
- */
- UserTransaction getUserTransaction();
+ // TODO javax.transaction package is no longer available. Need to find a way to add this back
+// /**
+// * This method will return a UserTransaction.
+// *
+// * @return the UserTransaction.
+// * @throws UnsupportedOperationException if JTA is not supported
+// */
+// UserTransaction getUserTransaction();
/**
* Indicates whether a optional feature is supported by this CacheManager.
diff --git a/core/javax.cache/src/main/java/org/wso2/carbon/caching/impl/CarbonCacheManager.java b/core/javax.cache/src/main/java/org/wso2/carbon/caching/impl/CarbonCacheManager.java
index 66329c8344e..14f27cf9ddc 100644
--- a/core/javax.cache/src/main/java/org/wso2/carbon/caching/impl/CarbonCacheManager.java
+++ b/core/javax.cache/src/main/java/org/wso2/carbon/caching/impl/CarbonCacheManager.java
@@ -17,16 +17,10 @@
*/
package org.wso2.carbon.caching.impl;
-import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.base.ServerConfiguration;
+import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
-import javax.cache.Cache;
-import javax.cache.CacheBuilder;
-import javax.cache.CacheException;
-import javax.cache.CacheManager;
-import javax.cache.OptionalFeature;
-import javax.cache.Status;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
@@ -34,6 +28,13 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import javax.cache.Cache;
+import javax.cache.CacheBuilder;
+import javax.cache.CacheException;
+import javax.cache.CacheManager;
+import javax.cache.OptionalFeature;
+import javax.cache.Status;
+
import static org.wso2.carbon.caching.impl.CachingConstants.ILLEGAL_STATE_EXCEPTION_MESSAGE;
/**
@@ -202,13 +203,13 @@ boolean removeLocalCaches() {
return this.caches.isEmpty();
}
- @Override
- public javax.transaction.UserTransaction getUserTransaction() {
- Util.checkAccess(ownerTenantDomain, ownerTenantId);
- checkStatusStarted();
- touch();
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
+// @Override
+// public javax.transaction.UserTransaction getUserTransaction() {
+// Util.checkAccess(ownerTenantDomain, ownerTenantId);
+// checkStatusStarted();
+// touch();
+// return null; //To change body of implemented methods use File | Settings | File Templates.
+// }
@Override
public boolean isSupported(OptionalFeature optionalFeature) {
diff --git a/core/org.wso2.carbon.application.deployer/pom.xml b/core/org.wso2.carbon.application.deployer/pom.xml
index 9527b6f8d36..9f5d25074a9 100644
--- a/core/org.wso2.carbon.application.deployer/pom.xml
+++ b/core/org.wso2.carbon.application.deployer/pom.xml
@@ -37,7 +37,7 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
+ org.eclipse.platform
org.eclipse.osgi.services
diff --git a/core/org.wso2.carbon.base/pom.xml b/core/org.wso2.carbon.base/pom.xml
index d6956284c62..d9e6036e3f5 100644
--- a/core/org.wso2.carbon.base/pom.xml
+++ b/core/org.wso2.carbon.base/pom.xml
@@ -36,7 +36,6 @@
org.apache.felix
maven-bundle-plugin
-
true
@@ -48,7 +47,7 @@
org.wso2.carbon.base.*; version="1.0.0"
- javax.activation.*;version="[0.0.0, 1.0.0)",
+ javax.activation.*;version="[1.0.0, 2.0.0)",
javax.servlet; version="${imp.pkg.version.javax.servlet}",
javax.servlet.http; version="${imp.pkg.version.javax.servlet}",
org.wso2.securevault.*,
@@ -59,6 +58,9 @@
*;resolution:=optional
+
+ osgi.service;objectClass=org.wso2.carbon.base.api.ServerConfigurationService
+
@@ -67,12 +69,19 @@
maven-surefire-plugin
true
+
+ --add-opens=java.base/java.lang=ALL-UNNAMED
+ --add-opens=java.base/java.util=ALL-UNNAMED
+
org.wso2.org.ops4j.pax.logging:pax-logging-api
org.apache.logging.log4j.jul.LogManager
+
+ src/test/resources/testng.xml
+
@@ -118,6 +127,7 @@
org.eclipse.equinox
javax.servlet
+
org.wso2.orbit.xerces
xercesImpl
diff --git a/core/org.wso2.carbon.base/src/main/java/org/wso2/carbon/base/api/ServerConfigurationService.java b/core/org.wso2.carbon.base/src/main/java/org/wso2/carbon/base/api/ServerConfigurationService.java
index ba5d1238c4e..76987f80810 100644
--- a/core/org.wso2.carbon.base/src/main/java/org/wso2/carbon/base/api/ServerConfigurationService.java
+++ b/core/org.wso2.carbon.base/src/main/java/org/wso2/carbon/base/api/ServerConfigurationService.java
@@ -1,5 +1,6 @@
package org.wso2.carbon.base.api;
+import org.osgi.service.component.annotations.Component;
import org.w3c.dom.Element;
import java.util.Set;
diff --git a/core/org.wso2.carbon.base/src/main/java/org/wso2/carbon/base/internal/CarbonBaseActivator.java b/core/org.wso2.carbon.base/src/main/java/org/wso2/carbon/base/internal/CarbonBaseActivator.java
index 6d1cec0bbb3..cd53af91503 100644
--- a/core/org.wso2.carbon.base/src/main/java/org/wso2/carbon/base/internal/CarbonBaseActivator.java
+++ b/core/org.wso2.carbon.base/src/main/java/org/wso2/carbon/base/internal/CarbonBaseActivator.java
@@ -22,16 +22,19 @@
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
-import org.wso2.carbon.base.CarbonBaseConstants;
import org.wso2.carbon.base.CarbonBaseUtils;
import org.wso2.carbon.base.ServerConfiguration;
import org.wso2.carbon.base.ServerConfigurationException;
import org.wso2.carbon.base.api.ServerConfigurationService;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
import javax.servlet.ServletException;
-import java.io.*;
/**
* Activator of the {@link org.wso2.carbon.base} bundle
@@ -52,7 +55,6 @@ public void start(BundleContext bundleContext) throws Exception {
System.setProperty("portOffset", portOffset);
//register carbon server confg as an OSGi service
registration = bundleContext.registerService(ServerConfigurationService.class.getName(), carbonServerConfiguration, null);
-
}
@Override
diff --git a/core/org.wso2.carbon.base/src/test/java/org/wso2/carbon/base/CarbonBaseUtilsTest.java b/core/org.wso2.carbon.base/src/test/java/org/wso2/carbon/base/CarbonBaseUtilsTest.java
index 2f0937898cb..2d2a5729106 100644
--- a/core/org.wso2.carbon.base/src/test/java/org/wso2/carbon/base/CarbonBaseUtilsTest.java
+++ b/core/org.wso2.carbon.base/src/test/java/org/wso2/carbon/base/CarbonBaseUtilsTest.java
@@ -50,7 +50,7 @@ public void setSecurityManager() {
String resourcePath = resourceURL.getPath();
resourcePath = resourcePath + "policy-test.policy";
System.setProperty("java.security.policy", resourcePath);
- System.setSecurityManager(new SecurityManager());
+// System.setSecurityManager(new SecurityManager());
}
}
diff --git a/core/org.wso2.carbon.base/src/test/java/org/wso2/carbon/base/ServerConfigurationTest.java b/core/org.wso2.carbon.base/src/test/java/org/wso2/carbon/base/ServerConfigurationTest.java
index 9ee214c727e..f2abc748d79 100644
--- a/core/org.wso2.carbon.base/src/test/java/org/wso2/carbon/base/ServerConfigurationTest.java
+++ b/core/org.wso2.carbon.base/src/test/java/org/wso2/carbon/base/ServerConfigurationTest.java
@@ -54,6 +54,7 @@ public void createInstance() throws ServerConfigurationException, NoSuchFieldExc
IllegalAccessException {
assertFalse(getIsInitialized(ServerConfiguration.getInstance(), "isInitialized"));
InputStream inputStream = readFile("carbon.xml");
+ //TODO carbon.home is not set
ServerConfiguration.getInstance().forceInit(inputStream);
assertTrue(getIsInitialized(ServerConfiguration.getInstance(), "isInitialized"));
}
diff --git a/core/org.wso2.carbon.base/src/test/resources/testng.xml b/core/org.wso2.carbon.base/src/test/resources/testng.xml
new file mode 100644
index 00000000000..10e44e3d88c
--- /dev/null
+++ b/core/org.wso2.carbon.base/src/test/resources/testng.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/org.wso2.carbon.bootstrap/src/main/java/org/wso2/carbon/bootstrap/CarbonSecurityManager.java b/core/org.wso2.carbon.bootstrap/src/main/java/org/wso2/carbon/bootstrap/CarbonSecurityManager.java
index bbe968676c4..4bb661d3016 100644
--- a/core/org.wso2.carbon.bootstrap/src/main/java/org/wso2/carbon/bootstrap/CarbonSecurityManager.java
+++ b/core/org.wso2.carbon.bootstrap/src/main/java/org/wso2/carbon/bootstrap/CarbonSecurityManager.java
@@ -18,9 +18,6 @@
package org.wso2.carbon.bootstrap;
-import java.security.AccessControlContext;
-import java.security.AccessControlException;
-import java.security.Policy;
import java.util.ArrayList;
import java.util.List;
diff --git a/core/org.wso2.carbon.coordination.core/pom.xml b/core/org.wso2.carbon.coordination.core/pom.xml
index 5f5dc73338b..e32262f4fec 100644
--- a/core/org.wso2.carbon.coordination.core/pom.xml
+++ b/core/org.wso2.carbon.coordination.core/pom.xml
@@ -89,7 +89,6 @@
org.apache.felix
maven-bundle-plugin
- 1.4.0
true
diff --git a/core/org.wso2.carbon.core.common/pom.xml b/core/org.wso2.carbon.core.common/pom.xml
index 6a388d8cafb..378288ad7ec 100644
--- a/core/org.wso2.carbon.core.common/pom.xml
+++ b/core/org.wso2.carbon.core.common/pom.xml
@@ -57,7 +57,7 @@
!org.wso2.carbon.core.common.*,
- javax.activation.*;version="[0.0.0, 1.0.0)"
+ javax.activation.*;version="[1.0.0, 2.0.0)"
diff --git a/core/org.wso2.carbon.core.services/pom.xml b/core/org.wso2.carbon.core.services/pom.xml
index 4604baf3403..40b8b7e87ed 100644
--- a/core/org.wso2.carbon.core.services/pom.xml
+++ b/core/org.wso2.carbon.core.services/pom.xml
@@ -37,7 +37,11 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
+ org.eclipse.equinox
+ javax.servlet
+
+
+ org.eclipse.platform
org.eclipse.osgi.services
diff --git a/core/org.wso2.carbon.core/pom.xml b/core/org.wso2.carbon.core/pom.xml
index 0ecce32127f..3fcfe369e42 100644
--- a/core/org.wso2.carbon.core/pom.xml
+++ b/core/org.wso2.carbon.core/pom.xml
@@ -37,13 +37,24 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
- org.eclipse.osgi.services
+ org.eclipse.equinox
+ javax.servlet
+ ${version.equinox.javax.servlet}
- org.eclipse.equinox
- org.eclipse.equinox.http.helper
+ org.eclipse.platform
+ org.eclipse.osgi.services
+
+
+ org.eclipse.jetty.toolchain
+ jetty-servlet
+
+
+
+
+
+
junit
junit
@@ -257,6 +268,9 @@
naming-factory|naming-resources|commons-collections;scope=compile|runtime;inline=false
+
+ osgi.service;objectClass=org.wso2.carbon.utils.ConfigurationContextService
+
true
*
@@ -283,6 +297,9 @@
org.apache.logging.log4j.jul.LogManager
+
+ src/test/resources/testng.xml
+
diff --git a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/init/CarbonServerManager.java b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/init/CarbonServerManager.java
index 12f32c9489e..87bbabb36a1 100644
--- a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/init/CarbonServerManager.java
+++ b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/init/CarbonServerManager.java
@@ -36,19 +36,21 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.eclipse.core.runtime.adaptor.EclipseStarter;
-import org.eclipse.equinox.http.helper.FilterServletAdaptor;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceEvent;
import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
import org.osgi.service.http.HttpContext;
import org.osgi.service.http.HttpService;
-import org.osgi.service.http.NamespaceException;
+import org.osgi.service.http.context.ServletContextHelper;
+import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.base.CarbonBaseConstants;
import org.wso2.carbon.base.CarbonContextHolderBase;
import org.wso2.carbon.base.api.ServerConfigurationService;
+import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.core.CarbonAxisConfigurator;
import org.wso2.carbon.core.CarbonConfigurationContextFactory;
import org.wso2.carbon.core.CarbonThreadCleanup;
@@ -61,10 +63,9 @@
import org.wso2.carbon.core.deployment.RegistryBasedRepositoryUpdater;
import org.wso2.carbon.core.internal.CarbonCoreDataHolder;
import org.wso2.carbon.core.internal.CarbonCoreServiceComponent;
-import org.wso2.carbon.core.multitenancy.GenericArtifactUnloader;
import org.wso2.carbon.core.internal.HTTPGetProcessorListener;
+import org.wso2.carbon.core.multitenancy.GenericArtifactUnloader;
import org.wso2.carbon.core.multitenancy.MultitenantServerManager;
-import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils;
import org.wso2.carbon.core.security.CarbonJMXAuthenticator;
import org.wso2.carbon.core.transports.CarbonServlet;
@@ -92,8 +93,6 @@
import org.wso2.carbon.utils.deployment.GhostDeployerUtils;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
-import javax.servlet.Filter;
-import javax.servlet.ServletException;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
@@ -102,6 +101,7 @@
import java.util.Date;
import java.util.Dictionary;
import java.util.Enumeration;
+import java.util.Hashtable;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
@@ -116,6 +116,10 @@
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
+import javax.servlet.Filter;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+
import static org.apache.axis2.transport.TransportListener.HOST_ADDRESS;
/**
@@ -487,9 +491,10 @@ private void initializeCarbon() {
}
HttpService httpService = CarbonCoreDataHolder.getInstance().getHttpService();
+ // TODO might want to do this differently
HttpContext defaultHttpContext = httpService.createDefaultHttpContext();
- registerCarbonServlet(httpService, defaultHttpContext);
+ registerCarbonServlet(defaultHttpContext);
RealmService realmService = CarbonCoreDataHolder.getInstance().getRealmService();
UserRealm teannt0Realm = realmService.getBootstrapRealm();
@@ -539,8 +544,8 @@ private void initializeCarbon() {
}
}
- private void registerCarbonServlet(HttpService httpService, HttpContext defaultHttpContext)
- throws ServletException, NamespaceException, InvalidSyntaxException {
+ private void registerCarbonServlet(HttpContext defaultHttpContext) throws InvalidSyntaxException {
+
if (!"false".equals(serverConfig.getFirstProperty("RequireCarbonServlet"))) {
CarbonServlet carbonServlet = new CarbonServlet(serverConfigContext);
String servicePath = "/services";
@@ -552,11 +557,30 @@ private void registerCarbonServlet(HttpService httpService, HttpContext defaultH
servicePath = "/" + servicePath;
}
ServiceReference filterServiceReference = bundleContext.getServiceReference(Filter.class.getName());
+
+ Dictionary resourceProps = new Hashtable<>();
+ resourceProps.put("osgi.http.whiteboard.context.name", "serviceContext");
+ resourceProps.put("osgi.http.whiteboard.context.path", servicePath);
+ resourceProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN, servicePath + "/*");
+ ServiceRegistration servletContextHelperServiceRegistration =
+ bundleContext.registerService(ServletContextHelper.class, (ServletContextHelper) defaultHttpContext,
+ resourceProps);
+ CarbonCoreDataHolder.getInstance().addServiceRegistration(servletContextHelperServiceRegistration);
+
+ Dictionary carbonServletProperties = new Hashtable<>();
+ carbonServletProperties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/*");
+ carbonServletProperties.put("osgi.http.whiteboard.context.select", "(osgi.http.whiteboard.context.name=serviceContext)");
+ ServiceRegistration servletServiceRegistration =
+ bundleContext.registerService(Servlet.class, carbonServlet, carbonServletProperties);
+ CarbonCoreDataHolder.getInstance().addServiceRegistration(servletServiceRegistration);
+
if (filterServiceReference != null) {
Filter filter = (Filter) bundleContext.getService(filterServiceReference);
- httpService.registerServlet(servicePath, new FilterServletAdaptor(filter, null, carbonServlet), null, defaultHttpContext);
- } else {
- httpService.registerServlet(servicePath, carbonServlet, null, defaultHttpContext);
+ Dictionary props = new Hashtable<>();
+ props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN, servicePath);
+ ServiceRegistration filterServiceRegistration =
+ bundleContext.registerService(Filter.class, filter, props);
+ CarbonCoreDataHolder.getInstance().addServiceRegistration(filterServiceRegistration);
}
HTTPGetProcessorListener getProcessorListener =
new HTTPGetProcessorListener(carbonServlet, bundleContext);
@@ -941,17 +965,8 @@ public void stop() throws Exception {
((Map) property).clear();
}
- // un-registering the carbonServlet
- String servicePath = "/services"; // default path
- String path = serverConfigContext.getServicePath();
- if (path != null) {
- servicePath = path.trim();
- }
- if (!servicePath.startsWith("/")) {
- servicePath = "/" + servicePath;
- }
try {
- CarbonCoreDataHolder.getInstance().getHttpService().unregister(servicePath);
+ CarbonCoreDataHolder.getInstance().unregisterServiceRegistrations();
} catch (Exception e) {
log.error("Failed to Un-register Servlets ", e);
}
diff --git a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreDataHolder.java b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreDataHolder.java
index 00c1e8272b3..86cb2276f7c 100644
--- a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreDataHolder.java
+++ b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreDataHolder.java
@@ -20,7 +20,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
import org.osgi.service.http.HttpService;
+import org.osgi.service.http.context.ServletContextHelper;
import org.wso2.carbon.base.api.ServerConfigurationService;
import org.wso2.carbon.crypto.api.CryptoService;
import org.wso2.carbon.registry.core.service.RegistryService;
@@ -47,6 +49,8 @@ public class CarbonCoreDataHolder {
private ServerConfigurationService serverConfigurationService;
private TenantRegistryLoader tenantRegistryLoader;
+ private List> serviceRegistrations = new ArrayList<>();
+
private List coordinatedActivities = new ArrayList() ;
private CryptoService cryptoService;
@@ -166,4 +170,16 @@ public CryptoService getCryptoService() {
return cryptoService;
}
+
+ public void addServiceRegistration(ServiceRegistration> serviceRegistration) {
+
+ serviceRegistrations.add(serviceRegistration);
+ }
+
+ public void unregisterServiceRegistrations() {
+
+ for (ServiceRegistration> serviceRegistration : serviceRegistrations) {
+ serviceRegistration.unregister();
+ }
+ }
}
diff --git a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/transports/CarbonServlet.java b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/transports/CarbonServlet.java
index d322bb36a45..c9471794ffe 100644
--- a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/transports/CarbonServlet.java
+++ b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/transports/CarbonServlet.java
@@ -83,15 +83,21 @@ public void init(ServletConfig config) throws ServletException {
configContext.setProperty("GETRequestProcessorMap", getRequestProcessors);
initParams();
String isMeteringEnabledStr = ServerConfiguration.getInstance().getFirstProperty("EnableMetering");
- if(isMeteringEnabledStr!=null){
+ if (isMeteringEnabledStr != null) {
isMeteringEnabled = Boolean.parseBoolean(isMeteringEnabledStr);
}
- if(isMeteringEnabled){
+ if (isMeteringEnabled) {
requestDataPersister = new RequestDataPersisterTask();
new Thread(requestDataPersister).start();
requestDataPersisterScheduler.scheduleWithFixedDelay(requestDataPersister, 5,
5, TimeUnit.SECONDS);
}
+ contextRoot = this.configContext.getContextRoot();
+ }
+
+ public ServletConfig getServletConfig() {
+
+ return servletConfig;
}
private void populateGetRequestProcessors() throws ServletException {
diff --git a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/util/SignatureUtil.java b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/util/SignatureUtil.java
index 71116381835..0e2ba86f754 100644
--- a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/util/SignatureUtil.java
+++ b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/util/SignatureUtil.java
@@ -53,9 +53,10 @@ public static void init() throws Exception {
provider = (Provider) (Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider")).
getDeclaredConstructor().newInstance();
- } else if (providerName.equals(ServerConstants.JCE_PROVIDER_BCFIPS)) {
- provider = (Provider) (Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider")).
- getDeclaredConstructor().newInstance();
+ //TODO check why this is not working
+// } else if (providerName.equals(ServerConstants.JCE_PROVIDER_BCFIPS)) {
+// provider = (Provider) (Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider")).
+// getDeclaredConstructor().newInstance();
} else {
throw new NoSuchProviderException("Configured JCE provider is not supported.");
diff --git a/core/org.wso2.carbon.http.bridge/pom.xml b/core/org.wso2.carbon.http.bridge/pom.xml
index 4ede0af8066..b2f105766e0 100644
--- a/core/org.wso2.carbon.http.bridge/pom.xml
+++ b/core/org.wso2.carbon.http.bridge/pom.xml
@@ -54,7 +54,7 @@
org.wso2.carbon.bridge
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.http.servlet
diff --git a/core/org.wso2.carbon.ndatasource.common/pom.xml b/core/org.wso2.carbon.ndatasource.common/pom.xml
index ab501c2bd94..9e0bee9aa3e 100644
--- a/core/org.wso2.carbon.ndatasource.common/pom.xml
+++ b/core/org.wso2.carbon.ndatasource.common/pom.xml
@@ -47,7 +47,10 @@
org.wso2.carbon.ndatasource.common.*
- *
+
+
+ org.apache.commons.logging;version="[1.2,2)"
+
diff --git a/core/org.wso2.carbon.osgi.security/pom.xml b/core/org.wso2.carbon.osgi.security/pom.xml
index 58b63b205cc..0a21119a58c 100644
--- a/core/org.wso2.carbon.osgi.security/pom.xml
+++ b/core/org.wso2.carbon.osgi.security/pom.xml
@@ -39,13 +39,13 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
+ org.eclipse.platform
org.eclipse.osgi.services
-
- org.eclipse.equinox
- org.eclipse.equinox.http.helper
-
+
+
+
+
junit
junit
diff --git a/core/org.wso2.carbon.registry.api/pom.xml b/core/org.wso2.carbon.registry.api/pom.xml
index 61b1c681444..de43985593f 100644
--- a/core/org.wso2.carbon.registry.api/pom.xml
+++ b/core/org.wso2.carbon.registry.api/pom.xml
@@ -46,6 +46,9 @@
!javax.servlet.http,
org.wso2.carbon.registry.api.*;version=1.0.1,
+
+ !*
+
diff --git a/core/org.wso2.carbon.registry.core/pom.xml b/core/org.wso2.carbon.registry.core/pom.xml
index 9017965f058..d67cde84804 100644
--- a/core/org.wso2.carbon.registry.core/pom.xml
+++ b/core/org.wso2.carbon.registry.core/pom.xml
@@ -54,7 +54,7 @@
org.wso2.carbon.user.*,
org.wso2.carbon.utils.*,
!javax.xml.namespace,
- javax.activation.*;version="[0.0.0, 1.0.0)",
+ javax.activation.*;version="[1.0.0, 2.0.0)",
org.apache.abdera.*; version="${imp.pkg.version.abdera}",
javax.xml.namespace; version=0.0.0,
javax.servlet; version="${imp.pkg.version.javax.servlet}",
@@ -68,6 +68,11 @@
*;resolution:=optional
*
+
+ osgi.service;objectClass=org.wso2.carbon.registry.core.service.RegistryService,
+ osgi.service;objectClass=org.wso2.carbon.registry.api.RegistryService,
+ osgi.service;objectClass=org.wso2.carbon.registry.core.service.TenantRegistryLoader
+
acegi-security;scope=compile|runtime;inline=false
@@ -102,7 +107,8 @@
false
- pertest
+ 1
+ false
-enableassertions
false
${project.build.directory}/surefire-reports-0
@@ -126,7 +132,8 @@
false
- pertest
+ 1
+ false
-enableassertions
false
${project.build.directory}/surefire-reports-1
@@ -150,7 +157,8 @@
false
- pertest
+ 1
+ false
-enableassertions
false
${project.build.directory}/surefire-reports-2
@@ -174,7 +182,8 @@
false
- pertest
+ 1
+ false
-enableassertions
false
${project.build.directory}/surefire-reports-3
@@ -198,7 +207,8 @@
false
- pertest
+ 1
+ false
-enableassertions
false
${project.build.directory}/surefire-reports-4
@@ -226,7 +236,8 @@
false
- pertest
+ 1
+ false
-enableassertions
false
${project.build.directory}/surefire-reports-5
@@ -254,7 +265,8 @@
false
- pertest
+ 1
+ false
-enableassertions
false
${project.build.directory}/surefire-reports-6
@@ -282,7 +294,8 @@
false
- pertest
+ 1
+ false
-enableassertions
false
${project.build.directory}/surefire-reports-7
@@ -310,7 +323,8 @@
false
- pertest
+ 1
+ false
-enableassertions
false
${project.build.directory}/surefire-reports-8
@@ -376,9 +390,14 @@
annotations
- org.wso2.eclipse.osgi
+ org.eclipse.platform
org.eclipse.osgi.services
+
+
+
+
+
junit
junit
diff --git a/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/app/RemoteRegistryService.java b/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/app/RemoteRegistryService.java
index d4cc7baa286..40a620805a2 100644
--- a/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/app/RemoteRegistryService.java
+++ b/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/app/RemoteRegistryService.java
@@ -19,6 +19,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.osgi.service.component.annotations.Component;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.registry.core.Registry;
import org.wso2.carbon.registry.core.RegistryConstants;
@@ -42,6 +43,7 @@
* to create remote registry instances for user sessions. The class acts in a manner that is similar
* to an {@link EmbeddedRegistryService}.
*/
+//@Component(service = RegistryService.class)
public class RemoteRegistryService implements RegistryService {
private static final Log log = LogFactory.getLog(RemoteRegistryService.class);
diff --git a/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/EmbeddedRegistryService.java b/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/EmbeddedRegistryService.java
index da4a63516e4..dc38fd42161 100644
--- a/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/EmbeddedRegistryService.java
+++ b/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/EmbeddedRegistryService.java
@@ -18,6 +18,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.osgi.service.component.annotations.Component;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.registry.core.RegistryConstants;
import org.wso2.carbon.registry.core.clustering.NodeGroupLock;
@@ -25,7 +26,6 @@
import org.wso2.carbon.registry.core.config.RegistryContext;
import org.wso2.carbon.registry.core.dataaccess.DataAccessManager;
import org.wso2.carbon.registry.core.exceptions.RegistryException;
-import org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent;
import org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCDataAccessManager;
import org.wso2.carbon.registry.core.jdbc.realm.RegistryRealm;
import org.wso2.carbon.registry.core.jdbc.utils.Transaction;
@@ -35,7 +35,6 @@
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.UserRealm;
import org.wso2.carbon.user.core.service.RealmService;
-import org.wso2.carbon.user.core.util.UserCoreUtil;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
@@ -71,6 +70,7 @@
* @see EmbeddedRegistry
* @see UserRegistry
*/
+//@Component(service = RegistryService.class)
public class EmbeddedRegistryService implements RegistryService {
private static final Log log = LogFactory.getLog(EmbeddedRegistryService.class);
diff --git a/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/InMemoryEmbeddedRegistryService.java b/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/InMemoryEmbeddedRegistryService.java
index 27552d76c1f..cb2c9de1a3f 100644
--- a/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/InMemoryEmbeddedRegistryService.java
+++ b/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/InMemoryEmbeddedRegistryService.java
@@ -16,9 +16,11 @@
package org.wso2.carbon.registry.core.jdbc;
+import org.osgi.service.component.annotations.Component;
import org.wso2.carbon.registry.core.config.RegistryContext;
import org.wso2.carbon.registry.core.exceptions.RegistryException;
import org.wso2.carbon.registry.core.jdbc.realm.InMemoryRealmService;
+import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.user.api.RealmConfiguration;
import org.wso2.carbon.user.core.service.RealmService;
@@ -28,6 +30,7 @@
* This is an extension to the {@link EmbeddedRegistryService} which is tailored to expose {@link
* InMemoryEmbeddedRegistry} instances as OSGi services.
*/
+//@Component(service = RegistryService.class)
public class InMemoryEmbeddedRegistryService extends EmbeddedRegistryService {
private RealmService realmService;
diff --git a/core/org.wso2.carbon.registry.core/src/test/resources/testng.xml b/core/org.wso2.carbon.registry.core/src/test/resources/testng.xml
new file mode 100644
index 00000000000..9e60b4c8c4c
--- /dev/null
+++ b/core/org.wso2.carbon.registry.core/src/test/resources/testng.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/org.wso2.carbon.registry.xboot/pom.xml b/core/org.wso2.carbon.registry.xboot/pom.xml
index 67c8c3dd23c..e69de29bb2d 100644
--- a/core/org.wso2.carbon.registry.xboot/pom.xml
+++ b/core/org.wso2.carbon.registry.xboot/pom.xml
@@ -1,37 +0,0 @@
-
-
-
-
-
-
- org.wso2.carbon
- carbon-kernel
- 4.10.108-SNAPSHOT
- ../pom.xml
-
-
- 4.0.0
- org.wso2.carbon.registry.xboot
- jar
- WSO2 Carbon - Xbootclasspath library for Registry Kernel
- Xboot library which handle the SQL Connection API differences in JDK 5 and JDK 6
- http://wso2.org
-
-
-
-
-
diff --git a/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/NClob.java b/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/NClob.java
deleted file mode 100644
index 7571e44674a..00000000000
--- a/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/NClob.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2005-2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 Inc. licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package java.sql;
-
-/**
- * Dummy implementation of NClob in JDK6
- */
-public interface NClob {
-}
diff --git a/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/RowId.java b/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/RowId.java
deleted file mode 100644
index bd125b8bc40..00000000000
--- a/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/RowId.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2005-2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 Inc. licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package java.sql;
-
-/**
- * Dummy implementation of RowId in JDK6
- */
-public interface RowId {
-}
diff --git a/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java b/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java
deleted file mode 100644
index 0947067d332..00000000000
--- a/core/org.wso2.carbon.registry.xboot/src/main/java/java/sql/SQLXML.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2005-2009, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
- *
- * WSO2 Inc. licenses this file to you under the Apache License,
- * Version 2.0 (the "License"); you may not use this file except
- * in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package java.sql;
-
-/**
- * Dummy implementation of SQLXML in JDK6
- */
-public interface SQLXML {
-}
diff --git a/core/org.wso2.carbon.securevault/pom.xml b/core/org.wso2.carbon.securevault/pom.xml
index 9b7eaa4d1e3..63403543887 100644
--- a/core/org.wso2.carbon.securevault/pom.xml
+++ b/core/org.wso2.carbon.securevault/pom.xml
@@ -36,7 +36,7 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
+ org.eclipse.platform
org.eclipse.osgi.services
@@ -86,6 +86,9 @@
*;resolution:=optional
*
+
+ osgi.service;objectClass=org.wso2.carbon.securevault.SecretCallbackHandlerService
+
diff --git a/core/org.wso2.carbon.server.admin.common/pom.xml b/core/org.wso2.carbon.server.admin.common/pom.xml
index 51c54b6933b..7eb677254bc 100644
--- a/core/org.wso2.carbon.server.admin.common/pom.xml
+++ b/core/org.wso2.carbon.server.admin.common/pom.xml
@@ -55,6 +55,9 @@
org.wso2.carbon.server.admin.common.*
+
+ !*
+
diff --git a/core/org.wso2.carbon.tomcat.ext/pom.xml b/core/org.wso2.carbon.tomcat.ext/pom.xml
index e5767426d4a..f1a30d619e7 100644
--- a/core/org.wso2.carbon.tomcat.ext/pom.xml
+++ b/core/org.wso2.carbon.tomcat.ext/pom.xml
@@ -36,7 +36,7 @@
org.eclipse.osgi
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.common
diff --git a/core/org.wso2.carbon.tomcat/pom.xml b/core/org.wso2.carbon.tomcat/pom.xml
index ff180dff4bf..528e9db75fc 100644
--- a/core/org.wso2.carbon.tomcat/pom.xml
+++ b/core/org.wso2.carbon.tomcat/pom.xml
@@ -36,11 +36,11 @@
org.eclipse.osgi
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.http.servlet
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.common
@@ -119,6 +119,9 @@
*;resolution:=optional
*
+
+ osgi.service;objectClass=org.wso2.carbon.tomcat.api.CarbonTomcatService
+
diff --git a/core/org.wso2.carbon.ui/pom.xml b/core/org.wso2.carbon.ui/pom.xml
index 16e848516e3..3496489c291 100644
--- a/core/org.wso2.carbon.ui/pom.xml
+++ b/core/org.wso2.carbon.ui/pom.xml
@@ -37,21 +37,32 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
+ org.eclipse.equinox
+ javax.servlet
+ ${version.equinox.javax.servlet}
+
+
+ org.eclipse.platform
org.eclipse.osgi.services
+
+
+ org.eclipse.jetty.toolchain
+ jetty-servlet
+
+
org.apache.ws.commons.axiom.wso2
axiom
- org.apache.tiles.wso2
+ org.wso2.orbit.org.apache.tiles
tiles-jsp
-
- org.apache.tiles
- tiles-jsp
-
+
+
+
+
commons-digester
commons-digester
@@ -62,6 +73,17 @@
+
+
+
+
+
+
+
+
+
+
+
org.wso2.carbon
org.wso2.carbon.core
@@ -111,7 +133,7 @@
axis2
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.http.servlet
@@ -146,10 +168,6 @@
-
- org.eclipse.equinox
- javax.servlet
-
commons-lang.wso2
commons-lang
@@ -222,8 +240,7 @@
javax.servlet.http; version="${imp.pkg.version.javax.servlet}",
javax.servlet.jsp; version="${imp.pkg.version.javax.servlet.jsp}"
javax.servlet.jsp.tagext; version="${imp.pkg.version.javax.servlet.jsp}",
- org.eclipse.equinox.http.helper,
- org.apache.tiles.*;version="2.0.5",
+ org.apache.tiles.*;version="3.0.7",
org.wso2.carbon.registry.core.service,
org.owasp.csrfguard.tag.*; version="${orbit.version.csrfguard}",
org.owasp.encoder.*;version="${owasp.encoder.wso2.imp.pkg.version}",
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleEntryHttpContext.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleEntryHttpContext.java
new file mode 100644
index 00000000000..db6bb09e365
--- /dev/null
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/BundleEntryHttpContext.java
@@ -0,0 +1,114 @@
+package org.wso2.carbon.ui;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Set;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.osgi.framework.Bundle;
+import org.osgi.service.http.HttpContext;
+import org.osgi.service.http.context.ServletContextHelper;
+
+public class BundleEntryHttpContext extends ServletContextHelper implements HttpContext {
+ private Bundle bundle;
+ private String bundlePath;
+
+ public BundleEntryHttpContext(Bundle bundle) {
+ this.bundle = bundle;
+ }
+
+ public BundleEntryHttpContext(Bundle b, String bundlePath) {
+ this(b);
+ if (bundlePath != null) {
+ if (bundlePath.endsWith("/")) {
+ bundlePath = bundlePath.substring(0, bundlePath.length() - 1);
+ }
+
+ if (bundlePath.length() == 0) {
+ bundlePath = null;
+ }
+ }
+
+ this.bundlePath = bundlePath;
+ }
+
+ public String getMimeType(String arg0) {
+ return null;
+ }
+
+ public boolean handleSecurity(HttpServletRequest arg0, HttpServletResponse arg1) throws IOException {
+ return true;
+ }
+
+ public URL getResource(String resourceName) {
+ if (this.bundlePath != null) {
+ resourceName = this.bundlePath + resourceName;
+ }
+
+ int lastSlash = resourceName.lastIndexOf(47);
+ if (lastSlash == -1) {
+ return null;
+ } else {
+ String path = resourceName.substring(0, lastSlash);
+ if (path.length() == 0) {
+ path = "/";
+ }
+
+ String file = this.sanitizeEntryName(resourceName.substring(lastSlash + 1));
+ Enumeration entryPaths = this.bundle.findEntries(path, file, false);
+ return entryPaths != null && entryPaths.hasMoreElements() ? (URL)entryPaths.nextElement() : null;
+ }
+ }
+
+ private String sanitizeEntryName(String name) {
+ StringBuffer buffer = null;
+
+ for(int i = 0; i < name.length(); ++i) {
+ char c = name.charAt(i);
+ switch (c) {
+ case '*':
+ case '\\':
+ if (buffer == null) {
+ buffer = new StringBuffer(name.length() + 16);
+ buffer.append(name.substring(0, i));
+ }
+
+ buffer.append('\\').append(c);
+ break;
+ default:
+ if (buffer != null) {
+ buffer.append(c);
+ }
+ }
+ }
+
+ return buffer == null ? name : buffer.toString();
+ }
+
+ public Set getResourcePaths(String path) {
+ if (this.bundlePath != null) {
+ path = this.bundlePath + path;
+ }
+
+ Enumeration entryPaths = this.bundle.findEntries(path, (String)null, false);
+ if (entryPaths == null) {
+ return null;
+ } else {
+ Set result = new HashSet();
+
+ while(entryPaths.hasMoreElements()) {
+ URL entryURL = (URL)entryPaths.nextElement();
+ String entryPath = entryURL.getFile();
+ if (this.bundlePath == null) {
+ result.add(entryPath);
+ } else {
+ result.add(entryPath.substring(this.bundlePath.length()));
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSecuredHttpContext.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSecuredHttpContext.java
index 7a46d880dcb..1c947b5ea53 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSecuredHttpContext.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSecuredHttpContext.java
@@ -277,9 +277,9 @@ public boolean handleSecurity(HttpServletRequest request, HttpServletResponse re
if (request.getSession().isNew()) {
if (skipLoginPage) {
response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath,
- "/carbon/admin/login_action.jsp", request));
+ "/admin/login_action.jsp", request));
} else {
- response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath, "/carbon/admin/login.jsp",
+ response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath, "/admin/login.jsp",
request));
}
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUILoginUtil.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUILoginUtil.java
index 1bbb34a359e..35319233dca 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUILoginUtil.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonUILoginUtil.java
@@ -163,10 +163,10 @@ protected static boolean saveOriginalUrl(CarbonUIAuthenticator authenticator,
} else {
if (skipLoginPage) {
response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath,
- "/carbon/admin/login_action.jsp", request));
+ "/admin/login_action.jsp", request));
} else {
response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath,
- "/carbon/admin/login.jsp", request));
+ "/admin/login.jsp", request));
}
}
@@ -466,6 +466,7 @@ protected static boolean handleLogin(CarbonUIAuthenticator authenticator,
response.addCookie(rmeCookie);
}
} catch (Exception e) {
+ // TODO might need to remove contextPath
response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath, indexPageURL
+ (indexPageURL.indexOf('?') == -1 ? "?" : "&") + "loginStatus=false", request));
if (log.isDebugEnabled()) {
@@ -486,6 +487,7 @@ protected static boolean handleLogin(CarbonUIAuthenticator authenticator,
indexPageURL = indexPageURL.substring(5);
}
+ // TODO might need to remove contextPath
response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath, indexPageURL
+ (indexPageURL.indexOf('?') == -1 ? "?" : "&") + "loginStatus=true", request));
}
@@ -505,16 +507,16 @@ protected static boolean handleLogin(CarbonUIAuthenticator authenticator,
if (e.getCause().getMessage().contains(ACCOUNT_LOCK_ERROR_CODE) || e.getCause().getMessage()
.contains(ACCOUNT_LOCK_ERROR_MESSAGE)) {
response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath,
- "/carbon/admin/login.jsp?loginStatus=false&errorCode=error" +
+ "/admin/login.jsp?loginStatus=false&errorCode=error" +
".code.17003", request));
return false;
} else if (e.getCause().getMessage().contains(USER_NOT_FOUND_ERROR_CODE)) {
response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath,
- "/carbon/admin/login.jsp?loginStatus=false&errorCode=error.code.17001", request));
+ "/admin/login.jsp?loginStatus=false&errorCode=error.code.17001", request));
return false;
} else if (e.getCause().getMessage().contains(INVALID_CREDENTIALS_ERROR_CODE)) {
response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath,
- "/carbon/admin/login.jsp?loginStatus=false&errorCode=error.code.17002", request));
+ "/admin/login.jsp?loginStatus=false&errorCode=error.code.17002", request));
return false;
}
}
@@ -523,7 +525,7 @@ protected static boolean handleLogin(CarbonUIAuthenticator authenticator,
return false;
} else {
response.sendRedirect(CarbonUIUtil.resolveAdminConsoleBaseURL(contextPath,
- "/carbon/admin/login.jsp?loginStatus=false", request));
+ "/admin/login.jsp?loginStatus=false", request));
return false;
}
} catch (Exception e1) {
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/ContextPathServletAdaptor.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/ContextPathServletAdaptor.java
new file mode 100644
index 00000000000..d2764e23b75
--- /dev/null
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/ContextPathServletAdaptor.java
@@ -0,0 +1,382 @@
+package org.wso2.carbon.ui;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.EventListener;
+import java.util.Map;
+import java.util.Set;
+import javax.servlet.Filter;
+import javax.servlet.FilterRegistration;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.SessionCookieConfig;
+import javax.servlet.SessionTrackingMode;
+import javax.servlet.descriptor.JspConfigDescriptor;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+
+public class ContextPathServletAdaptor implements Servlet {
+ private Servlet delegate;
+ String contextPath;
+
+ public ContextPathServletAdaptor(Servlet delegate, String contextPath) {
+ this.delegate = delegate;
+ this.contextPath = contextPath != null && !contextPath.equals("/") ? contextPath : "";
+ }
+
+ public void init(ServletConfig config) throws ServletException {
+ this.delegate.init(new ContextPathServletAdaptor.ServletConfigAdaptor(config));
+ }
+
+ public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
+ this.delegate.service(new ContextPathServletAdaptor.HttpServletRequestAdaptor((HttpServletRequest)request), response);
+ }
+
+ public void destroy() {
+ this.delegate.destroy();
+ }
+
+ public ServletConfig getServletConfig() {
+ return this.delegate.getServletConfig();
+ }
+
+ public String getServletInfo() {
+ return this.delegate.getServletInfo();
+ }
+
+ private class RequestDispatcherAdaptor implements RequestDispatcher {
+ private RequestDispatcher requestDispatcher;
+
+ public RequestDispatcherAdaptor(RequestDispatcher requestDispatcher) {
+ this.requestDispatcher = requestDispatcher;
+ }
+
+ public void forward(ServletRequest req, ServletResponse resp) throws ServletException, IOException {
+ if (req instanceof ContextPathServletAdaptor.HttpServletRequestAdaptor) {
+ req = ((ContextPathServletAdaptor.HttpServletRequestAdaptor)req).getRequest();
+ }
+
+ this.requestDispatcher.forward(req, resp);
+ }
+
+ public void include(ServletRequest req, ServletResponse resp) throws ServletException, IOException {
+ if (req instanceof ContextPathServletAdaptor.HttpServletRequestAdaptor) {
+ req = ((ContextPathServletAdaptor.HttpServletRequestAdaptor)req).getRequest();
+ }
+
+ this.requestDispatcher.include(req, resp);
+ }
+ }
+
+ private class HttpServletRequestAdaptor extends HttpServletRequestWrapper {
+ static final String INCLUDE_REQUEST_URI_ATTRIBUTE = "javax.servlet.include.request_uri";
+ static final String INCLUDE_CONTEXT_PATH_ATTRIBUTE = "javax.servlet.include.context_path";
+ static final String INCLUDE_SERVLET_PATH_ATTRIBUTE = "javax.servlet.include.servlet_path";
+ static final String INCLUDE_PATH_INFO_ATTRIBUTE = "javax.servlet.include.path_info";
+ private boolean isRequestDispatcherInclude;
+
+ public HttpServletRequestAdaptor(HttpServletRequest req) {
+ super(req);
+ this.isRequestDispatcherInclude = req.getAttribute(INCLUDE_REQUEST_URI_ATTRIBUTE) != null;
+ }
+
+ public String getServletPath() {
+ if (this.isRequestDispatcherInclude) {
+ return super.getServletPath();
+ } else {
+ String fullPath = super.getServletPath();
+ return fullPath.substring(
+ ContextPathServletAdaptor.this.contextPath.length());
+ }
+ }
+
+ public String getContextPath() {
+ return this.isRequestDispatcherInclude ? super.getContextPath() : super.getContextPath() + ContextPathServletAdaptor.this.contextPath;
+ }
+
+ public Object getAttribute(String attributeName) {
+ if (this.isRequestDispatcherInclude) {
+ String servletPath;
+ if (attributeName.equals(INCLUDE_CONTEXT_PATH_ATTRIBUTE)) {
+ servletPath = (String)super.getAttribute(INCLUDE_CONTEXT_PATH_ATTRIBUTE);
+ if (servletPath != null && !servletPath.equals("/")) {
+ return servletPath + ContextPathServletAdaptor.this.contextPath;
+ }
+
+ return ContextPathServletAdaptor.this.contextPath;
+ }
+
+ if (attributeName.equals(INCLUDE_SERVLET_PATH_ATTRIBUTE)) {
+ servletPath = (String)super.getAttribute(INCLUDE_SERVLET_PATH_ATTRIBUTE);
+ return servletPath.substring(
+ ContextPathServletAdaptor.this.contextPath.length());
+ }
+ }
+
+ return super.getAttribute(attributeName);
+ }
+
+ public RequestDispatcher getRequestDispatcher(String arg0) {
+ return ContextPathServletAdaptor.this.new RequestDispatcherAdaptor(super.getRequestDispatcher(
+ ContextPathServletAdaptor.this.contextPath + arg0));
+ }
+ }
+
+ private class ServletContextAdaptor implements ServletContext {
+ private ServletContext delegate;
+
+ public ServletContextAdaptor(ServletContext delegate) {
+ this.delegate = delegate;
+ }
+
+ public RequestDispatcher getRequestDispatcher(String path) {
+ return ContextPathServletAdaptor.this.contextPath.equals("/") ? ContextPathServletAdaptor.this.new RequestDispatcherAdaptor(this.delegate.getRequestDispatcher(path)) : ContextPathServletAdaptor.this.new RequestDispatcherAdaptor(this.delegate.getRequestDispatcher(
+ ContextPathServletAdaptor.this.contextPath + path));
+ }
+
+ public URL getResource(String name) throws MalformedURLException {
+ return this.delegate.getResource(name);
+ }
+
+ public InputStream getResourceAsStream(String name) {
+ return this.delegate.getResourceAsStream(name);
+ }
+
+ public Set getResourcePaths(String name) {
+ return this.delegate.getResourcePaths(name);
+ }
+
+ public Object getAttribute(String arg0) {
+ return this.delegate.getAttribute(arg0);
+ }
+
+ public Enumeration getAttributeNames() {
+ return this.delegate.getAttributeNames();
+ }
+
+ public ServletContext getContext(String arg0) {
+ return this.delegate.getContext(arg0);
+ }
+
+ public String getInitParameter(String arg0) {
+ return this.delegate.getInitParameter(arg0);
+ }
+
+ public Enumeration getInitParameterNames() {
+ return this.delegate.getInitParameterNames();
+ }
+
+ public boolean setInitParameter(String s, String s1) {
+ return this.delegate.setInitParameter(s, s1);
+ }
+
+ public int getMajorVersion() {
+ return this.delegate.getMajorVersion();
+ }
+
+ public String getMimeType(String arg0) {
+ return this.delegate.getMimeType(arg0);
+ }
+
+ public int getMinorVersion() {
+ return this.delegate.getMinorVersion();
+ }
+
+ public int getEffectiveMajorVersion() {
+ return this.delegate.getEffectiveMajorVersion();
+ }
+
+ public int getEffectiveMinorVersion() {
+ return this.delegate.getEffectiveMinorVersion();
+ }
+
+ public RequestDispatcher getNamedDispatcher(String arg0) {
+ return ContextPathServletAdaptor.this.new RequestDispatcherAdaptor(this.delegate.getNamedDispatcher(arg0));
+ }
+
+ public String getRealPath(String arg0) {
+ return this.delegate.getRealPath(arg0);
+ }
+
+ public String getServerInfo() {
+ return this.delegate.getServerInfo();
+ }
+
+ /** @deprecated */
+ public Servlet getServlet(String arg0) throws ServletException {
+ return this.delegate.getServlet(arg0);
+ }
+
+ public String getServletContextName() {
+ return this.delegate.getServletContextName();
+ }
+
+ public ServletRegistration.Dynamic addServlet(String s, String s1) {
+ return this.delegate.addServlet(s, s1);
+ }
+
+ public ServletRegistration.Dynamic addServlet(String s, Servlet servlet) {
+ return this.delegate.addServlet(s, servlet);
+ }
+
+ public ServletRegistration.Dynamic addServlet(String s, Class extends Servlet> aClass) {
+ return this.delegate.addServlet(s, aClass);
+ }
+
+ public T createServlet(Class tClass) throws ServletException {
+ return this.delegate.createServlet(tClass);
+ }
+
+ public ServletRegistration getServletRegistration(String s) {
+ return this.delegate.getServletRegistration(s);
+ }
+
+ public Map getServletRegistrations() {
+ return this.delegate.getServletRegistrations();
+ }
+
+ public FilterRegistration.Dynamic addFilter(String s, String s1) {
+ return this.delegate.addFilter(s, s1);
+ }
+
+ public FilterRegistration.Dynamic addFilter(String s, Filter filter) {
+ return this.delegate.addFilter(s, filter);
+ }
+
+ public FilterRegistration.Dynamic addFilter(String s, Class extends Filter> aClass) {
+ return this.delegate.addFilter(s, aClass);
+ }
+
+ public T createFilter(Class tClass) throws ServletException {
+ return this.delegate.createFilter(tClass);
+ }
+
+ public FilterRegistration getFilterRegistration(String s) {
+ return this.delegate.getFilterRegistration(s);
+ }
+
+ public Map getFilterRegistrations() {
+ return this.delegate.getFilterRegistrations();
+ }
+
+ public SessionCookieConfig getSessionCookieConfig() {
+ return this.delegate.getSessionCookieConfig();
+ }
+
+ public void setSessionTrackingModes(Set sessionTrackingModes) throws IllegalStateException, IllegalArgumentException {
+ this.delegate.setSessionTrackingModes(sessionTrackingModes);
+ }
+
+ public Set getDefaultSessionTrackingModes() {
+ return this.delegate.getDefaultSessionTrackingModes();
+ }
+
+ public Set getEffectiveSessionTrackingModes() {
+ return this.delegate.getEffectiveSessionTrackingModes();
+ }
+
+ public void addListener(Class extends EventListener> aClass) {
+ this.delegate.addListener(aClass);
+ }
+
+ public void addListener(String s) {
+ this.delegate.addListener(s);
+ }
+
+ public void addListener(T t) {
+ this.delegate.addListener(t);
+ }
+
+ public T createListener(Class tClass) throws ServletException {
+ return this.delegate.createListener(tClass);
+ }
+
+ public void declareRoles(String... strings) {
+ this.delegate.declareRoles(strings);
+ }
+
+ public ClassLoader getClassLoader() {
+ return this.delegate.getClassLoader();
+ }
+
+ public JspConfigDescriptor getJspConfigDescriptor() {
+ return this.delegate.getJspConfigDescriptor();
+ }
+
+ /** @deprecated */
+ public Enumeration getServletNames() {
+ return this.delegate.getServletNames();
+ }
+
+ /** @deprecated */
+ public Enumeration getServlets() {
+ return this.delegate.getServlets();
+ }
+
+ /** @deprecated */
+ public void log(Exception arg0, String arg1) {
+ this.delegate.log(arg0, arg1);
+ }
+
+ public void log(String arg0, Throwable arg1) {
+ this.delegate.log(arg0, arg1);
+ }
+
+ public void log(String arg0) {
+ this.delegate.log(arg0);
+ }
+
+ public void removeAttribute(String arg0) {
+ this.delegate.removeAttribute(arg0);
+ }
+
+ public void setAttribute(String arg0, Object arg1) {
+ this.delegate.setAttribute(arg0, arg1);
+ }
+
+ public String getContextPath() {
+ try {
+ Method getContextPathMethod = this.delegate.getClass().getMethod("getContextPath", (Class[])null);
+ return (String)getContextPathMethod.invoke(this.delegate, (Object[])null);
+ } catch (Exception var2) {
+ return null;
+ }
+ }
+ }
+
+ private class ServletConfigAdaptor implements ServletConfig {
+ private ServletConfig config;
+ private ServletContext context;
+
+ public ServletConfigAdaptor(ServletConfig config) {
+ this.config = config;
+ this.context = ContextPathServletAdaptor.this.new ServletContextAdaptor(config.getServletContext());
+ }
+
+ public String getInitParameter(String arg0) {
+ return this.config.getInitParameter(arg0);
+ }
+
+ public Enumeration getInitParameterNames() {
+ return this.config.getInitParameterNames();
+ }
+
+ public ServletContext getServletContext() {
+ return this.context;
+ }
+
+ public String getServletName() {
+ return this.config.getServletName();
+ }
+ }
+}
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializer.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializer.java
new file mode 100644
index 00000000000..c6bc9a57895
--- /dev/null
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializer.java
@@ -0,0 +1,26 @@
+package org.wso2.carbon.ui;
+
+import org.apache.tiles.factory.AbstractTilesContainerFactory;
+import org.apache.tiles.factory.BasicTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.servlet.ServletApplicationContext;
+import org.apache.tiles.startup.AbstractTilesInitializer;
+import org.apache.tiles.startup.TilesInitializer;
+import org.apache.tiles.web.startup.AbstractTilesListener;
+
+import javax.servlet.ServletContext;
+
+public class CustomTilesInitializer extends AbstractTilesInitializer {
+
+ @Override
+ protected AbstractTilesContainerFactory createContainerFactory(ApplicationContext applicationContext) {
+
+ return new BasicTilesContainerFactory();
+ }
+
+ @Override
+ protected ApplicationContext createTilesApplicationContext(ApplicationContext context) {
+
+ return new ServletApplicationContext((ServletContext) context.getContext());
+ }
+}
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializerListener.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializerListener.java
new file mode 100644
index 00000000000..b68c4ac5887
--- /dev/null
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializerListener.java
@@ -0,0 +1,66 @@
+package org.wso2.carbon.ui;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import org.apache.tiles.factory.BasicTilesContainerFactory;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.servlet.ServletApplicationContext;
+import org.apache.tiles.request.servlet.wildcard.WildcardServletApplicationContext;
+import org.apache.tiles.startup.TilesInitializer;
+import org.apache.tiles.startup.AbstractTilesInitializer;
+import org.apache.tiles.TilesContainer;
+import org.apache.tiles.request.servlet.ServletUtil;
+import org.apache.tiles.web.startup.AbstractTilesListener;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
+
+@Component(
+ service = ServletContextListener.class,
+ property = {
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_LISTENER + "=true",
+ HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=(" + HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=tilesContext)"
+ }
+)
+public class CustomTilesInitializerListener extends AbstractTilesListener {
+
+ @Override
+ protected TilesInitializer createTilesInitializer() {
+
+ return new CustomTilesInitializer();
+ }
+
+// @Override
+// public void contextInitialized(ServletContextEvent sce) {
+// ServletApplicationContext application = new ServletApplicationContext(sce.getServletContext());
+// TilesInitializer initializer = new AbstractTilesInitializer() {
+// @Override
+// protected ApplicationContext createTilesApplicationContext(ApplicationContext context) {
+// return new ServletApplicationContext((ServletContext)context.getContext());
+// }
+//
+//// @Override
+//// protected ApplicationContext createApplicationContext(Object context) {
+//// return new ServletApplicationContext((javax.servlet.ServletContext) context);
+//// }
+//
+// @Override
+// protected BasicTilesContainerFactory createContainerFactory(ApplicationContext context) {
+// return new BasicTilesContainerFactory();
+// }
+// };
+//// TilesContainer container = initializer.createContainer(application);
+//// ServletUtil.setContainer(sce.getServletContext(), container);
+//
+// initializer.initialize(application);
+//// ServletUtil.setContainer(sce.getServletContext(), container);
+// }
+//
+// @Override
+// public void contextDestroyed(ServletContextEvent sce) {
+// // Clean up resources if necessary
+// }
+
+
+}
+
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultComponentEntryHttpContext.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultComponentEntryHttpContext.java
index db7d1999876..b58c3dcfd58 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultComponentEntryHttpContext.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/DefaultComponentEntryHttpContext.java
@@ -15,7 +15,6 @@
*/
package org.wso2.carbon.ui;
-import org.eclipse.equinox.http.helper.BundleEntryHttpContext;
import org.osgi.framework.Bundle;
import java.net.MalformedURLException;
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/FilterServletAdaptor.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/FilterServletAdaptor.java
new file mode 100644
index 00000000000..c546293a100
--- /dev/null
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/FilterServletAdaptor.java
@@ -0,0 +1,89 @@
+package org.wso2.carbon.ui;
+
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Properties;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.Servlet;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+public class FilterServletAdaptor implements Servlet {
+ ServletConfig config;
+ Servlet delegate;
+ Filter filter;
+ Properties filterInitParameters;
+ private FilterChain filterChain;
+
+ public FilterServletAdaptor(Filter filter, Properties filterInitParameters, Servlet delegate) {
+ this.delegate = delegate;
+ this.filter = filter;
+ this.filterInitParameters = filterInitParameters == null ? new Properties() : filterInitParameters;
+ this.filterChain = new FilterServletAdaptor.FilterChainImpl();
+ }
+
+ public void init(ServletConfig config) throws ServletException {
+ this.config = config;
+ this.filter.init(new FilterServletAdaptor.FilterConfigImpl());
+ this.delegate.init(config);
+ }
+
+ public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
+ this.filter.doFilter(request, response, this.filterChain);
+ }
+
+ public void destroy() {
+ this.delegate.destroy();
+ this.filter.destroy();
+ this.config = null;
+ }
+
+ public ServletConfig getServletConfig() {
+ return this.config;
+ }
+
+ public String getServletInfo() {
+ return "";
+ }
+
+ class FilterConfigImpl implements FilterConfig {
+ FilterConfigImpl() {
+ }
+
+ public String getFilterName() {
+ String filterName = FilterServletAdaptor.this.filterInitParameters.getProperty("filter-name");
+ if (filterName == null) {
+ filterName = FilterServletAdaptor.this.filter.getClass().getName();
+ }
+
+ return filterName;
+ }
+
+ public String getInitParameter(String name) {
+ return FilterServletAdaptor.this.filterInitParameters.getProperty(name);
+ }
+
+ public Enumeration getInitParameterNames() {
+ return FilterServletAdaptor.this.filterInitParameters.propertyNames();
+ }
+
+ public ServletContext getServletContext() {
+ return FilterServletAdaptor.this.config.getServletContext();
+ }
+ }
+
+ public class FilterChainImpl implements FilterChain {
+ public FilterChainImpl() {
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException {
+ FilterServletAdaptor.this.delegate.service(request, response);
+ }
+ }
+}
+
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspServlet.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspServlet.java
index f8376f97b28..bb3fd058571 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspServlet.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/JspServlet.java
@@ -195,6 +195,7 @@ public void destroy() {
public void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException,
IOException {
+
String pathInfo = request.getPathInfo();
if (pathInfo != null && pathInfo.startsWith("/WEB-INF/")) { //$NON-NLS-1$
response.sendError(HttpServletResponse.SC_NOT_FOUND);
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/SecuredComponentEntryHttpContext.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/SecuredComponentEntryHttpContext.java
index ca5b2af9f20..c441980904a 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/SecuredComponentEntryHttpContext.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/SecuredComponentEntryHttpContext.java
@@ -20,7 +20,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.eclipse.equinox.http.helper.BundleEntryHttpContext;
import org.osgi.framework.Bundle;
import org.wso2.carbon.registry.core.Registry;
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TilesJspServlet.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TilesJspServlet.java
index 0b6773e6576..0b1b4708c08 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TilesJspServlet.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/TilesJspServlet.java
@@ -19,6 +19,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.tiles.AttributeContext;
+import org.apache.tiles.request.reflect.ClassUtil;
+import org.apache.tiles.web.util.AttributeContextMutator;
+import org.apache.tiles.web.util.TilesDispatchServlet;
import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceReference;
import org.wso2.carbon.ui.action.ActionHelper;
@@ -35,16 +39,42 @@ public class TilesJspServlet extends JspServlet {
private static final long serialVersionUID = 1L;
private static Log log = LogFactory.getLog(TilesJspServlet.class);
+ public static final String CONTAINER_KEY_INIT_PARAMETER =
+ "org.apache.tiles.web.util.TilesDispatchServlet.CONTAINER_KEY";
+
+ private String containerKey;
+ private AttributeContextMutator mutator;
+
public TilesJspServlet(Bundle bundle, UIResourceRegistry uiResourceRegistry) {
super(bundle, uiResourceRegistry);
}
+ //TODO check if this is needed
+ @Override
+ public void init() throws ServletException {
+ super.init();
+
+ containerKey = getServletConfig().getInitParameter(CONTAINER_KEY_INIT_PARAMETER);
+
+ String temp = getInitParameter("mutator");
+ if (temp != null) {
+ try {
+ mutator = (AttributeContextMutator) ClassUtil.instantiate(temp);
+ } catch (Exception e) {
+ throw new ServletException("Unable to instantiate specified context mutator.", e);
+ }
+ } else {
+ mutator = new DefaultMutator();
+ }
+ }
+
public void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
+
String actionUrl = request.getRequestURI();
//This is the layout page defined in
- //"/org.wso2.carbon.component/src/main/resources/web/WEB-INF/tiles/main_defs.xml"
+ //"/org.wso2.carbon.component/src/main/resources/web/WEB-INF/tiles/tiles.xml"
//Need to serve http requests other than to tiles body page,
//using the normal OSGi way
@@ -73,10 +103,10 @@ public void service(HttpServletRequest request, HttpServletResponse response)
}
}
-
if ((actionUrl.lastIndexOf("/admin/layout/template.jsp") > -1)
|| actionUrl.lastIndexOf("ajaxprocessor.jsp") > -1
- || actionUrl.indexOf("gadgets/js") > -1) {
+ || actionUrl.indexOf("gadgets/js") > -1
+ || "INCLUDE".equals(request.getDispatcherType().toString())) {
super.service(request, response);
} else if (actionUrl.startsWith("/carbon/registry/web/resources/foo/bar")) {
//TODO : consider the renamed ROOT war scenario
@@ -104,4 +134,67 @@ public void service(HttpServletRequest request, HttpServletResponse response)
}
}
}
+
+ class DefaultMutator implements AttributeContextMutator {
+
+ /** {@inheritDoc} */
+ public void mutate(AttributeContext context, javax.servlet.ServletRequest request) {
+ // noop;
+ }
+ }
+
+ protected static final String canonicalURI(String s) {
+ if (s == null) {
+ return null;
+ } else {
+ StringBuilder result = new StringBuilder();
+ int len = s.length();
+ int pos = 0;
+
+ while(pos < len) {
+ char c = s.charAt(pos);
+ if (isPathSeparator(c)) {
+ while(pos + 1 < len && isPathSeparator(s.charAt(pos + 1))) {
+ ++pos;
+ }
+
+ if (pos + 1 < len && s.charAt(pos + 1) == '.') {
+ if (pos + 2 >= len) {
+ break;
+ }
+
+ switch (s.charAt(pos + 2)) {
+ case '.':
+ if (pos + 3 < len && isPathSeparator(s.charAt(pos + 3))) {
+ pos += 3;
+
+ int separatorPos;
+ for(separatorPos = result.length() - 1; separatorPos >= 0 && !isPathSeparator(result.charAt(separatorPos)); --separatorPos) {
+ }
+
+ if (separatorPos >= 0) {
+ result.setLength(separatorPos);
+ }
+ continue;
+ }
+ break;
+ case '/':
+ case '\\':
+ pos += 2;
+ continue;
+ }
+ }
+ }
+
+ result.append(c);
+ ++pos;
+ }
+
+ return result.toString();
+ }
+ }
+
+ protected static final boolean isPathSeparator(char c) {
+ return c == '/' || c == '\\';
+ }
}
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIResourceRegistry.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIResourceRegistry.java
index 232b908e894..d8a24759522 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIResourceRegistry.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/UIResourceRegistry.java
@@ -63,7 +63,7 @@ public void initialize(BundleContext bundleContext) {
}
public URL getUIResource(String path) {
- URL url = defaultUIResourceProvider.getUIResource(path);
+ URL url = defaultUIResourceProvider.getUIResource(canonicalURI(path));
if (url == null) {
for (UIResourceProvider resourceProvider : resourceProviderSet) {
url = resourceProvider.getUIResource(path);
@@ -104,4 +104,59 @@ public void serviceChanged(ServiceEvent serviceEvent) {
resourceProviderSet.remove(uiResourceProvider);
}
}
+
+ protected static final String canonicalURI(String s) {
+ if (s == null) {
+ return null;
+ } else {
+ StringBuilder result = new StringBuilder();
+ int len = s.length();
+ int pos = 0;
+
+ while(pos < len) {
+ char c = s.charAt(pos);
+ if (isPathSeparator(c)) {
+ while(pos + 1 < len && isPathSeparator(s.charAt(pos + 1))) {
+ ++pos;
+ }
+
+ if (pos + 1 < len && s.charAt(pos + 1) == '.') {
+ if (pos + 2 >= len) {
+ break;
+ }
+
+ switch (s.charAt(pos + 2)) {
+ case '.':
+ if (pos + 3 < len && isPathSeparator(s.charAt(pos + 3))) {
+ pos += 3;
+
+ int separatorPos;
+ for(separatorPos = result.length() - 1; separatorPos >= 0 && !isPathSeparator(result.charAt(separatorPos)); --separatorPos) {
+ }
+
+ if (separatorPos >= 0) {
+ result.setLength(separatorPos);
+ }
+ continue;
+ }
+ break;
+ case '/':
+ case '\\':
+ pos += 2;
+ continue;
+ }
+ }
+ }
+
+ result.append(c);
+ ++pos;
+ }
+
+ return result.toString();
+ }
+ }
+
+ protected static final boolean isPathSeparator(char c) {
+ return c == '/' || c == '\\';
+ }
}
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ActionHelper.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ActionHelper.java
index 99d3455b230..79f355a948d 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ActionHelper.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/action/ActionHelper.java
@@ -21,7 +21,12 @@
import org.apache.tiles.AttributeContext;
import org.apache.tiles.TilesContainer;
import org.apache.tiles.access.TilesAccess;
+import org.apache.tiles.request.ApplicationContext;
+import org.apache.tiles.request.Request;
+import org.apache.tiles.request.servlet.ServletRequest;
+import org.apache.tiles.request.servlet.ServletUtil;
+import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -40,21 +45,25 @@ public class ActionHelper {
*/
public static void render(String actionUrl, HttpServletRequest request,
HttpServletResponse response) throws Exception {
- TilesContainer container = TilesAccess.getContainer(
- request.getSession().getServletContext());
- if(log.isDebugEnabled()){
- log.debug("Rendering tiles main.layout with page : "+actionUrl+"("+request.getSession().getId()+")");
+
+ ServletContext servletContext = request.getSession().getServletContext();
+ ApplicationContext applicationContext = ServletUtil.getApplicationContext(servletContext);
+ TilesContainer container = TilesAccess.getContainer(applicationContext);
+ if (log.isDebugEnabled()) {
+ log.debug(
+ "Rendering tiles main.layout with page : " + actionUrl + "(" + request.getSession().getId() + ")");
}
- AttributeContext attributeContext = container.startContext(request, response);
+ Request requestContext = new ServletRequest(container.getApplicationContext(), request, response);
+ AttributeContext attributeContext = container.startContext(requestContext);
Attribute attr = new Attribute(actionUrl);
attributeContext.putAttribute("body", attr);
try {
- container.render("main.layout", request, response);
- container.endContext(request, response);
+ container.render("main.layout", requestContext);
+ container.endContext(requestContext);
} catch (Exception e) {
if (log.isDebugEnabled()) { // Intentionally logged at debug level
log.debug("Error occurred while rendering." +
- " We generally see this 'harmless' exception on WebLogic. Hiding it.", e);
+ " We generally see this 'harmless' exception on WebLogic. Hiding it.", e);
}
}
}
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/UIBundleDeployer.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/UIBundleDeployer.java
index 0394aada225..4675d974825 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/UIBundleDeployer.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/deployment/UIBundleDeployer.java
@@ -17,8 +17,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.eclipse.equinox.http.helper.ContextPathServletAdaptor;
-import org.eclipse.equinox.http.helper.FilterServletAdaptor;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
@@ -30,11 +28,14 @@
import org.osgi.service.http.HttpContext;
import org.osgi.service.http.HttpService;
import org.osgi.service.http.NamespaceException;
+import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
import org.osgi.util.tracker.ServiceTracker;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.CarbonException;
import org.wso2.carbon.base.ServerConfiguration;
import org.wso2.carbon.ui.BundleBasedUIResourceProvider;
+import org.wso2.carbon.ui.ContextPathServletAdaptor;
+import org.wso2.carbon.ui.FilterServletAdaptor;
import org.wso2.carbon.ui.deployment.beans.CarbonUIDefinitions;
import org.wso2.carbon.ui.deployment.beans.Component;
import org.wso2.carbon.ui.deployment.beans.CustomUIDefenitions;
@@ -44,9 +45,6 @@
import org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager;
import org.wso2.carbon.ui.util.UIResourceProvider;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Dictionary;
@@ -55,6 +53,10 @@
import java.util.Iterator;
import java.util.List;
+import javax.servlet.Filter;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+
public class UIBundleDeployer implements SynchronousBundleListener {
private static Log log = LogFactory.getLog(UIBundleDeployer.class);
@@ -425,6 +427,18 @@ public void registerServlet(Servlet servlet, String urlPattern, Dictionary param
httpService.registerServlet(urlPattern,
new FilterServletAdaptor(associatedFilter, null, adaptedJspServlet), params, httpContext);
}
+// Dictionary properties = new Hashtable<>();
+// properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, urlPattern);
+// for (Enumeration enm = params.keys(); enm.hasMoreElements();) {
+// String key = (String) enm.nextElement();
+// properties.put("servlet.init." + key, params.get(key));
+// }
+// CarbonUIServiceComponent.getBundleContext().registerService(Servlet.class, servlet, properties);
+// if (associatedFilter != null) {
+// Dictionary props = new Hashtable<>();
+// props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN, urlPattern);
+// CarbonUIServiceComponent.getBundleContext().registerService(Filter.class, associatedFilter, props);
+// }
if (servletAttrs != null) {
for (Enumeration enm = servletAttrs.keys(); enm.hasMoreElements();) {
String key = (String) enm.nextElement();
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/internal/CarbonUIServiceComponent.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/internal/CarbonUIServiceComponent.java
index 1b657fc3d14..23d26441786 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/internal/CarbonUIServiceComponent.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/internal/CarbonUIServiceComponent.java
@@ -25,7 +25,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tomcat.InstanceManager;
-import org.eclipse.equinox.http.helper.ContextPathServletAdaptor;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
@@ -38,6 +37,8 @@
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.http.HttpContext;
import org.osgi.service.http.HttpService;
+import org.osgi.service.http.context.ServletContextHelper;
+import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.service.url.URLConstants;
import org.osgi.service.url.URLStreamHandlerService;
@@ -52,6 +53,7 @@
import org.wso2.carbon.ui.CarbonSecuredHttpContext;
import org.wso2.carbon.ui.CarbonUIAuthenticator;
import org.wso2.carbon.ui.CarbonUIUtil;
+import org.wso2.carbon.ui.ContextPathServletAdaptor;
import org.wso2.carbon.ui.DefaultCarbonAuthenticator;
import org.wso2.carbon.ui.TextJavascriptHandler;
import org.wso2.carbon.ui.TilesJspServlet;
@@ -68,13 +70,6 @@
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.utils.ConfigurationContextService;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContext;
-import javax.xml.namespace.QName;
-import javax.xml.stream.FactoryConfigurationError;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
import java.io.IOException;
import java.io.InputStream;
import java.net.ContentHandler;
@@ -90,6 +85,14 @@
import java.util.Map;
import java.util.StringTokenizer;
+import javax.servlet.Servlet;
+import javax.servlet.ServletContext;
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
import static org.wso2.carbon.CarbonConstants.PRODUCT_XML;
import static org.wso2.carbon.CarbonConstants.PRODUCT_XML_PROPERTIES;
import static org.wso2.carbon.CarbonConstants.PRODUCT_XML_PROPERTY;
@@ -108,8 +111,7 @@ public class CarbonUIServiceComponent {
private static ServerConfigurationService serverConfiguration;
private static RealmService realmService;
private static CarbonTomcatService carbonTomcatService;
- private static List authenticationExtenders =
- new LinkedList();
+ private static List authenticationExtenders = new LinkedList<>();
private BundleContext bundleContext;
@@ -230,15 +232,6 @@ public void start(BundleContext context) throws Exception {
final HttpService httpService = getHttpService();
- Dictionary initparams = new Hashtable();
- initparams.put("servlet-name", "TilesServlet");
- initparams.put("definitions-config", "/WEB-INF/tiles/main_defs.xml");
- initparams.put("org.apache.tiles.context.TilesContextFactory",
- "org.apache.tiles.context.enhanced.EnhancedContextFactory");
- initparams.put("org.apache.tiles.factory.TilesContainerFactory.MUTABLE", "true");
- initparams.put("org.apache.tiles.definition.DefinitionsFactory",
- "org.wso2.carbon.tiles.CarbonUrlDefinitionsFactory");
-
String webContext = "carbon"; // The subcontext for the Carbon Mgt Console
String serverURL = CarbonUIUtil.getServerURL(serverConfig);
@@ -262,6 +255,9 @@ public void start(BundleContext context) throws Exception {
//Registering filedownload servlet
Servlet fileDownloadServlet = new ContextPathServletAdaptor(new FileDownloadServlet(
context, getConfigurationContextService()), "/filedownload");
+// Dictionary fileDownloadServletProperties = new Hashtable<>();
+// fileDownloadServletProperties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/filedownload");
+// context.registerService(Servlet.class, fileDownloadServlet, fileDownloadServletProperties);
httpService.registerServlet("/filedownload", fileDownloadServlet, null, commonContext);
fileDownloadServlet.getServletConfig().getServletContext().setAttribute(
CarbonConstants.SERVER_URL, serverURL);
@@ -279,6 +275,9 @@ public void start(BundleContext context) throws Exception {
}
httpService.registerServlet("/fileupload", fileUploadServlet, null, commonContext);
+// Dictionary fileUploadServletProperties = new Hashtable<>();
+// fileUploadServletProperties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/fileupload");
+// context.registerService(Servlet.class, fileUploadServlet, fileUploadServletProperties);
fileUploadServlet.getServletConfig().getServletContext().setAttribute(
CarbonConstants.SERVER_URL, serverURL);
fileUploadServlet.getServletConfig().getServletContext().setAttribute(
@@ -287,30 +286,44 @@ public void start(BundleContext context) throws Exception {
uiBundleDeployer.deploy(bundleContext, commonContext);
context.addBundleListener(uiBundleDeployer);
- httpService.registerServlet("/", new org.apache.tiles.web.startup.TilesServlet(),
- initparams,
- commonContext);
- httpService.registerResources("/" + webContext, "/", commonContext);
-
- adaptedJspServlet = new ContextPathServletAdaptor(
- new TilesJspServlet(context.getBundle(), uiResourceRegistry), "/" + webContext);
+ Dictionary props = new Hashtable<>();
+ props.put("osgi.http.whiteboard.context.name", "tilesContext");
+ props.put("osgi.http.whiteboard.context.path", "/carbon");
- Dictionary carbonInitparams = new Hashtable();
- carbonInitparams.put("strictQuoteEscaping", "false");
- httpService.registerServlet("/" + webContext + "/*.jsp", adaptedJspServlet, carbonInitparams, commonContext);
-
- ServletContext jspServletContext =
- adaptedJspServlet.getServletConfig().getServletContext();
-
- jspServletContext.setAttribute(
- InstanceManager.class.getName(), getTomcatInstanceManager());
+ context.registerService(ServletContextHelper.class, (ServletContextHelper) commonContext, props);
+ HttpContext resourceContext =
+ new CarbonSecuredHttpContext(context.getBundle(), "/web", uiResourceRegistry, registry);
+ Dictionary resourceProps = new Hashtable<>();
+ resourceProps.put("osgi.http.whiteboard.context.name", "resourceContext");
+ resourceProps.put("osgi.http.whiteboard.context.path", "/carbon");
+ resourceProps.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN, "/" + webContext + "/*");
+ context.registerService(ServletContextHelper.class, (ServletContextHelper) resourceContext, resourceProps);
+ Dictionary properties = new Hashtable<>();
+ properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN, "/*");
+ properties.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX, "/");
+ properties.put("osgi.http.whiteboard.context.select", "(osgi.http.whiteboard.context.name=resourceContext)");
+ properties.put("osgi.http.whiteboard.context.httpservice", true);
+
+ // Replacement for httpService.registerResources with whiteboard
+ bundleContext.registerService(String.class, "resource", properties);
+
+ adaptedJspServlet = new TilesJspServlet(context.getBundle(), uiResourceRegistry);
+
+ Dictionary carbonInitparams = new Hashtable<>();
+ carbonInitparams.put("servlet.init.strictQuoteEscaping", "false");
+ carbonInitparams.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/*.jsp");
+ carbonInitparams.put("osgi.http.whiteboard.context.select", "(osgi.http.whiteboard.context.name=tilesContext)");
+ context.registerService(Servlet.class, adaptedJspServlet, carbonInitparams);
+
+ ServletContext jspServletContext = adaptedJspServlet.getServletConfig().getServletContext();
+
+ jspServletContext.setAttribute(InstanceManager.class.getName(), getTomcatInstanceManager());
jspServletContext.setAttribute("registry", registryService);
-
jspServletContext.setAttribute(CarbonConstants.SERVER_CONFIGURATION, serverConfig);
jspServletContext.setAttribute(CarbonConstants.CLIENT_CONFIGURATION_CONTEXT, clientConfigContext);
//If the UI is running on local transport mode, then we use the server-side config context.
- if(isLocalTransportMode) {
+ if (isLocalTransportMode) {
jspServletContext.setAttribute(CarbonConstants.CONFIGURATION_CONTEXT, serverConfigContext);
} else {
jspServletContext.setAttribute(CarbonConstants.CONFIGURATION_CONTEXT, clientConfigContext);
@@ -328,6 +341,7 @@ public void start(BundleContext context) throws Exception {
.setAttribute(CustomUIDefenitions.CUSTOM_UI_DEFENITIONS, customUIDefenitions);
// Registering jspServletContext as a service so that UI components can use it
+ // TODO why do we need to register this again?
bundleContext.registerService(ServletContext.class.getName(), jspServletContext, null);
//saving bundle context for future reference within CarbonUI Generation
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIResourceProvider.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIResourceProvider.java
index fafb0815672..55f1be6075b 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIResourceProvider.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/util/UIResourceProvider.java
@@ -45,11 +45,11 @@ public interface UIResourceProvider {
* /WEB_INF
* /WEB-INF/web.xml
* /WEB-INF/tiles
- * /WEB-INF/tiles/main_defs.xml
+ * /WEB-INF/tiles/tiles.xml
*
* getResourcePaths("/") returns {"/welcome.html", "/WEB_INF"}.
* getResourcePaths("/WEB_INF/") returns {"/WEB-INF/web.xml", "/WEB-INF/tiles/"}.
- * getResourcePaths("/WEB-INF/tiles/") returns {"/WEB-INF/tiles/main_defs.xml"}.
+ * getResourcePaths("/WEB-INF/tiles/") returns {"/WEB-INF/tiles/tiles.xml"}.
*
* @param path partial path used to match the resources, which must start with a /
* @return a Set containing the directory listing, or null if there are no resources whose path begins with the
diff --git a/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tiles/main_defs.xml b/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tiles.xml
similarity index 100%
rename from core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tiles/main_defs.xml
rename to core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tiles.xml
diff --git a/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/tiles-jsp.tld b/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/tiles-jsp.tld
index 5250bb20799..effdb62e203 100644
--- a/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/tiles-jsp.tld
+++ b/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/tlds/tiles-jsp.tld
@@ -1,801 +1,921 @@
-
-
-
- 2.0
- 1.2
- tiles
- http://tiles.apache.org/tags-tiles
+
+
+
- This tag library provides Tiles tags.
+
+ 1.2
+ tiles
+ http://tiles.apache.org/tags-tiles
- insertTemplate
- org.apache.tiles.jsp.taglib.InsertTemplateTag
- JSP
- Insert a template.
- Insert a template with the possibility to pass
- parameters (called attributes).
- A template can be seen as a procedure that can take parameters or attributes.
- <tiles:insertTemplate> allows to define these attributes
- and pass them to the inserted jsp page, called template.
- Attributes are defined using nested tag <tiles:put> or
- <tiles:putList>.
+
+ Insert a template.
+
+
+ Insert a template with the possibility to pass parameters (called
+ attributes). A template can be seen as a procedure that can take parameters
+ or attributes. <tiles:insertTemplate> allows to define
+ these attributes and pass them to the inserted jsp page, called template.
+ Attributes are defined using nested tag
+ <tiles:putAttribute> or
+ <tiles:putListAttribute>.
+
+
+ You must specify template attribute, for inserting a template
+
+
+
+ Example :
- You must specify
template attribute, for inserting a template
-
- Example :
+
-
- <tiles:insertTemplate template="/basic/myLayout.jsp" flush="true">
- <tiles:put name="title" value="My first page" />
- <tiles:put name="header" value="/common/header.jsp" />
- <tiles:put name="footer" value="/common/footer.jsp" />
- <tiles:put name="menu" value="/basic/menu.jsp" />
- <tiles:put name="body" value="/basic/helloBody.jsp" />
- </tiles:insert>
-
+ <code>
+ <tiles:insertTemplate template="/basic/myLayout.jsp" flush="true">
+ <tiles:putAttribute name="title" value="My first page" />
+ <tiles:putAttribute name="header" value="/common/header.jsp" />
+ <tiles:putAttribute name="footer" value="/common/footer.jsp" />
+ <tiles:putAttribute name="menu" value="/basic/menu.jsp" />
+ <tiles:putAttribute name="body" value="/basic/helloBody.jsp" />
+ </tiles:insertTemplate>
+ </code>
]]>
+ insertTemplate
+ org.apache.tiles.jsp.taglib.InsertTemplateTag
+ scriptless
+
+
+
template
true
true
+ java.lang.String
+
+
- A string representing the URI of a template (for example, a JSP
- page).
-
+
+ templateType
+ false
+ true
+ java.lang.String
- flush
- false
- false
- boolean
- True or false. If true, current page out stream is flushed
- before insertion.
+
-
-
- ignore
+ templateExpression
false
true
- boolean
+ java.lang.String
+
+
- If this attribute is set to true, and the attribute specified by the
- name does not exist, simply return without writing anything. The
- default value is false, which will cause a runtime exception to be
- thrown.
+
-
-
role
false
true
+ java.lang.String
+
+
- If the user is in the specified role, the tag is taken into account;
- otherwise, the tag is ignored (skipped).
+
+ preparer
+ false
+ true
+ java.lang.String
-
- preparer
+
+ true, the response will be flushed after the insert.
+ ]]>
+
+ flush
false
true
-
- The fully qualified class name of the preparer.
-
+ boolean
- insertDefinition
- org.apache.tiles.jsp.taglib.InsertDefinitionTag
- JSP
- Insert a definition.
- Insert a definition with the possibility to override and specify
- parameters (called attributes).
- A definition can be seen as a (partially or totally) filled template that
- can override or complete attribute values.
- <tiles:insertDefinition> allows to define these attributes
- and pass them to the inserted jsp page, called template.
- Attributes are defined using nested tag <tiles:put> or
- <tiles:putList>.
+
+ Insert a definition.
+
+
+ Insert a definition with the possibility to override and specify parameters
+ (called attributes). A definition can be seen as a (partially or totally)
+ filled template that can override or complete attribute values.
+ <tiles:insertDefinition> allows to define these attributes
+ and pass them to the inserted jsp page, called template. Attributes are
+ defined using nested tag <tiles:putAttribute> or
+ <tiles:putListAttribute>.
+
+
+ You must specify name tag attribute, for inserting a definition
+ from definitions factory.
+
+
+ Example :
- You must specify name tag attribute, for inserting a definition from
- definitions factory.
- Example :
+
-
- <tiles:insertDefinition name=".my.tiles.defininition flush="true">
- <tiles:put name="title" value="My first page" />
- <tiles:put name="header" value="/common/header.jsp" />
- <tiles:put name="footer" value="/common/footer.jsp" />
- <tiles:put name="menu" value="/basic/menu.jsp" />
- <tiles:put name="body" value="/basic/helloBody.jsp" />
- </tiles:insertDefinition>
-
+ <code>
+ <tiles:insertDefinition name=".my.tiles.defininition flush="true">
+ <tiles:putAttribute name="title" value="My first page" />
+ <tiles:putAttribute name="header" value="/common/header.jsp" />
+ <tiles:putAttribute name="footer" value="/common/footer.jsp" />
+ <tiles:putAttribute name="menu" value="/basic/menu.jsp" />
+ <tiles:putAttribute name="body" value="/basic/helloBody.jsp" />
+ </tiles:insertDefinition>
+ </code>
]]>
+ insertDefinition
+ org.apache.tiles.jsp.taglib.InsertDefinitionTag
+ scriptless
+
+
+
name
true
true
+ java.lang.String
+
+
- Name of the definition to insert.
+
+ template
+ false
+ true
+ java.lang.String
- flush
- false
- false
- boolean
- True or false. If true, current page out stream is flushed
- before insertion.
+
-
-
- ignore
+ templateType
false
true
- boolean
+ java.lang.String
+
+
- If this attribute is set to true, and the attribute specified by the
- name does not exist, simply return without writing anything. The
- default value is false, which will cause a runtime exception to be
- thrown.
+
+ templateExpression
+ false
+ true
+ java.lang.String
+
+
+
role
false
true
+ java.lang.String
+
+
- If the user is in the specified role, the tag is taken into account;
- otherwise, the tag is ignored (skipped).
+
+ preparer
+ false
+ true
+ java.lang.String
-
- preparer
+
+ true, the response will be flushed after the insert.
+ ]]>
+
+ flush
false
true
-
- The fully qualified class name of preparer.
-
+ boolean
- insertAttribute
- org.apache.tiles.jsp.taglib.InsertAttributeTag
- JSP
- Inserts the value of an attribute into the page.
- This tag can be flexibly used to insert the value of an attribute into a page.
- As in other usages in Tiles, every attribute can be determined to have a "type",
- either set explicitly when it was defined, or "computed". If the type is not explicit, then
- if the attribute value is a valid definition, it will be inserted as such. Otherwise,
- if it begins with a "/" character, it will be treated as a "template". Finally, if it
- has not otherwise been assigned a type, it will be treated as a String and included without
- any special handling.
-
- Example :
-
-
-
-
-
+
+ Declare a list that will be pass as an attribute.
+
+
+ Declare a list that will be pass as an attribute . List elements are added
+ using the tag 'addAttribute' or 'addListAttribute'. This tag can only be used
+ inside 'insertTemplate', 'insertDefinition' or 'definition' tag.
+
]]>
+ addListAttribute
+ org.apache.tiles.jsp.taglib.AddListAttributeTag
+ scriptless
- name
- false
- true
- Name of the attribute to insert. This attribute will be ignored if
- the value attribute is specified.
+
+ role
+ false
+ true
+ java.lang.String
+
+
+
+
+ Import attribute(s) in specified context.
+
+
+ Import attribute(s) to requested scope. Attribute name and scope are
+ optional. If not specified, all attributes are imported in page scope. Once
+ imported, an attribute can be used as any other beans from jsp contexts.
+
+ ]]>
+
+ importAttribute
+ org.apache.tiles.jsp.taglib.ImportAttributeTag
+ empty
- value
+
+ null, all the attributes will be imported.
+ ]]>
+
+ name
false
true
- java.lang.Object
+ java.lang.String
+
+
- Attribute object to render directly. If it specified, the name
- attribute will be ignored.
+ null, the import will go in page scope.
]]>
+ scope
+ false
+ true
+ java.lang.String
- flush
- false
- false
- boolean
- True or false. If true, current page out stream is flushed
- before insertion.
+ name. If
+ null, the value of name will be used.
]]>
+ toName
+ false
+ true
+ java.lang.String
+
+ true, if the attribute is not present, the
+ problem will be ignored.
+ ]]>
+
ignore
false
true
boolean
-
+
+
+
+
If this attribute is set to true, and the attribute specified by the
- name does not exist, simply return without writing anything. The
- default value is false, which will cause a runtime exception to be
- thrown.
+
+ Declare a list that will be pass as attribute to tile.
+
+
+ Declare a list that will be pass as attribute to tile. List elements are
+ added using the tags 'addAttribute' or 'addListAttribute'. This tag can only
+ be used inside 'insertTemplate', 'insertDefinition', 'definition' tags.
+
+ ]]>
+
+ putListAttribute
+ org.apache.tiles.jsp.taglib.PutListAttributeTag
+ scriptless
+
+
+
+ name
+ true
+ true
+ java.lang.String
+
+
+
role
false
true
+ java.lang.String
+
+
- If the user is in the specified role, the tag is taken into account;
- otherwise, the tag is ignored (skipped).
+ true, the list attribute will use, as first elements, the
+ list contained in the list attribute, put with the same name, of the containing definition.
]]>
+ inherit
+ false
+ true
+ boolean
- preparer
+
+ true the attribute will be cascaded to all nested attributes.
+ ]]>
+
+ cascade
false
true
-
- The fully qualified name of the preparer.
-
+ boolean
- definition
- org.apache.tiles.jsp.taglib.definition.DefinitionTag
- JSP
Create a definition at runtime.
-
- Create a new definition at runtime.
- Newly created definition will be available across the entire request.
-
]]>
-
+
+ Create a definition at runtime.
+
+
+ Create a new definition at runtime. Newly created definition will be
+ available across the entire request.
+
+ ]]>
+
+ definition
+ org.apache.tiles.jsp.taglib.DefinitionTag
+ scriptless
- name
- true
- true
- Specifies the name under which the newly created definition bean
- will be saved.
+
+ name
+ false
+ true
+ java.lang.String
+
+
+
template
false
true
+ java.lang.String
+
+
- A string representing the URI of a template
- (a JSP page).
+
-
-
role
false
true
+ java.lang.String
+
+
- Role to check before inserting this definition. If role is not
- defined for current user, definition is not inserted. Checking is
- done at insert time, not during definition process.
+
-
-
extends
false
true
+ java.lang.String
+
+
- Name of a parent definition that is used to initialize this new
- definition. Parent definition is searched in definitions factory.
+
-
-
preparer
false
true
-
- Specifies the preparer name to use. The specified preparer will
- be executed before rendering this newly created definition.
- ]]>
-
+ java.lang.String
- putAttribute
- org.apache.tiles.jsp.taglib.PutAttributeTag
- JSP
- Put an attribute in enclosing attribute container tag.
-
- Enclosing attribute container tag can be :
-
- <initContainer>
- <definition>
- <insertAttribute>
- <insertDefinition>
- <putListAttribute>
-
- (or any other tag which implements the {@link PutAttributeTagParent} interface.
- Exception is thrown if no appropriate tag can be found.
- Put tag can have following atributes :
-
- name : Name of the attribute
- value : value to put as attribute
- type : value type. Only valid if value is a String and is set by
- value="something" or by a bean.
- Possible type are : string (value is used as direct string),
- template (value is used as a page url to insert),
- definition (value is used as a definition name to insert)
- direct : Specify if value is to be used as a direct string or as a
- page url to insert. This is another way to specify the type. It only apply
- if value is set as a string, and type is not present.
- beanName : Name of a bean used for setting value. Only valid if value is not set.
- If property is specified, value come from bean's property. Otherwise, bean
- itself is used for value.
- beanProperty : Name of the property used for retrieving value.
- beanScope : Scope containing bean.
- role : Role to check when 'insert' will be called. If enclosing tag is
- <insert>, role is checked immediately. If enclosing tag is
- <definition>, role will be checked when this definition will be
- inserted.
-
- Value can also come from tag body. Tag body is taken into account only if
- value is not set by one of the tag attributes. In this case Attribute type is
- "string", unless tag body define another type.
+
+ setCurrentContainer
+ org.apache.tiles.jsp.taglib.SetCurrentContainerTag
+ empty
- name
- true
- true
- Name of the attribute.
+ null, the default one will be used.
]]>
-
-
- value
+ containerKey
false
true
- java.lang.Object
-
+ java.lang.String
+
+
+
+
Attribute value. Could be a String or an Object.
- Value can come from a direct assignment (value="aValue") or from a bean.
- One of 'value' 'content' or 'beanName' must be present.
+
+ Inserts the value of an attribute into the page.
+
+
+ This tag can be flexibly used to insert the value of an attribute into a
+ page. As in other usages in Tiles, every attribute can be determined to have
+ a "type", either set explicitly when it was defined, or "computed". If the
+ type is not explicit, then if the attribute value is a valid definition, it
+ will be inserted as such. Otherwise, if it begins with a "/" character, it
+ will be treated as a "template". Finally, if it has not otherwise been
+ assigned a type, it will be treated as a String and included without any
+ special handling.
+
+
+
+ Example :
+
+
+
+ <code>
+ <tiles:insertAttribute name="body" />
+ </code>
+
+ ]]>
+
+ insertAttribute
+ org.apache.tiles.jsp.taglib.InsertAttributeTag
+ scriptless
+
+
+ true, if an exception happens during
+ rendering, of if the attribute is null, the problem will be ignored.
]]>
+ ignore
+ false
+ true
+ boolean
- type
- false
- false
- Specify content type: string, template or definition.
-
- String : Content is printed directly.
- template : Content is included from specified URL. Value is used as an URL.
- definition : Value is the name of a definition defined in factory (xml file). Definition will be searched
- in the inserted tile, in a <tiles:insert attribute="attributeName"> tag, where 'attributeName'
- is the name used for this tag.
-
+
+ preparer
+ false
+ true
+ java.lang.String
+
+
+
role
false
true
+ java.lang.String
+
+
-
- If the user is in the specified role, the tag is taken into account;
- otherwise, the tag is ignored (skipped).
-
+
+ defaultValue
+ false
+ true
+ java.lang.Object
-
-
- putListAttribute
- org.apache.tiles.jsp.taglib.PutListAttributeTag
- JSP
-
- Declare a list that will be pass as attribute to tile.
-
- Declare a list that will be pass as attribute to tile.
- List elements are added using the tag 'add'.
- This tag can only be used inside 'insert' or 'definition' tag.
- ]]>
-
- name
- true
- true
- Name of the list.
+
-
-
-
- addAttribute
-
- org.apache.tiles.jsp.taglib.AddAttributeTag
- JSP
-
- Add an element to the surrounding list.
- Equivalent to 'put', but for list element.
-
- Add an element to the surrounding list.
- This tag can only be used inside putList tag.
- Value can come from a direct assignment (value="aValue") or from a bean.
- One of 'value' or 'beanName' must be present.
- ]]>
-
-
- value
+ defaultValueRole
false
true
- java.lang.Object
+ java.lang.String
+
+
- Attribute value. Can be a String or Object.
+
-
+
+ defaultValueType
+ false
+ true
+ java.lang.String
- type
- false
- false
- Specify content type: string, template or definition.
-
- String : Content is printed directly.
- template : Content is included from specified URL. Value is used as an URL.
- definition : Value denote a definition defined in factory (xml file). Definition will be searched
- in the inserted tile, in a <insert attribute="attributeName"> tag, where 'attributeName'
- is the name used for this tag.
-
+
+ name
+ false
+ true
+ java.lang.String
- role
+
+
+
+ value
false
true
+ org.apache.tiles.Attribute
+
+
- If the user is in the specified role, the tag is taken into account;
- otherwise, the tag is ignored (skipped).
- The role isn't taken into account if <add>
- tag is used in a definition.
+ true, the response will be flushed after the insert.
]]>
+ flush
+ false
+ true
+ boolean
- addListAttribute
- org.apache.tiles.jsp.taglib.AddListAttributeTag
- JSP
-
- Declare a list that will be pass as attribute to tile.
-
- Declare a list that will be pass as attribute to tile.
- List elements are added using the tag 'add'.
- This tag can only be used inside 'insert' or 'definition' tag.
- ]]>
-
-
-
- getAsString
- org.apache.tiles.jsp.taglib.GetAsStringTag
- empty
-
- Render the value of the specified template attribute to the current JspWriter
-
-
- Retrieve the value of the specified template attribute
- property, and render it to the current JspWriter as a String.
- The usual toString() conversions is applied on found value.
- Throw a JSPException if named value is not found.
+
+ Add an element to the surrounding list. Equivalent to 'putAttribute',
+ but for list element.
+
+
+
+ Add an element to the surrounding list. This tag can only be used inside
+ 'putListAttribute' or 'addListAttribute' tags. Value can come from a direct
+ assignment (value="aValue")
+
]]>
+ addAttribute
+ org.apache.tiles.jsp.taglib.AddAttributeTag
+ scriptless
- name
- true
- true
- Attribute name.
+
-
-
- ignore
+ value
false
true
- boolean
+ java.lang.Object
+
+
-
- If this attribute is set to true, and the attribute specified by the name
- does not exist, simply return without writing anything. The default value is false, which will
- cause a runtime exception to be thrown.
-
+
+ expression
+ false
+ true
+ java.lang.String
+
+
+
role
false
true
+ java.lang.String
+
+
-
- If the user is in the specified role, the tag is taken into account;
- otherwise, the tag is ignored (skipped).
-
+
+ type
+ false
+ true
+ java.lang.String
- useAttribute
- org.apache.tiles.jsp.taglib.UseAttributeTag
- org.apache.tiles.jsp.taglib.UseAttributeTag$Tei
- empty
- Use attribute value inside page.
- Declare a Java variable, and an attribute in the specified scope,
- using tile attribute value.
- Java variable and attribute will have the name specified by 'id',
- or the original name if not specified.
+
+ Put an attribute in enclosing attribute container tag.
+
+
+ Enclosing attribute container tag can be :
+
+ <initContainer>
+ <definition>
+ <insertAttribute>
+ <insertDefinition>
+ <putListAttribute>
+
+ (or any other tag which implements the PutAttributeTagParent
+ interface. Exception is thrown if no appropriate tag can be found.
+
+
+ Put tag can have following atributes :
+
+ name : Name of the attribute
+ value : value to put as attribute
+ type : value type. Possible type are : string (value is used as direct
+ string), template (value is used as a page url to insert), definition (value
+ is used as a definition name to insert), object (value is used as it is)
+ role : Role to check when 'insertAttribute' will be called.
+
+
+
+ Value can also come from tag body. Tag body is taken into account only if
+ value is not set by one of the tag attributes. In this case Attribute type is
+ "string", unless tag body define another type.
+
]]>
+ putAttribute
+ org.apache.tiles.jsp.taglib.PutAttributeTag
+ scriptless
- id
- false
- true
- Declared attribute and variable name.
+
+ name
+ true
+ true
+ java.lang.String
- classname
- false
- true
- Class of the declared variable.
+
+ value
+ false
+ true
+ java.lang.Object
- scope
- false
- false
- Scope of the declared attribute. Default to 'page'.
+
+ expression
+ false
+ true
+ java.lang.String
- name
- true
- true
- Tile's attribute name.
+
+ role
+ false
+ true
+ java.lang.String
- ignore
+
+
+
+ type
false
true
- boolean
+ java.lang.String
+
+
-
- If this attribute is set to true, and the attribute specified by the name
- does not exist, simply return without error. The default value is false, which will
- cause a runtime exception to be thrown.
-
+ true the attribute will be cascaded to all nested attributes.
]]>
+ cascade
+ false
+ true
+ boolean
- importAttribute
- org.apache.tiles.jsp.taglib.ImportAttributeTag
- empty
- Import Tile's attribute in specified context.
- Import attribute from tile to requested scope.
- Attribute name and scope are optional. If not specified, all tile
- attributes are imported in page scope.
- Once imported, an attribute can be used as any other beans from jsp
- contexts.
+
+ Render the value of the specified template attribute to the current
+ Writer
+
+
+
+ Retrieve the value of the specified template attribute property, and render
+ it to the current Writer as a String. The usual toString() conversions is
+ applied on found value.
+
]]>
+ getAsString
+ org.apache.tiles.jsp.taglib.GetAsStringTag
+ scriptless
- name
+
+ true, if an exception happens during
+ rendering, of if the attribute is null, the problem will be ignored.
+ ]]>
+
+ ignore
false
true
+ boolean
+
+
- Tile's attribute name. If not specified, all attributes are
- imported.
+
+ preparer
+ false
+ true
+ java.lang.String
- toName
+
+
+
+ role
false
true
+ java.lang.String
+
+
- Name of the destination attribute. If not specified, the name will
- be the same as specified in name attribute
+
+ defaultValue
+ false
+ true
+ java.lang.Object
- scope
- false
- false
- Scope into which attribute is imported. Default to page.
+
+ defaultValueRole
+ false
+ true
+ java.lang.String
- ignore
+
+
+
+ defaultValueType
false
true
- boolean
+ java.lang.String
+
+
- If this attribute is set to true, and the attribute specified by
- the name does not exist, simply return without error. The default
- value is false, which will cause a runtime exception to be thrown.
+
+ name
+ true
+ true
+ java.lang.String
-
-
- initContainer
- org.apache.tiles.jsp.taglib.definition.InitContainerTag
- JSP
-
- Initialize the TilesContainer.
-
- In order to use the Tiles system, a TilesContainer must be instantiated.
- This initialization is generally done by the TilesListener (or perhaps the
- TilesServlet or TilesFilter).
-
-
- If the intialization needs to be dynamic, you can initialize the container using
- this tag. Realize however, that this tag MUST be executed prior to invoking
- any other definitions. Additionally, the initilization may only be done once,
- and any subsequent invocations will be ignored.
-
- ]]>
-
- containerFactory
+
+
+
+ value
false
true
- Container Factory implementation used to instantiate the container. ]]>
+ org.apache.tiles.Attribute
-
-
- destroyContainer
- org.apache.tiles.jsp.taglib.definition.DestroyContainerTag
- empty
-
- Destroy the TilesContainer.
- ]]>
-
-
-
diff --git a/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/web.xml b/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/web.xml
index c493f5e277c..b93f76fa73b 100644
--- a/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/web.xml
+++ b/core/org.wso2.carbon.ui/src/main/resources/web/WEB-INF/web.xml
@@ -20,15 +20,15 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
-
- TilesServlet
- org.apache.tiles.web.startup.TilesServlet
-
- 0
-
+
+
+
+
+
+
+
+
+
org.apache.tiles.context.TilesContextFactory
diff --git a/core/org.wso2.carbon.user.core/pom.xml b/core/org.wso2.carbon.user.core/pom.xml
index b2665293ac7..8ab00ac3964 100644
--- a/core/org.wso2.carbon.user.core/pom.xml
+++ b/core/org.wso2.carbon.user.core/pom.xml
@@ -165,6 +165,7 @@
+ org.apache.maven.plugins
maven-resources-plugin
@@ -224,6 +225,10 @@
*;resolution:=optional
*
+
+ osgi.service;objectClass=org.wso2.carbon.user.core.service.RealmService,
+ osgi.service;objectClass=org.wso2.carbon.user.api.UserRealmService
+
diff --git a/core/org.wso2.carbon.utils/pom.xml b/core/org.wso2.carbon.utils/pom.xml
index b7acc7810ba..9ac265e5699 100644
--- a/core/org.wso2.carbon.utils/pom.xml
+++ b/core/org.wso2.carbon.utils/pom.xml
@@ -302,6 +302,9 @@
*;resolution:=optional
*
+
+ osgi.service;objectClass=org.wso2.carbon.context.CarbonCoreInitializedEvent
+
diff --git a/core/pom.xml b/core/pom.xml
index 6e1070f730e..c4ade07a838 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -113,7 +113,7 @@
org.wso2.carbon.registry.api
org.wso2.carbon.user.api
org.wso2.carbon.osgi.security
- org.wso2.carbon.registry.xboot
+
org.wso2.carbon.queuing
org.wso2.carbon.utils
org.wso2.carbon.securevault
@@ -147,7 +147,7 @@
org.wso2.carbon.ndatasource.common
org.wso2.carbon.ndatasource.core
org.wso2.carbon.ndatasource.rdbms
- org.wso2.carbon.framework.exporter
+
org.wso2.carbon.pax-logging-log4j2-plugins
org.wso2.carbon.hazelcast
admin-advisory-mgt
diff --git a/core/server-role-manager/org.wso2.carbon.roles.mgt/pom.xml b/core/server-role-manager/org.wso2.carbon.roles.mgt/pom.xml
index e1177f09a83..58001996651 100644
--- a/core/server-role-manager/org.wso2.carbon.roles.mgt/pom.xml
+++ b/core/server-role-manager/org.wso2.carbon.roles.mgt/pom.xml
@@ -53,7 +53,7 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
+ org.eclipse.platform
org.eclipse.osgi.services
diff --git a/core/server-role-manager/pom.xml b/core/server-role-manager/pom.xml
index 42f895f713c..9a031a1017f 100644
--- a/core/server-role-manager/pom.xml
+++ b/core/server-role-manager/pom.xml
@@ -21,6 +21,7 @@
org.wso2.carbon
carbon-kernel
4.10.108-SNAPSHOT
+ ../pom.xml
4.0.0
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature-licensed/1.0.0/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature-licensed/1.0.0/pom.xml
index 0b6f33897d9..e6a838d4413 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature-licensed/1.0.0/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature-licensed/1.0.0/pom.xml
@@ -27,6 +27,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
@@ -53,4 +54,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature-unlicensed/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature-unlicensed/pom.xml
index c9cf236862e..8388b4c960d 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature-unlicensed/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature-unlicensed/pom.xml
@@ -27,6 +27,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
@@ -58,4 +59,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature1/1.0.0/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature1/1.0.0/pom.xml
index 7f8187a9b7b..655aeb45d60 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature1/1.0.0/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature1/1.0.0/pom.xml
@@ -27,6 +27,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
@@ -53,4 +54,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature1/1.0.1/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature1/1.0.1/pom.xml
index 25b166f0d72..07684207b5b 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature1/1.0.1/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature1/1.0.1/pom.xml
@@ -27,6 +27,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
@@ -53,4 +54,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature2/1.0.0/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature2/1.0.0/pom.xml
index d6e712a36ff..4f40094132f 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature2/1.0.0/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature2/1.0.0/pom.xml
@@ -39,6 +39,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
@@ -68,4 +69,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature2/1.0.1/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature2/1.0.1/pom.xml
index d8e43cb522f..d921f2f54b9 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature2/1.0.1/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature2/1.0.1/pom.xml
@@ -39,6 +39,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
@@ -68,4 +69,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature3/1.0.0/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature3/1.0.0/pom.xml
index 9fcdcd519c9..795f85abcc1 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature3/1.0.0/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature3/1.0.0/pom.xml
@@ -39,6 +39,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
@@ -70,4 +71,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature3/1.0.1/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature3/1.0.1/pom.xml
index 97b2d3d55b1..179530c0d2e 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature3/1.0.1/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/feature3/1.0.1/pom.xml
@@ -39,6 +39,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
@@ -70,4 +71,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/licensed-unlicensed-features/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/licensed-unlicensed-features/pom.xml
index 982c6bbe3d1..5836bd93643 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/licensed-unlicensed-features/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/features/licensed-unlicensed-features/pom.xml
@@ -33,6 +33,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
@@ -59,4 +60,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/repository/pom.xml b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/repository/pom.xml
index b8b501f7abe..7410b3d5fdc 100644
--- a/distribution/integration/test-common/common-artifacts/sample-feature-repo1/repository/pom.xml
+++ b/distribution/integration/test-common/common-artifacts/sample-feature-repo1/repository/pom.xml
@@ -19,6 +19,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
2-p2-repo-generation
@@ -67,4 +68,4 @@
-
\ No newline at end of file
+
diff --git a/distribution/integration/tests-integration/tests/pom.xml b/distribution/integration/tests-integration/tests/pom.xml
index c53dbaa3b78..b9ddecaccca 100644
--- a/distribution/integration/tests-integration/tests/pom.xml
+++ b/distribution/integration/tests-integration/tests/pom.xml
@@ -27,7 +27,7 @@
maven-surefire-plugin
false
- -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
+ -Xmx1024m
org.wso2.carbon
org.wso2.carbon.server.admin.ui
@@ -392,6 +409,12 @@
org.wso2.carbon.automationutils
org.wso2.carbon.integration.common.utils
4.4.1
+
+
+ org.slf4j
+ log4j-over-slf4j
+
+
org.apache.logging.log4j
diff --git a/distribution/integration/tests-integration/tests/src/test/java/org/wso2/carbon/integration/tests/carbontools/CarbonServerBasicOperationTestCase.java b/distribution/integration/tests-integration/tests/src/test/java/org/wso2/carbon/integration/tests/carbontools/CarbonServerBasicOperationTestCase.java
index 1cb445b49d5..af8c7b7a2e2 100755
--- a/distribution/integration/tests-integration/tests/src/test/java/org/wso2/carbon/integration/tests/carbontools/CarbonServerBasicOperationTestCase.java
+++ b/distribution/integration/tests-integration/tests/src/test/java/org/wso2/carbon/integration/tests/carbontools/CarbonServerBasicOperationTestCase.java
@@ -35,7 +35,6 @@
import org.wso2.carbon.integration.tests.common.utils.CarbonIntegrationBaseTest;
import org.wso2.carbon.integration.tests.common.utils.CarbonIntegrationConstants;
import org.wso2.carbon.utils.ServerConstants;
-import sun.management.VMManagement;
import javax.xml.xpath.XPathExpressionException;
import java.io.BufferedReader;
@@ -208,17 +207,11 @@ public void testCarbonDumpCommandOnWindows() throws Exception {
if (CarbonCommandToolsUtil.getCurrentOperatingSystem().
contains(OperatingSystems.WINDOWS.name().toLowerCase())) {
- RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
- Field jvmField = runtimeMXBean.getClass().getDeclaredField("jvm");
- jvmField.setAccessible(true);
- VMManagement vmManagement = (VMManagement) jvmField.get(runtimeMXBean);
- Method getProcessIdMethod = vmManagement.getClass().getDeclaredMethod("getProcessId");
- getProcessIdMethod.setAccessible(true);
- Integer processId = (Integer) getProcessIdMethod.invoke(vmManagement);
+ long pid = ProcessHandle.current().pid();
String[] cmdArray = new String[]
{"cmd.exe", "/c", "carbondump.bat", "-carbonHome"
- , carbonHome, "-pid", Integer.toString(processId)};
+ , carbonHome, "-pid", Long.toString(pid)};
processDump = CarbonCommandToolsUtil.runScript(carbonHome + "/bin", cmdArray);
assertTrue(isDumpFileFound(carbonHome), "Couldn't find the dump file");
} else {
diff --git a/distribution/kernel/carbon-home/bin/wso2server.sh b/distribution/kernel/carbon-home/bin/wso2server.sh
index 792e85bb298..03d6cce91c6 100755
--- a/distribution/kernel/carbon-home/bin/wso2server.sh
+++ b/distribution/kernel/carbon-home/bin/wso2server.sh
@@ -288,7 +288,7 @@ echo "Using Java memory options: $JVM_MEM_OPTS"
#To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property.
# -Djava.rmi.server.hostname="your.IP.goes.here"
-JAVA_VER_BASED_OPTS="--add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED --add-opens=java.base/sun.security.x509=ALL-UNNAMED"
+JAVA_VER_BASED_OPTS="--add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED --add-opens=java.base/sun.security.x509=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED"
if [ $java_version_formatted -ge 1700 ]; then
JAVA_VER_BASED_OPTS=$JAVA_VER_BASED_OPTS" --add-opens=java.naming/com.sun.jndi.ldap=ALL-UNNAMED"
diff --git a/distribution/kernel/pom.xml b/distribution/kernel/pom.xml
index a1714862768..d07c6299aac 100644
--- a/distribution/kernel/pom.xml
+++ b/distribution/kernel/pom.xml
@@ -169,38 +169,14 @@
org.jvnet.staxex
stax-ex
+
-
- org.apache.maven.plugins
- maven-dependency-plugin
- false
-
-
- unpack-equinox-executable
- test
-
- unpack
-
-
-
-
- org.eclipse.equinox
- org.eclipse.equinox.executable
- 3.5.0.v20110530-7P7NFUFFLWUl76mart
- zip
- true
- target
-
-
-
-
-
-
org.wso2.maven
carbon-p2-plugin
+ true
p2-repo-generation
@@ -224,6 +200,7 @@
org.wso2.carbon.utils:org.wso2.carbon.database.utils.feature:${org.wso2.carbon.database.utils.version}
+ true
@@ -235,9 +212,6 @@
${basedir}/carbon.product
-
- ${basedir}/target/org.eclipse.equinox.executable_3.5.0.v20110530-7P7NFUFFLWUl76mart
-
file:${basedir}/target/p2-repo
file:${basedir}/target/p2-repo
diff --git a/distribution/product/modules/features/org.wso2.carbon.styles.feature/pom.xml b/distribution/product/modules/features/org.wso2.carbon.styles.feature/pom.xml
index bb8c6e0475b..82ee4219698 100644
--- a/distribution/product/modules/features/org.wso2.carbon.styles.feature/pom.xml
+++ b/distribution/product/modules/features/org.wso2.carbon.styles.feature/pom.xml
@@ -42,6 +42,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
p2-feature-generation
diff --git a/distribution/product/modules/p2-profile-gen/pom.xml b/distribution/product/modules/p2-profile-gen/pom.xml
index f0ac790237a..7ff8a01a872 100644
--- a/distribution/product/modules/p2-profile-gen/pom.xml
+++ b/distribution/product/modules/p2-profile-gen/pom.xml
@@ -61,6 +61,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
2-p2-repo-generation
@@ -83,6 +84,9 @@
org.wso2.carbon.utils:org.wso2.carbon.database.utils.feature:${org.wso2.carbon.database.utils.version}
+
+
+
@@ -113,6 +117,10 @@
org.wso2.carbon.database.utils.feature.group
${org.wso2.carbon.database.utils.version}
+
+
+
+
diff --git a/features/org.wso2.carbon.core.common.feature/pom.xml b/features/org.wso2.carbon.core.common.feature/pom.xml
index bab606bb5b0..1d47e1acda0 100644
--- a/features/org.wso2.carbon.core.common.feature/pom.xml
+++ b/features/org.wso2.carbon.core.common.feature/pom.xml
@@ -36,6 +36,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
4-p2-feature-generation
@@ -54,10 +55,7 @@
- org.eclipse.equinox:org.eclipse.equinox.http.servlet:${version.equinox.http.servlet}
-
-
- org.eclipse.equinox:org.eclipse.equinox.http.helper:${version.equinox.http.helper}
+ org.eclipse.platform:org.eclipse.equinox.http.servlet:${version.equinox.http.servlet}
org.wso2.orbit.org.apache.tomcat:tomcat-jsp-api:${orbit.version.tomcat.jsp.api}
@@ -78,7 +76,7 @@
commons-pool.wso2:commons-pool:${orbit.version.commons.pool}
org.apache.abdera.wso2:abdera:${orbit.version.abdera}
org.apache.axis2.wso2:axis2:${orbit.version.axis2}
- org.apache.tiles.wso2:tiles-jsp:${orbit.version.tiles}
+ org.wso2.orbit.org.apache.tiles:tiles-jsp:${orbit.version.tiles}
org.wso2.orbit.org.apache.xmlbeans:xmlbeans:${version.xmlbeans}
org.apache.ws.commons.axiom.wso2:axiom:${orbit.version.axiom}
org.wso2.orbit.org.apache.neethi:neethi:${neethi.osgi.version}
@@ -170,6 +168,11 @@
org.wso2.carbon.crypto:org.wso2.carbon.crypto.provider:${carbon.crypto.version}
org.wso2.orbit.sun.xml.bind:jaxb:${version.org.wso2.orbit.javax.xml.bind.jaxb}
+
+ org.wso2.orbit.javax.activation:activation:1.1.1.wso2v4
+
+
+ javax.xml.soap:javax.xml.soap-api:1.4.0
diff --git a/features/org.wso2.carbon.core.feature/pom.xml b/features/org.wso2.carbon.core.feature/pom.xml
index e45a0b0d71f..13210e81b47 100644
--- a/features/org.wso2.carbon.core.feature/pom.xml
+++ b/features/org.wso2.carbon.core.feature/pom.xml
@@ -49,6 +49,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
4-p2-feature-generation
diff --git a/features/org.wso2.carbon.core.runtime.feature/pom.xml b/features/org.wso2.carbon.core.runtime.feature/pom.xml
index 2e0b5ef9783..91f45f42c0c 100644
--- a/features/org.wso2.carbon.core.runtime.feature/pom.xml
+++ b/features/org.wso2.carbon.core.runtime.feature/pom.xml
@@ -38,19 +38,24 @@
org.eclipse.osgi
- org.wso2.eclipse.osgi
+ org.eclipse.platform
org.eclipse.osgi.services
+
+
+
+
+
- org.wso2.eclipse.equinox
- org.eclipse.equinox.launcher.gtk.linux.x86
+ org.eclipse.platform
+ org.eclipse.equinox.launcher.gtk.linux.x86_64
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.common
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.simpleconfigurator
@@ -58,31 +63,39 @@
org.wso2.carbon.osgi.security
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.util
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.ds
- org.wso2.eclipse.equinox
+ org.eclipse.platform
+ org.eclipse.osgi.util
+
+
+ org.apache.felix
+ org.apache.felix.scr
+
+
+ org.eclipse.platform
org.eclipse.equinox.launcher
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.app
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.concurrent
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.frameworkadmin
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.frameworkadmin.equinox
@@ -102,119 +115,132 @@
org.apache.felix.gogo.runtime
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.artifact.repository
- org.wso2.eclipse.equinox
+ org.tukaani
+ xz
+
+
+ org.eclipse.platform
org.eclipse.equinox.p2.console
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.core
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.director
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.director.app
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.directorywatcher
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.engine
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.extensionlocation
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.garbagecollector
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.jarprocessor
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.metadata
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.metadata.repository
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.reconciler.dropins
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.repository.tools
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.repository
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.touchpoint.eclipse
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.touchpoint.natives
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.updatechecker
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.updatesite
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.publisher.eclipse
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.preferences
- org.wso2.eclipse.equinox
+ org.osgi
+ org.osgi.service.prefs
+
+
+
+ org.bouncycastle
+ bcpg-jdk18on
+
+
+ org.eclipse.platform
org.eclipse.equinox.registry
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.security
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.simpleconfigurator.manipulator
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.publisher
- org.eclipse.core
+ org.eclipse.platform
org.eclipse.core.contenttype
- org.eclipse.core
+ org.eclipse.platform
org.eclipse.core.expressions
- org.eclipse.core
+ org.eclipse.platform
org.eclipse.core.jobs
- org.eclipse.core
+ org.eclipse.platform
org.eclipse.core.runtime
@@ -242,7 +268,7 @@
org.sat4j.pb
- org.eclipse.osgi
+ org.eclipse.platform
org.eclipse.equinox.p2.transport.ecf
@@ -253,6 +279,63 @@
org.wso2.eclipse.osgi
org.eclipse.osgi.compatibility.state
+
+ org.osgi
+ org.osgi.service.component
+
+
+ org.osgi
+ org.osgi.util.promise
+
+
+ org.osgi
+ org.osgi.util.function
+
+
+ org.osgi
+ org.osgi.service.cm
+
+
+ org.osgi
+ org.osgi.service.upnp
+
+
+ org.osgi
+ org.osgi.service.device
+
+
+ org.osgi
+ org.osgi.service.event
+
+
+ org.osgi
+ org.osgi.service.wireadmin
+
+
+ org.osgi
+ org.osgi.service.provisioning
+
+
+ org.osgi
+ org.osgi.service.useradmin
+
+
+ org.osgi
+ org.osgi.service.metatype
+
+
+ org.osgi
+ org.osgi.service.permissionadmin
+
+
+ org.osgi
+ org.osgi.service.http.whiteboard
+
+
+ org.eclipse.platform
+ org.eclipse.equinox.http.service.api
+
+
@@ -260,6 +343,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
4-p2-feature-generation
@@ -276,62 +360,79 @@
- org.wso2.eclipse.equinox:org.eclipse.equinox.common
- org.wso2.eclipse.equinox:org.eclipse.equinox.simpleconfigurator
+ org.eclipse.platform:org.eclipse.equinox.common
+ org.eclipse.platform:org.eclipse.equinox.simpleconfigurator
org.wso2.carbon:org.wso2.carbon.osgi.security
- org.wso2.eclipse.equinox:org.eclipse.equinox.ds
- org.wso2.eclipse.equinox:org.eclipse.equinox.launcher
- org.wso2.eclipse.equinox:org.eclipse.equinox.util
- org.wso2.eclipse.osgi:org.eclipse.osgi.services
+ org.eclipse.platform:org.eclipse.equinox.ds
+
+ org.eclipse.platform:org.eclipse.equinox.launcher
+ org.eclipse.platform:org.eclipse.equinox.util
+ org.eclipse.platform:org.eclipse.osgi.services
org.eclipse.platform:org.eclipse.osgi
- org.eclipse.equinox:org.eclipse.equinox.app
- org.wso2.eclipse.equinox:org.eclipse.equinox.concurrent
- org.wso2.eclipse.equinox:org.eclipse.equinox.frameworkadmin
- org.wso2.eclipse.equinox:org.eclipse.equinox.frameworkadmin.equinox
- org.wso2.eclipse.equinox:org.eclipse.equinox.preferences
- org.wso2.eclipse.equinox:org.eclipse.equinox.registry
- org.wso2.eclipse.equinox:org.eclipse.equinox.security
- org.wso2.eclipse.equinox:org.eclipse.equinox.simpleconfigurator.manipulator
+ org.eclipse.platform:org.eclipse.equinox.app
+ org.eclipse.platform:org.eclipse.equinox.concurrent
+ org.eclipse.platform:org.eclipse.equinox.frameworkadmin
+ org.eclipse.platform:org.eclipse.equinox.frameworkadmin.equinox
+ org.eclipse.platform:org.eclipse.equinox.preferences
+ org.osgi:org.osgi.service.prefs
+ org.bouncycastle:bcpg-jdk18on
+ org.eclipse.platform:org.eclipse.equinox.registry
+ org.eclipse.platform:org.eclipse.equinox.security
+ org.eclipse.platform:org.eclipse.equinox.simpleconfigurator.manipulator
-
+ org.apache.felix:org.apache.felix.scr
org.eclipse.platform:org.eclipse.equinox.console
org.apache.felix:org.apache.felix.gogo.command
org.apache.felix:org.apache.felix.gogo.runtime
org.apache.felix:org.apache.felix.gogo.shell
- org.eclipse.core:org.eclipse.core.contenttype
- org.eclipse.core:org.eclipse.core.expressions
- org.eclipse.core:org.eclipse.core.jobs
- org.eclipse.core:org.eclipse.core.runtime
+ org.eclipse.platform:org.eclipse.core.contenttype
+ org.eclipse.platform:org.eclipse.core.expressions
+ org.eclipse.platform:org.eclipse.core.jobs
+ org.eclipse.platform:org.eclipse.core.runtime
org.eclipse.ecf:org.eclipse.ecf
org.eclipse.ecf:org.eclipse.ecf.filetransfer
org.eclipse.ecf:org.eclipse.ecf.identity
org.eclipse.ecf:org.eclipse.ecf.provider.filetransfer
org.eclipse:org.sat4j.core
org.eclipse:org.sat4j.pb
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.artifact.repository
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.console
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.core
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.director
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.engine
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.garbagecollector
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.jarprocessor
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.metadata
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.metadata.repository
- org.eclipse.equinox:org.eclipse.equinox.p2.publisher
- org.eclipse.equinox:org.eclipse.equinox.p2.touchpoint.eclipse
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.touchpoint.natives
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.updatechecker
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.director.app
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.directorywatcher
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.extensionlocation
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.repository.tools
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.repository
- org.wso2.eclipse.equinox:org.eclipse.equinox.p2.updatesite
- org.eclipse.equinox:org.eclipse.equinox.p2.publisher.eclipse
- org.wso2.eclipse.equinox:org.eclipse.equinox.launcher.gtk.linux.x86
- org.eclipse.osgi:org.eclipse.equinox.p2.transport.ecf
+ org.eclipse.platform:org.eclipse.equinox.p2.artifact.repository
+ org.tukaani:xz
+ org.eclipse.platform:org.eclipse.equinox.p2.console
+ org.eclipse.platform:org.eclipse.equinox.p2.core
+ org.eclipse.platform:org.eclipse.equinox.p2.director
+ org.eclipse.platform:org.eclipse.equinox.p2.engine
+ org.eclipse.platform:org.eclipse.equinox.p2.garbagecollector
+ org.eclipse.platform:org.eclipse.equinox.p2.jarprocessor
+ org.eclipse.platform:org.eclipse.equinox.p2.metadata
+ org.eclipse.platform:org.eclipse.equinox.p2.metadata.repository
+ org.eclipse.platform:org.eclipse.equinox.p2.publisher
+ org.eclipse.platform:org.eclipse.equinox.p2.touchpoint.eclipse
+ org.eclipse.platform:org.eclipse.equinox.p2.touchpoint.natives
+ org.eclipse.platform:org.eclipse.equinox.p2.updatechecker
+ org.eclipse.platform:org.eclipse.equinox.p2.director.app
+ org.eclipse.platform:org.eclipse.equinox.p2.directorywatcher
+ org.eclipse.platform:org.eclipse.equinox.p2.extensionlocation
+ org.eclipse.platform:org.eclipse.equinox.p2.repository.tools
+ org.eclipse.platform:org.eclipse.equinox.p2.repository
+ org.eclipse.platform:org.eclipse.equinox.p2.updatesite
+ org.eclipse.platform:org.eclipse.equinox.p2.publisher.eclipse
+ org.eclipse.platform:org.eclipse.equinox.p2.transport.ecf
+ org.eclipse.platform:org.eclipse.equinox.http.service.api
org.eclipse.ecf.provider.filetransfer:httpclient
org.wso2.eclipse.osgi:org.eclipse.osgi.compatibility.state
+ org.osgi:org.osgi.service.component
+ org.osgi:org.osgi.util.promise
+ org.osgi:org.osgi.util.function
+ org.osgi:org.osgi.service.cm
+ org.osgi:org.osgi.service.upnp
+ org.osgi:org.osgi.service.device
+ org.osgi:org.osgi.service.event
+ org.osgi:org.osgi.service.wireadmin
+ org.osgi:org.osgi.service.provisioning
+ org.osgi:org.osgi.service.useradmin
+ org.osgi:org.osgi.service.metatype
+ org.osgi:org.osgi.service.permissionadmin
+ org.osgi:org.osgi.service.http.whiteboard
diff --git a/features/org.wso2.carbon.core.server.feature/pom.xml b/features/org.wso2.carbon.core.server.feature/pom.xml
index d6869742f40..63664ebbd50 100644
--- a/features/org.wso2.carbon.core.server.feature/pom.xml
+++ b/features/org.wso2.carbon.core.server.feature/pom.xml
@@ -36,6 +36,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
4-p2-feature-generation
diff --git a/features/org.wso2.carbon.core.ui.feature/pom.xml b/features/org.wso2.carbon.core.ui.feature/pom.xml
index 15459a3fbe3..efa73498cb0 100644
--- a/features/org.wso2.carbon.core.ui.feature/pom.xml
+++ b/features/org.wso2.carbon.core.ui.feature/pom.xml
@@ -36,6 +36,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
4-p2-feature-generation
@@ -54,6 +55,7 @@
org.eclipse.platform:org.eclipse.equinox.jsp.jasper:${version.equinox.jsp.jasper}
+ org.glassfish:jakarta.el:3.0.4
org.wso2.carbon:org.wso2.carbon.ui:${carbon.kernel.version}
org.wso2.carbon:org.wso2.carbon.core.commons.stub:${carbon.kernel.version}
org.wso2.carbon:org.wso2.carbon.ui.menu.general:${carbon.kernel.version}
diff --git a/features/org.wso2.carbon.hazelcast.feature/pom.xml b/features/org.wso2.carbon.hazelcast.feature/pom.xml
index 25912801faa..f3a40a4da6d 100644
--- a/features/org.wso2.carbon.hazelcast.feature/pom.xml
+++ b/features/org.wso2.carbon.hazelcast.feature/pom.xml
@@ -35,6 +35,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
4-p2-feature-generation
diff --git a/parent/pom.xml b/parent/pom.xml
index 0a9eafe0910..b30dd803624 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -50,7 +50,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 1.8
+ 21
@@ -80,7 +80,6 @@
org.apache.maven.plugins
maven-compiler-plugin
- ${maven.compiler.plugin.version}
org.apache.maven.plugins
@@ -108,10 +107,11 @@
org.apache.maven.plugins
maven-compiler-plugin
+ 3.12.1
UTF-8
- 1.8
- 1.8
+ 21
+ 21
@@ -293,6 +293,11 @@
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ ${maven.resources.plugin.version}
+
@@ -306,75 +311,73 @@
[${carbon.kernel.version}, 5.0.0)
- 1.1.200.v20160504-1450
- 3.8.0.v20160509-1230
- 1.4.400.v20160226-2036
- 1.3.200.v20160318-1642
- 1.0.500.v20130404-1337
- 1.3.100.v20130327-1442
- 1.1.0.v20130327-1442
- 2.0.300.v20160504-1450
- 1.0.700.v20160102-2223
- 3.6.0.v20160120-1756
- 3.6.0.v20150318-1503
- 1.2.100.v20150423-1356
- 2.0.200.v20160504-1450
- 1.1.400.v20160518-1444
- 3.9.0.v20130326-1255
- 3.5.100.v20160504-1419
- 3.14.0
- 3.4.200.v20130326-1255
- 3.4.500.v20130515-1343
- 3.5.300.v20130429-1813
- 1.3.300
+ 1.5.200
+ 3.19.0
+ 1.6.200
+ 1.6.700
+ 1.1.300
+ 1.7.0
+ 1.3.0
+ 2.3.100
+ 1.3.100
+ 3.11.0
+ 3.12.0
+ 1.4.200
+ 2.3.100
+ 1.1.800
+ 3.31.0
+ 3.12.0
+ 3.19.0
+ 3.9.300
+ 3.9.300
+ 3.15.200
+ 1.4.700
1.0.200.v20160504-1419
- 3.2.0.v20130604-1622
- 5.0.0.v20130604-1622
- 3.2.0.v20130604-1622
- 3.2.0.v20130604-1622
+ 3.11.0
+ 5.1.103
+ 3.10.0
+ 3.3.0
2.3.5.v201308161310
2.3.5.v201308161310
2.3.0.v20110329
[1.9,2.0)
[1.2.0,2.0)
- 1.1.400.v20130418-1354
- 1.1.0.wso2v1
- 1.1.200
+ 1.8.100
+
+ 1.2.0
3.0.0.v201112011016
2.2.0.v201108011116
2.2.0.v201112011158
- 2.2.2.v201205150955
-
- 1.1.300.v20131211-1531
- 2.3.0.v20131211-1531
- 2.3.100.v20140224-1921
- 1.0.300.v20150129-0838
- 1.1.0.v20131211-1531
- 2.3.0.v20140506-1720
- 1.0.300.v20131113-1212
+
+ 1.5.300
+ 2.11.0
+ 2.6.300
+ 1.3.300
+ 1.4.300
+ 2.10.0
+ 1.3.300
- 1.2.100.v20131119-0908
- 1.0.200.v20131115-1210
- 1.0.300.v20131211-1531
- 2.2.0.v20131211-1531
- 1.2.100.v20131209-2144
- 1.1.200.v20131119-0908
- 2.1.0.v20131211-1531
- 2.3.0.v20131211-1531
- 2.1.0.v20110511-wso2v1
-
- 1.1.100.v20140523-0116
- 1.1.200.v20131119-0908
- 1.0.400.v20131211-1531
- 0.10.0.v201212101605
- 0.10.0.v201209301036
- 0.10.0.v201209301215
- 1.0.0.v20110511
- 1.2.0.v20110511
- 1.0.100.v20110902-0807
+ 1.5.300
+ 1.3.200
+ 1.3.300
+ 2.9.0
+ 1.5.300
+ 1.5.300
+ 2.4.300
+ 2.8.100
+ 2.4.200
+ 1.5.200
+ 1.4.200
+ 1.3.200
+ 1.1.4
+ 1.1.6
+ 1.1.2
+ 1.6.0
+ 1.9.100
+ 1.4.200
4.0.200.v20120319-0616
- 5.1.2
+ 5.2.50-SNAPSHOT
1.1.16
@@ -397,9 +400,9 @@
[1.2.1, 1.3.0)
- 2.0.5.wso2v3
- 2.0.5
- [2.0.5, 2.2.0)
+ 3.0.7.wso2v2
+ 3.0.7
+
2.2.wso2v1
@@ -456,7 +459,7 @@
3.1.0.RELEASE
- 1.6.1-wso2v76
+ 1.6.1-wso2v98-SNAPSHOT
[1.6.1, 1.7.0)
${version.axis2}
${version.axis2}
@@ -490,10 +493,10 @@
2.1.0-wso2v5
2.3.2
- 9.0.102
- ${version.tomcat}.wso2v1
- ${version.tomcat}.wso2v1
- ${version.tomcat}.wso2v1
+ 9.0.85
+ ${version.tomcat}.wso2v2
+ ${version.tomcat}.wso2v2
+ ${version.tomcat}.wso2v2
${version.tomcat}.wso2v1
${version.tomcat}.wso2v1
@@ -518,10 +521,6 @@
10.3.2.1wso2v1
-
- 1.5.10
-
-
1.3.2
1.2
@@ -543,7 +542,7 @@
1.16.0.wso2v1
0.1.0.wso2v1
3.1.0.wso2v1
- 1.6.0.wso2v1
+ 1.5.0.wso2v3
1.5.0.wso2v2
1.8.wso2v1
@@ -555,7 +554,7 @@
5.3.1.wso2v1
5.4.1.wso2v1
- 1.2.0.wso2v1
+ 1.2.0.wso2v3
5.1.1.wso2v1
@@ -579,7 +578,6 @@
1.0
1.2
1.0
- 2.2.0.v201108011116
0.3.3.wso2v1
3.3.5.wso2v1
2.1
@@ -595,7 +593,7 @@
1.3
1.7.4
- 3.2.0
+ 5.1.9
2.1.2
2.4
1.7
@@ -617,23 +615,24 @@
4.1.115.wso2v2
- 1.5.10
+ 2.0.13
1.0M9
2.4.1
2.9.0
- 4.4.3
- 6.10
+ 4.4.11-SNAPSHOT
+ 7.10.1
1.5.5
- 0.8.2
- 2.22.0
- 2.22.0
+ 0.8.12
+ 3.3.0
+ 3.3.0
5.3.1
+ 3.3.1
- 3.1.0.wso2v4
+ 3.1.0.wso2v5
[1.2.0,1.3.0)
@@ -674,6 +673,7 @@
2.2.8
[2.1.0,3.0.0)
+
@@ -689,193 +689,228 @@
${version.equinox.osgi}
- org.wso2.eclipse.osgi
+ org.eclipse.platform
org.eclipse.osgi.services
${version.equinox.osgi.services}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
+ org.eclipse.osgi.util
+ 3.7.300
+
+
+ org.apache.felix
+ org.apache.felix.scr
+ 2.2.10
+
+
+
+ org.eclipse.platform
org.eclipse.equinox.common
${version.equinox.common}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.simpleconfigurator
${version.equinox.simpleconfigurator}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.util
${version.equinox.util}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.ds
${version.equinox.ds}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.launcher
${version.equinox.launcher}
+
+
+
+
+
+
- org.wso2.eclipse.equinox
- org.eclipse.equinox.launcher.gtk.linux.x86
- ${version.equinox.launcher.gtk.linux.x86}
+ org.eclipse.platform
+ org.eclipse.equinox.launcher.gtk.linux.x86_64
+ 1.2.900
+
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.app
${version.equinox.app}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.concurrent
${version.equinox.concurrent}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.frameworkadmin
${version.equinox.frameworkadmin}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.frameworkadmin.equinox
${version.equinox.frameworkadmin.equinox}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.artifact.repository
${version.equinox.p2.artifact.repository}
+
+
+ org.tukaani
+ xz
+ 1.9
+
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.console
${version.equinox.p2.console}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.core
${version.equinox.p2.core}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.director
${version.equinox.p2.director}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.director.app
${version.equinox.p2.director.app}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.directorywatcher
${version.equinox.p2.directorywatcher}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.engine
${version.equinox.p2.engine}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.extensionlocation
${version.equinox.p2.extensionlocation}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.garbagecollector
${version.equinox.p2.garbagecollector}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.jarprocessor
${version.equinox.p2.jarprocessor}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.metadata
${version.equinox.p2.metadata}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.metadata.repository
${version.equinox.p2.metadata.repository}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.reconciler.dropins
${version.equinox.p2.reconciler.dropins}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.repository.tools
${version.equinox.p2.repository.tools}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.repository
${version.equinox.p2.repository}
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.touchpoint.eclipse
${version.equinox.p2.touchpoint.eclipse}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.touchpoint.natives
${version.equinox.p2.touchpoint.natives}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.updatechecker
${version.equinox.p2.updatechecker}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.updatesite
${version.equinox.p2.updatesite}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.preferences
${version.equinox.preferences}
- org.wso2.eclipse.equinox
+ org.osgi
+ org.osgi.service.prefs
+ 1.1.2
+
+
+
+ org.bouncycastle
+ bcpg-jdk18on
+ 1.77
+
+
+ org.eclipse.platform
org.eclipse.equinox.registry
${version.equinox.registry}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.security
${version.equinox.security}
- org.wso2.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.simpleconfigurator.manipulator
${version.equinox.simpleconfigurator.manipulator}
- org.eclipse.core
+ org.eclipse.platform
org.eclipse.core.contenttype
${version.equinox.core.contenttype}
- org.eclipse.core
+ org.eclipse.platform
org.eclipse.core.expressions
${version.equinox.core.expressions}
- org.eclipse.core
+ org.eclipse.platform
org.eclipse.core.jobs
${version.equinox.core.jobs}
- org.eclipse.core
+ org.eclipse.platform
org.eclipse.core.runtime
${version.equinox.core.runtime}
@@ -921,14 +956,19 @@
${version.eclipse.ecj}
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.http.servlet
${version.equinox.http.servlet}
+
+
+
+
+
- org.eclipse.equinox
- org.eclipse.equinox.http.helper
- ${version.equinox.http.helper}
+ org.eclipse.platform
+ org.eclipse.equinox.http.service.api
+ 1.2.2
org.eclipse.platform
@@ -936,27 +976,23 @@
${version.equinox.jsp.jasper}
- org.eclipse.equinox
- javax.servlet.jsp
- ${version.equinox.javax.servlet.jsp}
-
-
- org.eclipse.equinox
- org.apache.jasper.glassfish
- ${version.equinox.jasper}
+ org.glassfish
+ jakarta.el
+ 3.0.4
+
org.eclipse.equinox
- javax.el
- ${version.javax.el}
+ javax.servlet.jsp
+ ${version.equinox.javax.servlet.jsp}
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.publisher
${version.equinox.p2.publisher}
- org.eclipse.equinox
+ org.eclipse.platform
org.eclipse.equinox.p2.publisher.eclipse
${version.equinox.p2.publisher.eclipse}
@@ -976,7 +1012,7 @@
${version.apache.felix.gogo.runtime}
- org.eclipse.osgi
+ org.eclipse.platform
org.eclipse.equinox.p2.transport.ecf
${version.equinox.p2.transport.ecf}
@@ -995,6 +1031,7 @@
javax.servlet
${version.equinox.javax.servlet}
+
org.wso2.eclipse.osgi
org.eclipse.osgi.compatibility.state
@@ -1066,7 +1103,7 @@
${version.geronimo.stax.api.spec}
- org.apache.tiles.wso2
+ org.wso2.orbit.org.apache.tiles
tiles-jsp
${orbit.version.tiles}
@@ -1769,16 +1806,6 @@
org.wso2.carbon.automation.test.utils
${test.framework.version}
-
org.wso2.carbon
org.wso2.carbon.integration.test.common.integration.test.utils
@@ -1916,6 +1943,72 @@
org.osgi.service.component.annotations
${version.org.osgi.service.component.annotations}
+
+ org.osgi
+ org.osgi.service.component
+ 1.5.1
+
+
+ org.osgi
+ org.osgi.util.promise
+ 1.3.0
+
+
+ org.osgi
+ org.osgi.util.function
+ 1.2.0
+
+
+ org.osgi
+ org.osgi.service.cm
+ 1.6.1
+
+
+ org.osgi
+ org.osgi.service.upnp
+ 1.2.1
+
+
+ org.osgi
+ org.osgi.service.device
+ 1.1.1
+
+
+ org.osgi
+ org.osgi.service.event
+ 1.4.1
+
+
+ org.osgi
+ org.osgi.service.wireadmin
+ 1.0.2
+
+
+ org.osgi
+ org.osgi.service.provisioning
+ 1.2.0
+
+
+ org.osgi
+ org.osgi.service.useradmin
+ 1.1.1
+
+
+ org.osgi
+ org.osgi.service.metatype
+ 1.4.1
+
+
+ org.osgi
+ org.osgi.service.permissionadmin
+ 1.2.1
+
+
+ org.osgi
+ org.osgi.service.http.whiteboard
+ 1.1.1
+
+
org.osgi
org.osgi.annotation
@@ -1992,6 +2085,16 @@
org.wso2.carbon.database.utils
${org.wso2.carbon.database.utils.version}
+
+ org.wso2.orbit.javax.activation
+ activation
+ 1.1.1.wso2v4
+
+
+ javax.xml.soap
+ javax.xml.soap-api
+ 1.4.0
+
diff --git a/samples/pom.xml b/samples/pom.xml
index 789c2b17c66..bd43baffb58 100644
--- a/samples/pom.xml
+++ b/samples/pom.xml
@@ -26,7 +26,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 1.8
+ 17
diff --git a/samples/student-manager/components/org.wso2.carbon.student.mgt.ui/pom.xml b/samples/student-manager/components/org.wso2.carbon.student.mgt.ui/pom.xml
index 8dde338b3e7..c6479dd7875 100644
--- a/samples/student-manager/components/org.wso2.carbon.student.mgt.ui/pom.xml
+++ b/samples/student-manager/components/org.wso2.carbon.student.mgt.ui/pom.xml
@@ -82,7 +82,6 @@
org.apache.felix
maven-bundle-plugin
- ${maven.bundle.plugin.version}
true
s
diff --git a/samples/student-manager/features/org.wso2.carbon.student.mgt.feature/pom.xml b/samples/student-manager/features/org.wso2.carbon.student.mgt.feature/pom.xml
index 9c558b363e3..fc3201e613e 100644
--- a/samples/student-manager/features/org.wso2.carbon.student.mgt.feature/pom.xml
+++ b/samples/student-manager/features/org.wso2.carbon.student.mgt.feature/pom.xml
@@ -36,6 +36,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
${carbon.p2.plugin.version}
@@ -53,10 +54,8 @@
- org.wso2.carbon:org.wso2.carbon.student.mgt.server.feature
-
- org.wso2.carbon:org.wso2.carbon.student.mgt.ui.feature
-
+ org.wso2.carbon:org.wso2.carbon.student.mgt.server.feature:${student.manager.version}
+ org.wso2.carbon:org.wso2.carbon.student.mgt.ui.feature:${student.manager.version}
diff --git a/samples/student-manager/features/org.wso2.carbon.student.mgt.server.feature/pom.xml b/samples/student-manager/features/org.wso2.carbon.student.mgt.server.feature/pom.xml
index 3c222c92b24..ae3faa3dc25 100644
--- a/samples/student-manager/features/org.wso2.carbon.student.mgt.server.feature/pom.xml
+++ b/samples/student-manager/features/org.wso2.carbon.student.mgt.server.feature/pom.xml
@@ -27,6 +27,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
${carbon.p2.plugin.version}
@@ -45,7 +46,7 @@
- org.wso2.carbon:org.wso2.carbon.student.mgt
+ org.wso2.carbon:org.wso2.carbon.student.mgt:${student.manager.version}
diff --git a/samples/student-manager/features/org.wso2.carbon.student.mgt.ui.feature/pom.xml b/samples/student-manager/features/org.wso2.carbon.student.mgt.ui.feature/pom.xml
index c9e2b56f332..1419c9d0a56 100644
--- a/samples/student-manager/features/org.wso2.carbon.student.mgt.ui.feature/pom.xml
+++ b/samples/student-manager/features/org.wso2.carbon.student.mgt.ui.feature/pom.xml
@@ -25,6 +25,7 @@
org.wso2.maven
carbon-p2-plugin
+ true
${carbon.p2.plugin.version}
@@ -43,7 +44,7 @@
- org.wso2.carbon:org.wso2.carbon.student.mgt.ui
+ org.wso2.carbon:org.wso2.carbon.student.mgt.ui:${student.manager.version}
diff --git a/samples/student-manager/features/pom.xml b/samples/student-manager/features/pom.xml
index cf2a11a0341..88089680149 100644
--- a/samples/student-manager/features/pom.xml
+++ b/samples/student-manager/features/pom.xml
@@ -18,8 +18,4 @@
org.wso2.carbon.student.mgt.ui.feature
org.wso2.carbon.student.mgt.feature
-
-
-
-
diff --git a/samples/student-manager/pom.xml b/samples/student-manager/pom.xml
index 7d69703e290..4802fee24d9 100644
--- a/samples/student-manager/pom.xml
+++ b/samples/student-manager/pom.xml
@@ -16,7 +16,7 @@
4.10.108-SNAPSHOT
- 5.1.2
+ 5.2.50-SNAPSHOT
2.3.5
1.6.1-wso2v29
diff --git a/samples/student-manager/repository/pom.xml b/samples/student-manager/repository/pom.xml
index 6f7a7213aae..d397347000c 100644
--- a/samples/student-manager/repository/pom.xml
+++ b/samples/student-manager/repository/pom.xml
@@ -20,6 +20,7 @@
org.wso2.maven
carbon-p2-plugin
${carbon.p2.plugin.version}
+ true
2-p2-repo-generation
diff --git a/tests/caching/pom.xml b/tests/caching/pom.xml
index 5300f882ccc..e15ae108a12 100644
--- a/tests/caching/pom.xml
+++ b/tests/caching/pom.xml
@@ -23,8 +23,8 @@
org.apache.maven.plugins
maven-compiler-plugin
- 8
- 8
+ 17
+ 17
From 9688d9f600648c1d03b197fadb1a7fad43ef1477 Mon Sep 17 00:00:00 2001
From: Maduranga Siriwardena
Date: Wed, 12 Nov 2025 22:46:26 +0530
Subject: [PATCH 2/5] Add new changes
---
.../core/internal/CarbonCoreActivator.java | 60 +++++++++----------
.../carbon/core/util/KeyStoreUtilTest.java | 5 ++
.../core/test/jdbc/CustomQueryTest.java | 14 ++---
.../ui/CustomTilesInitializerListener.java | 1 -
distribution/kernel/pom.xml | 1 -
.../pom.xml | 10 ++++
.../pom.xml | 1 +
parent/pom.xml | 23 +++++--
samples/student-manager/pom.xml | 2 +-
9 files changed, 72 insertions(+), 45 deletions(-)
diff --git a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreActivator.java b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreActivator.java
index 478a1f9b9cf..2bc5bafb55d 100644
--- a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreActivator.java
+++ b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreActivator.java
@@ -41,10 +41,10 @@ public class CarbonCoreActivator implements BundleActivator {
public void start(BundleContext context) throws Exception {
// Need permissions in order to activate Carbon Core
- SecurityManager secMan = System.getSecurityManager();
- if (secMan != null) {
- secMan.checkPermission(new ManagementPermission("control"));
- }
+// SecurityManager secMan = System.getSecurityManager();
+// if (secMan != null) {
+// secMan.checkPermission(new ManagementPermission("control"));
+// }
// We assume it's super tenant during the deployment time
PrivilegedCarbonContext privilegedCarbonContext = PrivilegedCarbonContext
.getThreadLocalCarbonContext();
@@ -73,32 +73,32 @@ public void start(BundleContext context) throws Exception {
System.getProperty("user.language") + "-" + System.getProperty("user.country") +
", " + System.getProperty("user.timezone"));
- String providerName = ServerConfiguration.getInstance().getFirstProperty(ServerConstants.JCE_PROVIDER);
- Provider provider;
- if (StringUtils.isBlank(providerName) || providerName.equals(ServerConstants.JCE_PROVIDER_BC)) {
- provider = (Provider) (Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider")).
- getDeclaredConstructor().newInstance();
-
- // Add BouncyCastle JSSE provider and preferred named groups for outbound communication.
- String jsseProviderName = ServerConfiguration.getInstance().getFirstProperty(ServerConstants.JSSE_PROVIDER);
- if (ServerConstants.JSSE_PROVIDER_BC.equals(jsseProviderName)) {
- Provider jsseProvider = (Provider)
- (Class.forName("org.bouncycastle.jsse.provider.BouncyCastleJsseProvider")).
- getDeclaredConstructor().newInstance();
- Security.insertProviderAt(jsseProvider, 1);
- }
-
- } else if (providerName.equals(ServerConstants.JCE_PROVIDER_BCFIPS)) {
- provider = (Provider) (Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider")).
- getDeclaredConstructor().newInstance();
-
- } else {
- throw new NoSuchProviderException("Configured JCE provider is not supported.");
- }
- Security.addProvider(provider);
- if (log.isDebugEnabled()) {
- log.debug(providerName + " security provider is successfully registered in JVM.");
- }
+// String providerName = ServerConfiguration.getInstance().getFirstProperty(ServerConstants.JCE_PROVIDER);
+// Provider provider;
+// if (StringUtils.isBlank(providerName) || providerName.equals(ServerConstants.JCE_PROVIDER_BC)) {
+// provider = (Provider) (Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider")).
+// getDeclaredConstructor().newInstance();
+//
+// // Add BouncyCastle JSSE provider and preferred named groups for outbound communication.
+// String jsseProviderName = ServerConfiguration.getInstance().getFirstProperty(ServerConstants.JSSE_PROVIDER);
+// if (ServerConstants.JSSE_PROVIDER_BC.equals(jsseProviderName)) {
+// Provider jsseProvider = (Provider)
+// (Class.forName("org.bouncycastle.jsse.provider.BouncyCastleJsseProvider")).
+// getDeclaredConstructor().newInstance();
+// Security.insertProviderAt(jsseProvider, 1);
+// }
+//
+// } else if (providerName.equals(ServerConstants.JCE_PROVIDER_BCFIPS)) {
+// provider = (Provider) (Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider")).
+// getDeclaredConstructor().newInstance();
+//
+// } else {
+// throw new NoSuchProviderException("Configured JCE provider is not supported.");
+// }
+// Security.addProvider(provider);
+// if (log.isDebugEnabled()) {
+// log.debug(providerName + " security provider is successfully registered in JVM.");
+// }
}
public void stop(BundleContext context) throws Exception {
diff --git a/core/org.wso2.carbon.core/src/test/java/org/wso2/carbon/core/util/KeyStoreUtilTest.java b/core/org.wso2.carbon.core/src/test/java/org/wso2/carbon/core/util/KeyStoreUtilTest.java
index e8a6dcea4f1..3b0c93d272b 100644
--- a/core/org.wso2.carbon.core/src/test/java/org/wso2/carbon/core/util/KeyStoreUtilTest.java
+++ b/core/org.wso2.carbon.core/src/test/java/org/wso2/carbon/core/util/KeyStoreUtilTest.java
@@ -25,6 +25,7 @@
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.wso2.carbon.CarbonException;
+import org.wso2.carbon.base.CarbonBaseConstants;
import org.wso2.carbon.base.ServerConfiguration;
import org.wso2.carbon.base.api.ServerConfigurationService;
import org.wso2.carbon.core.RegistryResources;
@@ -55,6 +56,8 @@ public class KeyStoreUtilTest {
public void setUp() throws Exception {
initMocks(this);
+ System.setProperty(CarbonBaseConstants.CARBON_HOME,
+ Paths.get(System.getProperty("user.dir"), "src", "test", "resources").toString());
}
@DataProvider(name = "PrimaryStoreDataProvider")
@@ -166,6 +169,8 @@ public void testReadCustomKeyStoreConfigs(String keyStoreName, String configName
OMElement keyStoreConfigElement = KeyStoreUtil.getCustomKeyStoreConfigElement(keyStoreName, serverConfiguration);
assertEquals(KeyStoreUtil.getCustomKeyStoreConfig(keyStoreConfigElement, configName), expectedValue);
} catch (Exception e) {
+ System.out.println("Exception occurred: " + e.getMessage());
+ e.printStackTrace();
fail();
}
}
diff --git a/core/org.wso2.carbon.registry.core/src/test/java/org/wso2/carbon/registry/core/test/jdbc/CustomQueryTest.java b/core/org.wso2.carbon.registry.core/src/test/java/org/wso2/carbon/registry/core/test/jdbc/CustomQueryTest.java
index c15b758f775..26b52af126f 100644
--- a/core/org.wso2.carbon.registry.core/src/test/java/org/wso2/carbon/registry/core/test/jdbc/CustomQueryTest.java
+++ b/core/org.wso2.carbon.registry.core/src/test/java/org/wso2/carbon/registry/core/test/jdbc/CustomQueryTest.java
@@ -357,10 +357,10 @@ public void test5CustomQueryResultsOrderForResources() throws RegistryException
String[] qPaths = (String[]) qResults.getContent();
- assertEquals("Query result count should be 3", qPaths.length, 3);
- assertEquals("Comment query result is invalid", qPaths[0], "/target/test/resources/rx0");
- assertEquals("Comment query result is invalid", qPaths[1], "/target/test/resources/rx2");
- assertEquals("Comment query result is invalid", qPaths[2], "/target/test/resources/rx1");
+ assertEquals("Query result count should be 3", 3, qPaths.length);
+ assertEquals("Comment query result is invalid", "/target/test/resources/rx0", qPaths[0]);
+ assertEquals("Comment query result is invalid", "/target/test/resources/rx2", qPaths[1]);
+ assertEquals("Comment query result is invalid", "/target/test/resources/rx1", qPaths[2]);
comQuery = rootSystemRegistry.newResource();
sql = "SELECT REG_PATH_ID, REG_NAME FROM REG_RESOURCE R " +
@@ -386,8 +386,8 @@ public void test5CustomQueryResultsOrderForResources() throws RegistryException
}
qPaths = paths.toArray(new String[paths.size()]);
- assertEquals("Comment query result is invalid", qPaths[0], "/target/test/resources/rx0");
- assertEquals("Comment query result is invalid", qPaths[1], "/target/test/resources/rx2");
- assertEquals("Comment query result is invalid", qPaths[2], "/target/test/resources/rx1");
+ assertEquals("Comment query result is invalid", "/target/test/resources/rx0", qPaths[0]);
+ assertEquals("Comment query result is invalid", "/target/test/resources/rx2", qPaths[1]);
+ assertEquals("Comment query result is invalid", "/target/test/resources/rx1", qPaths[2]);
}
}
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializerListener.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializerListener.java
index b68c4ac5887..d5371c0df76 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializerListener.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CustomTilesInitializerListener.java
@@ -6,7 +6,6 @@
import org.apache.tiles.factory.BasicTilesContainerFactory;
import org.apache.tiles.request.ApplicationContext;
import org.apache.tiles.request.servlet.ServletApplicationContext;
-import org.apache.tiles.request.servlet.wildcard.WildcardServletApplicationContext;
import org.apache.tiles.startup.TilesInitializer;
import org.apache.tiles.startup.AbstractTilesInitializer;
import org.apache.tiles.TilesContainer;
diff --git a/distribution/kernel/pom.xml b/distribution/kernel/pom.xml
index d07c6299aac..af808d3dba3 100644
--- a/distribution/kernel/pom.xml
+++ b/distribution/kernel/pom.xml
@@ -169,7 +169,6 @@
org.jvnet.staxex
stax-ex
-
diff --git a/features/org.wso2.carbon.core.runtime.feature/pom.xml b/features/org.wso2.carbon.core.runtime.feature/pom.xml
index 91f45f42c0c..f104acc4628 100644
--- a/features/org.wso2.carbon.core.runtime.feature/pom.xml
+++ b/features/org.wso2.carbon.core.runtime.feature/pom.xml
@@ -211,6 +211,14 @@
org.bouncycastle
bcpg-jdk18on
+
+ org.bouncycastle
+ bcutil-jdk18on
+
+
+ org.bouncycastle
+ bcprov-jdk18on
+
org.eclipse.platform
org.eclipse.equinox.registry
@@ -375,6 +383,8 @@
org.eclipse.platform:org.eclipse.equinox.frameworkadmin.equinox
org.eclipse.platform:org.eclipse.equinox.preferences
org.osgi:org.osgi.service.prefs
+ org.bouncycastle:bcutil-jdk18on
+ org.bouncycastle:bcprov-jdk18on
org.bouncycastle:bcpg-jdk18on
org.eclipse.platform:org.eclipse.equinox.registry
org.eclipse.platform:org.eclipse.equinox.security
diff --git a/features/org.wso2.carbon.core.server.feature/pom.xml b/features/org.wso2.carbon.core.server.feature/pom.xml
index 63664ebbd50..d45b6f1d1e7 100644
--- a/features/org.wso2.carbon.core.server.feature/pom.xml
+++ b/features/org.wso2.carbon.core.server.feature/pom.xml
@@ -76,6 +76,7 @@
org.wso2.orbit.org.apache.poi:poi-ooxml:${orbit.version.poi.ooxml}
+ javax.annotation:javax.annotation-api:${version.javax.annotation.annotation-api}
org.wso2.orbit.io.opentelemetry:opentelemetry-all
com.google.guava:guava
com.google.guava:failureaccess
diff --git a/parent/pom.xml b/parent/pom.xml
index b30dd803624..30200448a26 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -377,7 +377,7 @@
1.4.200
4.0.200.v20120319-0616
- 5.2.50-SNAPSHOT
+ 5.4.12-SNAPSHOT
1.1.16
@@ -412,7 +412,7 @@
1.0-wso2v2
- 1.0.0.wso2v3
+ 1.0.0.wso2v4
1.0.0.wso2v3
[1.0.0.wso2v3, 2)
@@ -588,7 +588,7 @@
1.1.1
2.3.2.wso2v1
1.1.0.wso2v2
- 1.3.2
+ 1.3.2
3.8.0
1.3
1.7.4
@@ -674,6 +674,7 @@
2.2.8
[2.1.0,3.0.0)
+ 1.82
@@ -876,7 +877,19 @@
org.bouncycastle
bcpg-jdk18on
- 1.77
+ 1.82
+
+
+
+ org.bouncycastle
+ bcutil-jdk18on
+ 1.82
+
+
+
+ org.bouncycastle
+ bcprov-jdk18on
+ ${bcprov-jdk18on.version}
org.eclipse.platform
@@ -1090,7 +1103,7 @@
javax.annotation
javax.annotation-api
- ${verion.javax.annotation.annotation-api}
+ ${version.javax.annotation.annotation-api}
org.wso2.orbit.org.apache.geronimo.specs
diff --git a/samples/student-manager/pom.xml b/samples/student-manager/pom.xml
index 4802fee24d9..a140e085239 100644
--- a/samples/student-manager/pom.xml
+++ b/samples/student-manager/pom.xml
@@ -16,7 +16,7 @@
4.10.108-SNAPSHOT
- 5.2.50-SNAPSHOT
+ 5.4.12-SNAPSHOT
2.3.5
1.6.1-wso2v29
From a685976e4c9991b87146bdc0b1b510573bf16ed0 Mon Sep 17 00:00:00 2001
From: Maduranga Siriwardena
Date: Thu, 13 Nov 2025 13:45:29 +0530
Subject: [PATCH 3/5] Add new changes
---
parent/pom.xml | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/parent/pom.xml b/parent/pom.xml
index 30200448a26..f395436e558 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -19,6 +19,43 @@
3.0.0
+
+
+
+ wso2.releases
+ WSO2 Releases Repository
+ https://maven.wso2.org/nexus/content/repositories/releases/
+
+ true
+ daily
+ ignore
+
+
+
+
+ wso2.snapshots
+ WSO2 Snapshot Repository
+ https://maven.wso2.org/nexus/content/repositories/snapshots/
+
+ true
+ never
+
+
+ false
+
+
+
+ wso2-nexus
+ WSO2 internal Repository
+ https://maven.wso2.org/nexus/content/groups/wso2-public/
+
+ true
+ daily
+ ignore
+
+
+
+
From 1b1692c4663c38cb951dd06ee0614e4aaa3e5b2d Mon Sep 17 00:00:00 2001
From: Maduranga Siriwardena
Date: Tue, 9 Dec 2025 11:14:41 +0530
Subject: [PATCH 4/5] Add provided capabilities
---
.../wso2/carbon/ndatasource/core/DataSourceService.java | 8 ++++++++
.../registry/core/secure/AuthorizeRoleListener.java | 8 ++++++++
.../org/wso2/carbon/server/admin/service/ServerAdmin.java | 8 ++++++++
.../java/org/wso2/carbon/ui/CarbonSSOSessionManager.java | 8 ++++++++
.../org/wso2/carbon/user/core/common/DefaultRealm.java | 8 ++++++++
5 files changed, 40 insertions(+)
diff --git a/core/org.wso2.carbon.ndatasource.core/src/main/java/org/wso2/carbon/ndatasource/core/DataSourceService.java b/core/org.wso2.carbon.ndatasource.core/src/main/java/org/wso2/carbon/ndatasource/core/DataSourceService.java
index 2ec5ac60802..31ec0719bae 100644
--- a/core/org.wso2.carbon.ndatasource.core/src/main/java/org/wso2/carbon/ndatasource/core/DataSourceService.java
+++ b/core/org.wso2.carbon.ndatasource.core/src/main/java/org/wso2/carbon/ndatasource/core/DataSourceService.java
@@ -18,11 +18,19 @@
import java.util.ArrayList;
import java.util.List;
+import org.osgi.annotation.bundle.Capability;
import org.wso2.carbon.ndatasource.common.DataSourceException;
/**
* This class represents the data source OSGi service.
*/
+@Capability(
+ namespace = "osgi.service",
+ attribute = {
+ "objectClass=org.wso2.carbon.ndatasource.core.DataSourceService",
+ "service.scope=singleton"
+ }
+)
public class DataSourceService {
public List getAllDataSources() throws DataSourceException {
diff --git a/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/secure/AuthorizeRoleListener.java b/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/secure/AuthorizeRoleListener.java
index 03c934118e4..cdb6a415f55 100644
--- a/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/secure/AuthorizeRoleListener.java
+++ b/core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/secure/AuthorizeRoleListener.java
@@ -20,6 +20,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.osgi.annotation.bundle.Capability;
import org.wso2.carbon.registry.core.ActionConstants;
import org.wso2.carbon.registry.core.config.RegistryContext;
import org.wso2.carbon.registry.core.utils.RegistryUtils;
@@ -37,6 +38,13 @@
* permissions to registry resource permissions and thereby manage accessibility to various resource
* paths based on the amount of permissions available to a given role.
*/
+@Capability(
+ namespace = "osgi.service",
+ attribute = {
+ "objectClass=org.wso2.carbon.user.core.listener.AuthorizationManagerListener",
+ "service.scope=singleton"
+ }
+)
public class AuthorizeRoleListener extends AbstractAuthorizationManagerListener
implements AuthorizationManagerListener {
diff --git a/core/org.wso2.carbon.server.admin/src/main/java/org/wso2/carbon/server/admin/service/ServerAdmin.java b/core/org.wso2.carbon.server.admin/src/main/java/org/wso2/carbon/server/admin/service/ServerAdmin.java
index 3c07b2b46b8..cd0a9e6e13d 100644
--- a/core/org.wso2.carbon.server.admin/src/main/java/org/wso2/carbon/server/admin/service/ServerAdmin.java
+++ b/core/org.wso2.carbon.server.admin/src/main/java/org/wso2/carbon/server/admin/service/ServerAdmin.java
@@ -24,6 +24,7 @@
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.osgi.annotation.bundle.Capability;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.base.ServerConfiguration;
import org.wso2.carbon.base.api.ServerConfigurationService;
@@ -55,6 +56,13 @@
/**
* Admin service to manage server related operations
*/
+@Capability(
+ namespace = "osgi.service",
+ attribute = {
+ "objectClass=org.wso2.carbon.server.admin.common.IServerAdmin",
+ "service.scope=singleton"
+ }
+)
public class ServerAdmin extends AbstractAdmin implements ServerAdminMBean, IServerAdmin {
private static final Log log = LogFactory.getLog(ServerAdmin.class);
private static final int SECONDS_PER_DAY = 3600 * 24;
diff --git a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSSOSessionManager.java b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSSOSessionManager.java
index 3ab2212678d..554775bea92 100644
--- a/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSSOSessionManager.java
+++ b/core/org.wso2.carbon.ui/src/main/java/org/wso2/carbon/ui/CarbonSSOSessionManager.java
@@ -19,6 +19,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.osgi.annotation.bundle.Capability;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -41,6 +42,13 @@
* This class maintains two maps to maintain valid sessions and invalid sessions. This class is
* implemented as a singleton because there should be only one SSOSessionManager per instance.
*/
+@Capability(
+ namespace = "osgi.service",
+ attribute = {
+ "objectClass=org.wso2.carbon.ui.CarbonSSOSessionManager",
+ "service.scope=singleton"
+ }
+)
public class CarbonSSOSessionManager {
private static Log log = LogFactory.getLog(CarbonSSOSessionManager.class);
diff --git a/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/DefaultRealm.java b/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/DefaultRealm.java
index cb5859ae6d2..1d9bb7f92f6 100644
--- a/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/DefaultRealm.java
+++ b/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/common/DefaultRealm.java
@@ -19,6 +19,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.osgi.annotation.bundle.Capability;
import org.wso2.carbon.caching.impl.CachingConstants;
import org.wso2.carbon.caching.impl.Util;
import org.wso2.carbon.user.api.RealmConfiguration;
@@ -51,6 +52,13 @@
import static org.wso2.carbon.user.core.constants.UserCoreErrorConstants.ErrorMessages.ERROR_CODE_DUPLICATE_ERROR_WHILE_ADDING_CLAIM_MAPPINGS;
+@Capability(
+ namespace = "osgi.service",
+ attribute = {
+ "objectClass=org.wso2.carbon.user.core.UserRealm",
+ "service.scope=singleton"
+ }
+)
public class DefaultRealm implements UserRealm {
private static Log log = LogFactory.getLog(DefaultRealm.class);
From a5924973b43ce2c1044861454e9ef29bcfe66d79 Mon Sep 17 00:00:00 2001
From: Maduranga Siriwardena
Date: Mon, 22 Dec 2025 13:13:42 +0530
Subject: [PATCH 5/5] Add changes required to the product build
---
core/org.wso2.carbon.base/pom.xml | 2 +-
core/org.wso2.carbon.core.common/pom.xml | 2 +-
core/org.wso2.carbon.core/pom.xml | 1 +
.../core/internal/CarbonCoreActivator.java | 52 +++++++++----------
.../wso2/carbon/core/util/SignatureUtil.java | 7 ++-
core/org.wso2.carbon.registry.core/pom.xml | 2 +-
.../pom.xml | 5 --
.../pom.xml | 3 --
.../pom.xml | 1 +
parent/pom.xml | 16 +-----
10 files changed, 36 insertions(+), 55 deletions(-)
diff --git a/core/org.wso2.carbon.base/pom.xml b/core/org.wso2.carbon.base/pom.xml
index d9e6036e3f5..429cae6d84b 100644
--- a/core/org.wso2.carbon.base/pom.xml
+++ b/core/org.wso2.carbon.base/pom.xml
@@ -47,7 +47,7 @@
org.wso2.carbon.base.*; version="1.0.0"
- javax.activation.*;version="[1.0.0, 2.0.0)",
+ javax.activation.*;version="[0.0.0, 1.0.0)";resolution:=optional,
javax.servlet; version="${imp.pkg.version.javax.servlet}",
javax.servlet.http; version="${imp.pkg.version.javax.servlet}",
org.wso2.securevault.*,
diff --git a/core/org.wso2.carbon.core.common/pom.xml b/core/org.wso2.carbon.core.common/pom.xml
index 378288ad7ec..2eb0b5d336b 100644
--- a/core/org.wso2.carbon.core.common/pom.xml
+++ b/core/org.wso2.carbon.core.common/pom.xml
@@ -57,7 +57,7 @@
!org.wso2.carbon.core.common.*,
- javax.activation.*;version="[1.0.0, 2.0.0)"
+ javax.activation.*;version="[0.0.0, 1.0.0)";resolution:=optional
diff --git a/core/org.wso2.carbon.core/pom.xml b/core/org.wso2.carbon.core/pom.xml
index 3fcfe369e42..f16167c20d6 100644
--- a/core/org.wso2.carbon.core/pom.xml
+++ b/core/org.wso2.carbon.core/pom.xml
@@ -262,6 +262,7 @@
javax.xml.stream.*; version=1.0.1,
org.wso2.carbon.registry.core.service,
org.wso2.carbon.user.core.*; version=0.0.0,
+ org.bouncycastle.jcajce.*; version="${imp.pkg.version.bcp}"; resolution:=optional,
org.bouncycastle.*; version="${imp.pkg.version.bcp}",
*;resolution:=optional
diff --git a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreActivator.java b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreActivator.java
index 2bc5bafb55d..eb07fb790f7 100644
--- a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreActivator.java
+++ b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/internal/CarbonCoreActivator.java
@@ -73,32 +73,32 @@ public void start(BundleContext context) throws Exception {
System.getProperty("user.language") + "-" + System.getProperty("user.country") +
", " + System.getProperty("user.timezone"));
-// String providerName = ServerConfiguration.getInstance().getFirstProperty(ServerConstants.JCE_PROVIDER);
-// Provider provider;
-// if (StringUtils.isBlank(providerName) || providerName.equals(ServerConstants.JCE_PROVIDER_BC)) {
-// provider = (Provider) (Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider")).
-// getDeclaredConstructor().newInstance();
-//
-// // Add BouncyCastle JSSE provider and preferred named groups for outbound communication.
-// String jsseProviderName = ServerConfiguration.getInstance().getFirstProperty(ServerConstants.JSSE_PROVIDER);
-// if (ServerConstants.JSSE_PROVIDER_BC.equals(jsseProviderName)) {
-// Provider jsseProvider = (Provider)
-// (Class.forName("org.bouncycastle.jsse.provider.BouncyCastleJsseProvider")).
-// getDeclaredConstructor().newInstance();
-// Security.insertProviderAt(jsseProvider, 1);
-// }
-//
-// } else if (providerName.equals(ServerConstants.JCE_PROVIDER_BCFIPS)) {
-// provider = (Provider) (Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider")).
-// getDeclaredConstructor().newInstance();
-//
-// } else {
-// throw new NoSuchProviderException("Configured JCE provider is not supported.");
-// }
-// Security.addProvider(provider);
-// if (log.isDebugEnabled()) {
-// log.debug(providerName + " security provider is successfully registered in JVM.");
-// }
+ String providerName = ServerConfiguration.getInstance().getFirstProperty(ServerConstants.JCE_PROVIDER);
+ Provider provider;
+ if (StringUtils.isBlank(providerName) || providerName.equals(ServerConstants.JCE_PROVIDER_BC)) {
+ provider = (Provider) (Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider")).
+ getDeclaredConstructor().newInstance();
+
+ // Add BouncyCastle JSSE provider and preferred named groups for outbound communication.
+ String jsseProviderName = ServerConfiguration.getInstance().getFirstProperty(ServerConstants.JSSE_PROVIDER);
+ if (ServerConstants.JSSE_PROVIDER_BC.equals(jsseProviderName)) {
+ Provider jsseProvider = (Provider)
+ (Class.forName("org.bouncycastle.jsse.provider.BouncyCastleJsseProvider")).
+ getDeclaredConstructor().newInstance();
+ Security.insertProviderAt(jsseProvider, 1);
+ }
+
+ } else if (providerName.equals(ServerConstants.JCE_PROVIDER_BCFIPS)) {
+ provider = (Provider) (Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider")).
+ getDeclaredConstructor().newInstance();
+
+ } else {
+ throw new NoSuchProviderException("Configured JCE provider is not supported.");
+ }
+ Security.addProvider(provider);
+ if (log.isDebugEnabled()) {
+ log.debug(providerName + " security provider is successfully registered in JVM.");
+ }
}
public void stop(BundleContext context) throws Exception {
diff --git a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/util/SignatureUtil.java b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/util/SignatureUtil.java
index 0e2ba86f754..71116381835 100644
--- a/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/util/SignatureUtil.java
+++ b/core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/util/SignatureUtil.java
@@ -53,10 +53,9 @@ public static void init() throws Exception {
provider = (Provider) (Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider")).
getDeclaredConstructor().newInstance();
- //TODO check why this is not working
-// } else if (providerName.equals(ServerConstants.JCE_PROVIDER_BCFIPS)) {
-// provider = (Provider) (Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider")).
-// getDeclaredConstructor().newInstance();
+ } else if (providerName.equals(ServerConstants.JCE_PROVIDER_BCFIPS)) {
+ provider = (Provider) (Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider")).
+ getDeclaredConstructor().newInstance();
} else {
throw new NoSuchProviderException("Configured JCE provider is not supported.");
diff --git a/core/org.wso2.carbon.registry.core/pom.xml b/core/org.wso2.carbon.registry.core/pom.xml
index d67cde84804..ad1c910f446 100644
--- a/core/org.wso2.carbon.registry.core/pom.xml
+++ b/core/org.wso2.carbon.registry.core/pom.xml
@@ -54,7 +54,7 @@
org.wso2.carbon.user.*,
org.wso2.carbon.utils.*,
!javax.xml.namespace,
- javax.activation.*;version="[1.0.0, 2.0.0)",
+ javax.activation.*;version="[0.0.0, 1.0.0)";resolution:=optional,
org.apache.abdera.*; version="${imp.pkg.version.abdera}",
javax.xml.namespace; version=0.0.0,
javax.servlet; version="${imp.pkg.version.javax.servlet}",
diff --git a/features/org.wso2.carbon.core.common.feature/pom.xml b/features/org.wso2.carbon.core.common.feature/pom.xml
index 1d47e1acda0..31163dc891e 100644
--- a/features/org.wso2.carbon.core.common.feature/pom.xml
+++ b/features/org.wso2.carbon.core.common.feature/pom.xml
@@ -168,11 +168,6 @@
org.wso2.carbon.crypto:org.wso2.carbon.crypto.provider:${carbon.crypto.version}
org.wso2.orbit.sun.xml.bind:jaxb:${version.org.wso2.orbit.javax.xml.bind.jaxb}
-
- org.wso2.orbit.javax.activation:activation:1.1.1.wso2v4
-
-
- javax.xml.soap:javax.xml.soap-api:1.4.0
diff --git a/features/org.wso2.carbon.core.runtime.feature/pom.xml b/features/org.wso2.carbon.core.runtime.feature/pom.xml
index f104acc4628..01ea21fb9b2 100644
--- a/features/org.wso2.carbon.core.runtime.feature/pom.xml
+++ b/features/org.wso2.carbon.core.runtime.feature/pom.xml
@@ -383,9 +383,6 @@
org.eclipse.platform:org.eclipse.equinox.frameworkadmin.equinox
org.eclipse.platform:org.eclipse.equinox.preferences
org.osgi:org.osgi.service.prefs
- org.bouncycastle:bcutil-jdk18on
- org.bouncycastle:bcprov-jdk18on
- org.bouncycastle:bcpg-jdk18on
org.eclipse.platform:org.eclipse.equinox.registry
org.eclipse.platform:org.eclipse.equinox.security
org.eclipse.platform:org.eclipse.equinox.simpleconfigurator.manipulator
diff --git a/features/org.wso2.carbon.core.server.feature/pom.xml b/features/org.wso2.carbon.core.server.feature/pom.xml
index d45b6f1d1e7..440a1d68093 100644
--- a/features/org.wso2.carbon.core.server.feature/pom.xml
+++ b/features/org.wso2.carbon.core.server.feature/pom.xml
@@ -74,6 +74,7 @@
org.wso2.orbit.org.bouncycastle:bctls-jdk18on:${bouncycastle.version}
+ org.wso2.orbit.org.bouncycastle:bcpg-jdk18on:${bouncycastle.version}
org.wso2.orbit.org.apache.poi:poi-ooxml:${orbit.version.poi.ooxml}
javax.annotation:javax.annotation-api:${version.javax.annotation.annotation-api}
diff --git a/parent/pom.xml b/parent/pom.xml
index f395436e558..179580b3c4e 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -479,10 +479,8 @@
[2.0.4.wso2v4, 3.0.0)
- 1.2.11-wso2v28
+ 1.2.11-wso2v31-SNAPSHOT
[1.2.11, 1.3.0)
- 1.2.11-wso2v28
- 1.2.11-wso2v28
[1.2.11, 1.3.0)
1.10.0.wso2v2
3.18.0.wso2v1
@@ -546,7 +544,7 @@
3.2.5.ga-wso2v1
- 1.81.0.wso2v1
+ 1.83.0.wso2v1
[1.0.0, 2.0.0)
@@ -2135,16 +2133,6 @@
org.wso2.carbon.database.utils
${org.wso2.carbon.database.utils.version}
-
- org.wso2.orbit.javax.activation
- activation
- 1.1.1.wso2v4
-
-
- javax.xml.soap
- javax.xml.soap-api
- 1.4.0
-