Re: [Carbon-dev] [Architecture] Status of JavaScript Appdev Project

2011-11-04 Thread Ruchira Wageesha

 OK so any code outside these functions will get run at the point the code
 is loaded. Do we give any guarantees about that - for example, how often do
 we load that code? Under what conditions do we unload etc.?

 Maybe for starters we should say that there must not be any code outside
 of these functions and if you put anything there and it does something that
 your problem/luck and that we do not guarantee how that will hold up in the
 future.


At the moment, it doesn't use Rhino's compiled scripts. What it does is
just load the script when a request needs to be served. So, for the best
performance, we have to use compiled scripts.

Currently, the problem of global variable access is there. We need to find
the best solution for it.

Anyway, a compiled script is executed on a given scope. i.e. We need to
pass a toplevel scope into the compiled script when we execute it. So, we
will have to keep a per *.jss scope object in the memory in order to keep
those globally defined variable values.

Again, scope objects in Rhino implement java.io.Serializable interface. So
we can serialize the per *.jss scope and load when ever needed.

regards,
Ruchira
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


[Carbon-dev] G-Reg broken in Trunk

2011-11-04 Thread Harshana Martin
Hi,

See the issues below. Someone from G-Reg team please make sure to fix these.

[ERROR]   The project
org.wso2.governance:org.wso2.carbon.governance.samples.lcm:4.0.0-SNAPSHOT
(/home/harshana/carbonTrunk/products/greg/modules/samples/product/distributed-LCM/src/org.wso2.carbon.governance.samples.lcm/pom.xml)
has 8 errors
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.user.core:jar is missing. @ line 73, column
21
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.logging:jar is missing. @ line 77, column 21
[ERROR] 'dependencies.dependency.version' for
org.apache.ws.commons.axiom:axiom-api:jar is missing. @ line 81, column 21
[ERROR] 'dependencies.dependency.version' for
org.apache.ws.commons.axiom:axiom-impl:jar is missing. @ line 85, column 21
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.registry.extensions:jar is missing. @ line
89, column 21
[ERROR] 'dependencies.dependency.version' for rhino.wso2:js:jar is
missing. @ line 93, column 21
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.mashup.utils:jar is missing. @ line 97,
column 15
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.mashup.javascript.hostobjects.registry:jar
is missing. @ line 101, column 15
[ERROR]
[ERROR]   The project
org.wso2.governance:org.wso2.carbon.governance.samples.lcm.notifications:4.0.0-SNAPSHOT
(/home/harshana/carbonTrunk/products/greg/modules/samples/product/distributed-LCM/src/org.wso2.carbon.governance.samples.lcm.notifications/pom.xml)
has 2 errors
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.logging:jar is missing. @ line 71, column 21
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.registry.extensions:jar is missing. @ line
79, column 21
[ERROR]
[ERROR]   The project
org.wso2.governance:org.wso2.carbon.registry.samples.custom.topics:4.0.0-SNAPSHOT
(/home/harshana/carbonTrunk/products/greg/modules/samples/product/custom-ui/src/org.wso2.carbon.registry.samples.custom.topics/pom.xml)
has 5 errors
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.logging:jar is missing. @ line 110, column
21
[ERROR] 'dependencies.dependency.version' for
commons-beanutils:commons-beanutils:jar is missing. @ line 114, column 21
[ERROR] 'dependencies.dependency.version' for
commons-collections:commons-collections:jar is missing. @ line 118, column
21
[ERROR] 'dependencies.dependency.version' for
commons-digester:commons-digester:jar is missing. @ line 122, column 21
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.registry.samples.custom.topics.stub:jar is
missing. @ line 126, column 21
[ERROR]
[ERROR]   The project
org.wso2.governance:org.wso2.carbon.registry.samples.custom.topics.ui:4.0.0-SNAPSHOT
(/home/harshana/carbonTrunk/products/greg/modules/samples/product/custom-ui/src/org.wso2.carbon.registry.samples.custom.topics.ui/pom.xml)
has 5 errors
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.logging:jar is missing. @ line 111, column
21
[ERROR] 'dependencies.dependency.version' for
commons-beanutils:commons-beanutils:jar is missing. @ line 115, column 21
[ERROR] 'dependencies.dependency.version' for
commons-collections:commons-collections:jar is missing. @ line 119, column
21
[ERROR] 'dependencies.dependency.version' for
commons-digester:commons-digester:jar is missing. @ line 123, column 21
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.registry.samples.custom.topics.stub:jar is
missing. @ line 143, column 15
[ERROR]
[ERROR]   The project
org.wso2.governance:org.wso2.carbon.registry.samples.handler:4.0.0-SNAPSHOT
(/home/harshana/carbonTrunk/products/greg/modules/samples/product/handler/src/pom.xml)
has 22 errors
[ERROR] 'dependencies.dependency.version' for junit:junit:jar is
missing. @ line 169, column 21
[ERROR] 'dependencies.dependency.version' for
commons-dbcp:commons-dbcp:jar is missing. @ line 174, column 21
[ERROR] 'dependencies.dependency.version' for
org.wso2.carbon:org.wso2.carbon.logging:jar is missing. @ line 178, column
21
[ERROR] 'dependencies.dependency.version' for javax.mail:mail:jar is
missing. @ line 182, column 21
[ERROR] 'dependencies.dependency.version' for
javax.activation:activation:jar is missing. @ line 186, column 21
[ERROR] 'dependencies.dependency.version' for
commons-fileupload:commons-fileupload:jar is missing. @ line 190, column 21
[ERROR] 'dependencies.dependency.version' for
commons-httpclient:commons-httpclient:jar is missing. @ line 194, column 21
[ERROR] 'dependencies.dependency.version' for
org.apache.ws.commons.axiom:axiom-api:jar is missing. @ line 198, column 21
[ERROR] 'dependencies.dependency.version' for
org.apache.ws.commons.axiom:axiom-impl:jar is 

[Carbon-dev] Update Attribute on WSDL fails

2011-11-04 Thread David Carver
After adding a WSDL, and then retrieving it for update, the resetting an 
attribute does not.  Test code similar to the following can be used to 
reproduce the issue.  We are using a RemoteRegistry implementation 
talking to WSO2 Gov Reg 4.1.0.


   @Test
   public void testCreateUpdateWSDL() throws Exception {

  WsdlManager wm = new WsdlManager(registry);
  Wsdl wsdl = wm.newWsdl(
   
loadFile(src/main/resources/META-INF/soa/services/wsdl/CreateServiceTest/CreateServiceTest.wsdl),

   Example.wsdl);
  wsdl.setAttribute(AssetConstants.TURMERIC_NAME, Wsdl Name);
  assertNotNull(wsdl);
  wm.addWsdl(wsdl);
  String id = wsdl.getId();

  GovernanceArtifact artifact = 
GovernanceUtils.retrieveGovernanceArtifactById(registry, id);

  assertNotNull(Unable to find wsdl, artifact);

  wsdl = wm.getWsdl(id);
  wsdl.setAttribute(AssetConstants.TURMERIC_NAME, Wsdl New Name);
  wm.addWsdl(wsdl);

  artifact = 
GovernanceUtils.retrieveGovernanceArtifactById(registry, id);

  assertNotNull(Unable to find wsdl after update, artifact);
  assertEquals(oops..did not update wsdl, Wsdl New Name, 
artifact.getAttribute(AssetConstants.TURMERIC_NAME));


   }

The expected value should be Wsdl New Name.   It seems to be 
retreiving the old name.   A service test as follows works correctly:


   @Test
   public void testCreateUpdateService() throws Exception {

  ServiceManager sm = new ServiceManager(RSProviderUtil.getRegistry());
  Service service = sm.newService(new 
QName(http://www.example.org;, Example));


  service.setAttribute(AssetConstants.TURMERIC_NAME, Example 
Service);

  sm.addService(service);
  String assetId = service.getId();

  GovernanceArtifact artifact = 
GovernanceUtils.retrieveGovernanceArtifactById(registry, service.getId());

  assertNotNull(artifact);
  assertEquals(Example Service, 
artifact.getAttribute(AssetConstants.TURMERIC_NAME));


  service = sm.getService(assetId);
  assertNotNull(Missing service., service);
  service.setAttribute(AssetConstants.TURMERIC_NAME, New Name);
  sm.addService(service);

  service = sm.getService(assetId);
  assertEquals(Service Name attribute did not update., New Name,
   service.getAttribute(AssetConstants.TURMERIC_NAME));
   }

Dave

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


[Carbon-dev] [GS] Disabling add/remove gadgets from an account

2011-11-04 Thread Samisa Abeysinghe
I want a user to have a tab where I login as admin and add some gadgets
with some settings, and when the user logs in, can see the gadgets with
proper settings, but cannot remove or add gadgets to that.

Is this possible?

Thanks,
Samisa...

Samisa Abeysinghe
VP Engineering
WSO2 Inc.
http://wso2.com
http://wso2.org
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev