Re: [Dev] Kernel commit to patch0006

2014-04-14 Thread Manoj Kumara
Hi,

Applied to patch0007 with r200386.

Thanks,
Manoj


*Manoj Kumara*
Software Engineer
WSO2 Inc. http://wso2.com/
*lean.enterprise.middleware*
Mobile: +94713448188


On Fri, Apr 11, 2014 at 7:43 PM, Chamath Gunawardana chama...@wso2.comwrote:

 Hi Manoj,

 I have attached a new patch to the JIRA. Please commit this to patch0006


 On Thu, Apr 10, 2014 at 11:58 PM, Manoj Kumara ma...@wso2.com wrote:

 HI Chamath,

 I have put a comment on the ticket about slight modification about the
 patch. Please update with latest diff

 Thanks,
 Manoj


 *Manoj Kumara*
 Software Engineer
 WSO2 Inc. http://wso2.com/
 *lean.enterprise.middleware*
 Mobile: +94713448188


 On Thu, Apr 10, 2014 at 5:19 PM, Chamath Gunawardana 
 chama...@wso2.comwrote:

 Hi Kernel team,

 Please apply the patch attached to jira [1]. This fix is for
 org.wso2.carbon.ui and org.wso2.carbon.utils.

 [1] - https://wso2.org/jira/browse/IDENTITY-2138


 --
 Thanks,
 Best Regards,
 Chamath Gunawardana
 Technical Lead; WSO2 Inc.
 Mobile : +94776322240





 --
 Thanks,
 Best Regards,
 Chamath Gunawardana
 Technical Lead; WSO2 Inc.
 Mobile : +94776322240

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Kernel commit to patch0006

2014-04-11 Thread Chamath Gunawardana
Hi Manoj,

I have attached a new patch to the JIRA. Please commit this to patch0006


On Thu, Apr 10, 2014 at 11:58 PM, Manoj Kumara ma...@wso2.com wrote:

 HI Chamath,

 I have put a comment on the ticket about slight modification about the
 patch. Please update with latest diff

 Thanks,
 Manoj


 *Manoj Kumara*
 Software Engineer
 WSO2 Inc. http://wso2.com/
 *lean.enterprise.middleware*
 Mobile: +94713448188


 On Thu, Apr 10, 2014 at 5:19 PM, Chamath Gunawardana chama...@wso2.comwrote:

 Hi Kernel team,

 Please apply the patch attached to jira [1]. This fix is for
 org.wso2.carbon.ui and org.wso2.carbon.utils.

 [1] - https://wso2.org/jira/browse/IDENTITY-2138


 --
 Thanks,
 Best Regards,
 Chamath Gunawardana
 Technical Lead; WSO2 Inc.
 Mobile : +94776322240





-- 
Thanks,
Best Regards,
Chamath Gunawardana
Technical Lead; WSO2 Inc.
Mobile : +94776322240
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Kernel commit to patch0006

2014-04-10 Thread Chamath Gunawardana
Hi Kernel team,

Please apply the patch attached to jira [1]. This fix is for
org.wso2.carbon.ui and org.wso2.carbon.utils.

[1] - https://wso2.org/jira/browse/IDENTITY-2138


-- 
Thanks,
Best Regards,
Chamath Gunawardana
Technical Lead; WSO2 Inc.
Mobile : +94776322240
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Kernel commit to patch0006

2014-04-10 Thread Manoj Kumara
HI Chamath,

I have put a comment on the ticket about slight modification about the
patch. Please update with latest diff

Thanks,
Manoj


*Manoj Kumara*
Software Engineer
WSO2 Inc. http://wso2.com/
*lean.enterprise.middleware*
Mobile: +94713448188


On Thu, Apr 10, 2014 at 5:19 PM, Chamath Gunawardana chama...@wso2.comwrote:

 Hi Kernel team,

 Please apply the patch attached to jira [1]. This fix is for
 org.wso2.carbon.ui and org.wso2.carbon.utils.

 [1] - https://wso2.org/jira/browse/IDENTITY-2138


 --
 Thanks,
 Best Regards,
 Chamath Gunawardana
 Technical Lead; WSO2 Inc.
 Mobile : +94776322240

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Kernel commit to patch0006

2014-04-03 Thread Asanka Sanjeewa
Hi Manoj,

Please apply the here attached patch for issue [1] as a temporary fix until
this is properly fixed in next kernel release. The patch location is
'core/org.wso2.carbon.application.deployer/4.2.0'

[1] https://wso2.org/jira/browse/CARBON-14743

Thanks and Regards,
AsankaS.

-- 
*Asanka Sanjeewa*
Senior Software Engineer
Mobile: +94772532924
WSO2 Inc. http://wso2.com/
Blog: http://asanka-tech-blog.blogspot.com/
Index: 
src/main/java/org/wso2/carbon/application/deployer/handler/DefaultAppDeployer.java
===
--- 
src/main/java/org/wso2/carbon/application/deployer/handler/DefaultAppDeployer.java
  (revision 198954)
+++ 
src/main/java/org/wso2/carbon/application/deployer/handler/DefaultAppDeployer.java
  (working copy)
@@ -17,11 +17,16 @@
 */
 package org.wso2.carbon.application.deployer.handler;
 
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.util.StAXUtils;
 import org.apache.axis2.deployment.Deployer;
 import org.apache.axis2.deployment.DeploymentEngine;
 import org.apache.axis2.deployment.DeploymentException;
 import org.apache.axis2.deployment.repository.util.DeploymentFileData;
 import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.osgi.framework.Bundle;
@@ -32,12 +37,17 @@
 import org.wso2.carbon.application.deployer.config.Artifact;
 import org.wso2.carbon.application.deployer.config.CappFile;
 import 
org.wso2.carbon.application.deployer.internal.AppDeployerServiceComponent;
+import org.wso2.carbon.utils.CarbonUtils;
 import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
 
 import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.List;
 import java.util.Map;
 
+import javax.xml.namespace.QName;
+
 /**
  * This is one of the default handlers which is registered into the 
ApplicationManager. This
  * class deploys AAR services, JAXWS services, Data services and libs.
@@ -196,7 +206,10 @@
  */
 installBundle(artifactPath);
 artifact.setRuntimeObjectName(fileName);
-}
+   } else if 
(SERVICE_META_TYPE.equals(artifact.getType())) {
+   // Copy service meta artifact into 
'servicemetafiles' directory
+   deployServiceMetaArtifact(artifactPath, 
fileName, axisConfig);
+   }
 // deploy the dependencies of the current artifact
 deployRecursively(artifact.getDependencies(), axisConfig);
 }
@@ -302,5 +315,62 @@
 }
 return deployer;
 }
+
+/**
+ * Copy service meta artifacts into SERVICE_META_DIR.
+ * @param artifactPath
+ * @param fileName
+ * @param axisConfig
+ * @throws DeploymentException
+ */
+   private void deployServiceMetaArtifact(String artifactPath, String 
fileName,
+   AxisConfiguration axisConfig) throws 
DeploymentException {
+   if (!CarbonUtils.isWorkerNode()) {
+   String repo = axisConfig.getRepository().getPath();
+   String destinationPath = repo + SERVICE_META_DIR;
+   File artifactFile = new File(artifactPath);
+   InputStream in = null;
 
+   try {
+   in = FileUtils.openInputStream(artifactFile);
+
+   OMElement element = new 
StAXOMBuilder(StAXUtils.createXMLStreamReader(in))
+   .getDocumentElement();
+   OMAttribute nameAttribute = 
element.getAttribute(new QName(name));
+   if (nameAttribute != null) {
+   String serviceGroupName = 
nameAttribute.getAttributeValue();
+   if (serviceGroupName != null  
!serviceGroupName.equals()) {
+   File destinationFileName = new 
File(destinationPath + File.separator
+   + 
serviceGroupName + .xml);
+   
artifactFile.renameTo(destinationFileName);
+   log.info(Service meta named  
+ serviceGroupName + .xml
+   +  has been 
deployed from  + artifactPath);
+   } else {
+   String msg = Deployment of 
service meta artifact failed. serviceGroup name is empty in 
+   + fileName;
+  

Re: [Dev] Kernel commit to patch0006

2014-04-03 Thread Manoj Kumara
HI,

Applied to patch0006 with r199500.

Thanks,
Manoj


*Manoj Kumara*
Software Engineer
WSO2 Inc. http://wso2.com/
*lean.enterprise.middleware*
Mobile: +94713448188


On Thu, Apr 3, 2014 at 3:39 PM, Asanka Sanjeewa asan...@wso2.com wrote:

 Hi Manoj,

 Please apply the here attached patch for issue [1] as a temporary fix
 until this is properly fixed in next kernel release. The patch location is
 'core/org.wso2.carbon.application.deployer/4.2.0'

 [1] https://wso2.org/jira/browse/CARBON-14743

 Thanks and Regards,
 AsankaS.

 --
 *Asanka Sanjeewa*
 Senior Software Engineer
 Mobile: +94772532924
 WSO2 Inc. http://wso2.com/
 Blog: http://asanka-tech-blog.blogspot.com/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Kernel commit to patch0006

2014-04-03 Thread Asanka Sanjeewa
Thanks Manoj.

Regards,
AsankaS.


On Thu, Apr 3, 2014 at 5:52 PM, Manoj Kumara ma...@wso2.com wrote:

 HI,

 Applied to patch0006 with r199500.

 Thanks,
 Manoj


 *Manoj Kumara*
 Software Engineer
 WSO2 Inc. http://wso2.com/
 *lean.enterprise.middleware*
 Mobile: +94713448188


 On Thu, Apr 3, 2014 at 3:39 PM, Asanka Sanjeewa asan...@wso2.com wrote:

 Hi Manoj,

 Please apply the here attached patch for issue [1] as a temporary fix
 until this is properly fixed in next kernel release. The patch location is
 'core/org.wso2.carbon.application.deployer/4.2.0'

 [1] https://wso2.org/jira/browse/CARBON-14743

 Thanks and Regards,
 AsankaS.

 --
 *Asanka Sanjeewa*
 Senior Software Engineer
 Mobile: +94772532924
 WSO2 Inc. http://wso2.com/
 Blog: http://asanka-tech-blog.blogspot.com/





-- 
*Asanka Sanjeewa*
Senior Software Engineer
Mobile: +94772532924
WSO2 Inc. http://wso2.com/
Blog: http://asanka-tech-blog.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Kernel commit for patch0006

2014-04-02 Thread Chamath Gunawardana
Hi,

Please commit the patch attached to [1] . Sent a pull request for the git
kernel dev repo [2].

[1] - https://wso2.org/jira/browse/IDENTITY-2053
[2] - https://github.com/wso2-dev/carbon4-kernel/pull/15

-- 
Thanks,
Best Regards,
Chamath Gunawardana
Technical Lead; WSO2 Inc.
Mobile : +94776322240
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Kernel commit for patch0006

2014-03-13 Thread Darshana Gunawardana
Hi Kernel team,

Can you please commit patch in [1] to fix caching issue in user.core.

[1] https://wso2.org/jira/browse/IDENTITY-2056

Thanks,


-- 
Regards,


*Darshana Gunawardana*Software Engineer
WSO2 Inc.; http://wso2.com

*E-mail: darsh...@wso2.com darsh...@wso2.com *
*Mobile: +94718566859*Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Kernel commit for patch0006

2014-03-13 Thread Manoj Kumara
Hi,

Committed to patch0006 with 198259. Please merge these changes to git dev
repo [1]

[1] https://github.com/wso2-dev/carbon4-kernel

Thanks,
Manoj


*Manoj Kumara*
Software Engineer
WSO2 Inc. http://wso2.com/
*lean.enterprise.middleware*
Mobile: +94713448188


On Thu, Mar 13, 2014 at 3:35 PM, Darshana Gunawardana darsh...@wso2.comwrote:

 Hi Kernel team,

 Can you please commit patch in [1] to fix caching issue in user.core.

 [1] https://wso2.org/jira/browse/IDENTITY-2056

 Thanks,


 --
 Regards,


 *Darshana Gunawardana*Software Engineer
 WSO2 Inc.; http://wso2.com

 *E-mail: darsh...@wso2.com darsh...@wso2.com *
 *Mobile: +94718566859 %2B94718566859*Lean . Enterprise . Middleware

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Kernel commit for patch0006

2014-03-13 Thread Darshana Gunawardana
Thank manoj.

For the git repo, sent a pull request [1].

[1 ]https://github.com/wso2-dev/carbon4-kernel/pull/5


On Thu, Mar 13, 2014 at 4:22 PM, Manoj Kumara ma...@wso2.com wrote:

 Hi,

 Committed to patch0006 with 198259. Please merge these changes to git dev
 repo [1]

 [1] https://github.com/wso2-dev/carbon4-kernel

 Thanks,
 Manoj


 *Manoj Kumara*
 Software Engineer
 WSO2 Inc. http://wso2.com/
 *lean.enterprise.middleware*
 Mobile: +94713448188


 On Thu, Mar 13, 2014 at 3:35 PM, Darshana Gunawardana 
 darsh...@wso2.comwrote:

 Hi Kernel team,

 Can you please commit patch in [1] to fix caching issue in user.core.

 [1] https://wso2.org/jira/browse/IDENTITY-2056

 Thanks,


 --
 Regards,


 *Darshana Gunawardana*Software Engineer
 WSO2 Inc.; http://wso2.com

 *E-mail: darsh...@wso2.com darsh...@wso2.com *
 *Mobile: +94718566859 %2B94718566859*Lean . Enterprise . Middleware





-- 
Regards,


*Darshana Gunawardana *Software Engineer
WSO2 Inc.; http://wso2.com

* E-mail: darsh...@wso2.com darsh...@wso2.com*
*Mobile: +94718566859*Lean . Enterprise . Middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev