You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2015/04/20 10:04:20 UTC
[1/4] zest-sandbox git commit: Cleanup Zest Sandbox - Remove dead
projects
Repository: zest-sandbox
Updated Branches:
refs/heads/feature/sandbox-cleanup 562f2ca3b -> 25dbfc233
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/Streams.java
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/Streams.java b/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/Streams.java
deleted file mode 100644
index cf6f42a..0000000
--- a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/Streams.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.lookup;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class Streams
-{
- public static void copyStream( InputStream src, OutputStream dest, boolean closeAfterCopy )
- throws IOException
- {
- BufferedInputStream in = null;
- BufferedOutputStream out = null;
- try
- {
- if( src instanceof BufferedInputStream )
- {
- in = (BufferedInputStream) src;
- }
- else
- {
- in = new BufferedInputStream( src );
- }
- if( dest instanceof BufferedOutputStream )
- {
- out = (BufferedOutputStream) dest;
- }
- else
- {
- out = new BufferedOutputStream( dest );
- }
-
- byte[] buffer = new byte[1024];
- int count = 0;
- do
- {
- count = in.read( buffer );
- if( count > 0 )
- {
- out.write( buffer, 0, count );
- }
- }
- while( count != -1 );
- out.flush();
- }
- finally
- {
- if( closeAfterCopy )
- {
- if( in != null )
- {
- in.close();
- }
- if( out != null )
- {
- out.close();
- }
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/jini.config
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/jini.config b/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/jini.config
deleted file mode 100644
index 0a963e3..0000000
--- a/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/jini.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-
-net.jini.discovery.LookupDiscovery
-{
- multicastInterfaces = new NetworkInterface[] { NetworkInterface.getByInetAddress( InetAddress.getByName( "127.0.0.1" ) ) };
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/reggie-2.1.1.jar
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/reggie-2.1.1.jar b/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/reggie-2.1.1.jar
deleted file mode 100644
index a85c3be..0000000
Binary files a/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/reggie-2.1.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/reggie-dl-2.1.1.jar
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/reggie-dl-2.1.1.jar b/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/reggie-dl-2.1.1.jar
deleted file mode 100644
index d8bda88..0000000
Binary files a/libraries/jini/lookup/src/main/resources/org/qi4j/library/jini/lookup/reggie-dl-2.1.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/test/java/org/qi4j/library/jini/lookup/ReggieStartTest.java
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/test/java/org/qi4j/library/jini/lookup/ReggieStartTest.java b/libraries/jini/lookup/src/test/java/org/qi4j/library/jini/lookup/ReggieStartTest.java
deleted file mode 100644
index 5444ead..0000000
--- a/libraries/jini/lookup/src/test/java/org/qi4j/library/jini/lookup/ReggieStartTest.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.lookup;
-
-import net.jini.core.lookup.ServiceRegistrar;
-import net.jini.core.lookup.ServiceTemplate;
-import net.jini.discovery.DiscoveryEvent;
-import net.jini.discovery.DiscoveryListener;
-import net.jini.discovery.DiscoveryManagement;
-import net.jini.discovery.LookupDiscoveryManager;
-import net.jini.lookup.LookupCache;
-import net.jini.lookup.ServiceDiscoveryEvent;
-import net.jini.lookup.ServiceDiscoveryListener;
-import net.jini.lookup.ServiceDiscoveryManager;
-import net.jini.security.policy.DynamicPolicyProvider;
-import static org.junit.Assert.assertTrue;
-import org.junit.Test;
-import org.qi4j.api.injection.scope.Service;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.entitystore.memory.MemoryEntityStoreService;
-import org.qi4j.library.http.JettyServiceAssembler;
-import org.qi4j.test.AbstractQi4jTest;
-
-import java.io.IOException;
-import java.security.*;
-import java.util.Collection;
-import java.util.logging.*;
-
-public class ReggieStartTest extends AbstractQi4jTest
-{
- private static Logger logger = Logger.getLogger( "" );
-
- static
- {
- Handler[] handlers = logger.getHandlers();
- for( Handler handler : handlers )
- {
- Formatter formatter = new SimpleFormatter();
- handler.setFormatter( formatter );
- }
- logger.setLevel( Level.FINEST );
- if( System.getSecurityManager() == null )
- {
- Policy basePolicy = new AllPolicy();
- DynamicPolicyProvider policyProvider = new DynamicPolicyProvider( basePolicy );
- Policy.setPolicy( policyProvider );
- System.setSecurityManager( new SecurityManager() );
- }
- }
-
-
- public void assemble( ModuleAssembly module ) throws AssemblyException
- {
- new JettyServiceAssembler().assemble( module );
- module.addObjects( Holder.class );
- module.addServices( MemoryEntityStoreService.class );
- new JiniLookupServiceAssembler().assemble( module );
- }
-
- @Test
- public void whenStartingReggieExpectFoundServiceRegistrar()
- throws Exception
- {
- LookupCache cache = initialize();
- MyServiceDiscoveryListener listener = new MyServiceDiscoveryListener();
- cache.addListener( listener );
- Holder object = objectBuilderFactory.newObject( Holder.class );
- synchronized( this )
- {
- if( !listener.added )
- {
- wait( 25000 );
- }
- }
- synchronized( listener )
- {
- assertTrue( listener.added );
- }
- }
-
-
- private LookupCache initialize()
- throws IOException
- {
- DiscoveryManagement discoveryManager = new LookupDiscoveryManager( null, null, new MyDiscoveryListener() );
- ServiceDiscoveryManager sdm = new ServiceDiscoveryManager( discoveryManager, null );
- Class[] types = new Class[]{ ServiceRegistrar.class };
- ServiceTemplate template = new ServiceTemplate( null, types, null );
- LookupCache lookupCache = sdm.createLookupCache( template, null, null );
- return lookupCache;
-
- }
-
- public static class Holder
- {
- @Service ServiceRegistryService service;
- }
-
- private static class MyDiscoveryListener
- implements DiscoveryListener
- {
-
- public void discovered( DiscoveryEvent e )
- {
- printEvent( e, "Discovered: " );
- }
-
- public void discarded( DiscoveryEvent e )
- {
- printEvent( e, "Discarded: " );
- }
-
- private void printEvent( DiscoveryEvent e, String message )
- {
- Collection<String[]> collection = e.getGroups().values();
- for( String[] array : collection )
- {
- StringBuffer groups = new StringBuffer();
- boolean first = true;
- for( String group : array )
- {
- if( !first )
- {
- groups.append( "," );
- }
- first = false;
- groups.append( group );
- System.out.println( message + groups );
- }
- }
- }
- }
-
- private class MyServiceDiscoveryListener
- implements ServiceDiscoveryListener
- {
- boolean added = false;
- boolean removed = false;
-
- public MyServiceDiscoveryListener()
- {
- }
-
- public void serviceAdded( ServiceDiscoveryEvent event )
- {
- synchronized( ReggieStartTest.this )
- {
- logger.info( "Added: " + event.getPostEventServiceItem() );
- added = true;
- ReggieStartTest.this.notifyAll();
- }
- }
-
- public void serviceRemoved( ServiceDiscoveryEvent event )
- {
- synchronized( ReggieStartTest.this )
- {
- logger.info( "Removed: " + event.getPostEventServiceItem() );
- removed = true;
- ReggieStartTest.this.notifyAll();
- }
- }
-
- public void serviceChanged( ServiceDiscoveryEvent event )
- {
- }
- }
-
- public static class AllPolicy extends Policy
- {
-
- public AllPolicy()
- {
- }
-
- public PermissionCollection getPermissions( CodeSource codeSource )
- {
- Permissions allPermission;
- allPermission = new Permissions();
- allPermission.add( new AllPermission() );
- return allPermission;
- }
-
- public void refresh()
- {
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/test/resources/org/qi4j/library/http/JettyService.properties
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/test/resources/org/qi4j/library/http/JettyService.properties b/libraries/jini/lookup/src/test/resources/org/qi4j/library/http/JettyService.properties
deleted file mode 100644
index 7a1adb8..0000000
--- a/libraries/jini/lookup/src/test/resources/org/qi4j/library/http/JettyService.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-port=8040
-hostName=127.0.0.1
-resourcePath=/
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/pom.xml b/libraries/jini/pom.xml
deleted file mode 100644
index b7a59ff..0000000
--- a/libraries/jini/pom.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.qi4j.sandbox</groupId>
- <artifactId>qi4j-sandbox-libraries</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini</artifactId>
- <name>Qi4j Library - Jini</name>
- <packaging>pom</packaging>
-
- <modules>
- <!--<module>common</module>-->
- <module>importer</module>
- <module>lookup</module>
- <module>transaction</module>
- <module>javaspaces</module>
- </modules>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/dev-status.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/dev-status.xml b/libraries/jini/transaction/dev-status.xml
deleted file mode 100644
index dc92d29..0000000
--- a/libraries/jini/transaction/dev-status.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1">
- <status>
- <codebase>early</codebase>
- <!--none,early,beta,stable,mature-->
- <documentation>brief</documentation>
- <!-- none, brief, good, complete -->
- <unittests>some</unittests>
- <!-- none, some, good, complete -->
- </status>
- <licenses>
- <license>ALv2</license>
- </licenses>
-</module>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/pom.xml b/libraries/jini/transaction/pom.xml
deleted file mode 100644
index 1c8d0eb..0000000
--- a/libraries/jini/transaction/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-transaction</artifactId>
- <name>Qi4j Library - Jini Transaction Service</name>
-
- <dependencies>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.runtime</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.bootstrap</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library</groupId>
- <artifactId>org.qi4j.library.http</artifactId>
- <version>${version.qi4j}</version>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library</groupId>
- <artifactId>org.qi4j.library.logging</artifactId>
- <version>${version.qi4j}</version>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-lookup</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-core</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-ext</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>mahalo</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>start</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jsk-lib</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.testsupport</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/JiniTransactionServiceAssembler.java
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/JiniTransactionServiceAssembler.java b/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/JiniTransactionServiceAssembler.java
deleted file mode 100644
index a1bd518..0000000
--- a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/JiniTransactionServiceAssembler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.transaction;
-
-import org.qi4j.bootstrap.Assembler;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.library.http.ServletInfo;
-
-public class JiniTransactionServiceAssembler
- implements Assembler
-{
- public void assemble( ModuleAssembly module )
- throws AssemblyException
- {
- module.addEntities( MahaloConfiguration.class );
- ServletInfo servletInfo = new ServletInfo( "/jini/mahalo-dl.jar" );
- module.addServices( MahaloDownloadServletService.class ).instantiateOnStartup().setMetaInfo( servletInfo );
- module.addServices( TransactionManagerService.class ).instantiateOnStartup();
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloConfiguration.java b/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloConfiguration.java
deleted file mode 100644
index 24816d6..0000000
--- a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloConfiguration.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.transaction;
-
-import org.qi4j.api.common.Optional;
-import org.qi4j.api.common.UseDefaults;
-import org.qi4j.api.configuration.ConfigurationComposite;
-import org.qi4j.api.property.Property;
-
-public interface MahaloConfiguration extends ConfigurationComposite
-{
- @Optional @UseDefaults Property<Boolean> useJrmp();
-
- @Optional Property<String> hostInterface();
-
- @Optional Property<String> securityPolicy();
-
- @Optional Property<String> mahaloDlJarLocation();
-
- @Optional Property<String> groups();
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloDownloadServletService.java
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloDownloadServletService.java b/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloDownloadServletService.java
deleted file mode 100644
index 78daaf9..0000000
--- a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloDownloadServletService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.transaction;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.ServiceComposite;
-
-import javax.servlet.Servlet;
-
-@Mixins( ResourceServletMixin.class )
-public interface MahaloDownloadServletService extends Servlet, ServiceComposite
-{
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloMixin.java
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloMixin.java b/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloMixin.java
deleted file mode 100644
index e155b9e..0000000
--- a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/MahaloMixin.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.transaction;
-
-import com.sun.jini.admin.DestroyAdmin;
-import com.sun.jini.start.NonActivatableServiceDescriptor;
-import net.jini.admin.Administrable;
-import net.jini.config.Configuration;
-import net.jini.config.EmptyConfiguration;
-import org.qi4j.api.common.Optional;
-import org.qi4j.api.injection.scope.Service;
-import org.qi4j.api.injection.scope.This;
-import org.qi4j.api.service.Activatable;
-import org.qi4j.library.http.HttpService;
-import org.qi4j.library.http.Interface;
-import org.qi4j.library.jini.lookup.Streams;
-
-import java.io.*;
-import java.net.UnknownHostException;
-import java.security.Policy;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-public class MahaloMixin
- implements Activatable
-{
- @Optional @Service HttpService httpService;
- @This org.qi4j.api.configuration.Configuration<MahaloConfiguration> my;
-
- private NonActivatableServiceDescriptor.Created lookupCreated;
- private File fileToCleanup;
-
- public void activate()
- throws Exception
- {
- // Prepare a temporary directory.
- File qi4j = new File( "qi4jtemp" );
- qi4j.mkdir();
- fileToCleanup = qi4j.getAbsoluteFile();
- File jini = new File( qi4j, "jini" );
- jini.mkdirs();
- File temp = File.createTempFile( "mahalo", "", jini );
- temp.delete();
- temp.mkdirs();
- Configuration serviceDescConfig = EmptyConfiguration.INSTANCE;
- String httpURLtext = my.configuration().mahaloDlJarLocation().get();
- if( httpURLtext == null )
- {
- // If Http Service not running in this JVM, we need the Download URL from configuration.
- if( httpService != null )
- {
- httpURLtext = constructDownloadURL();
- }
- }
- String mahaloJarLocation = createMahaloJars( temp );
- File mahaloJarFile = new File( mahaloJarLocation );
- String securityPolicyLocation = createSecurityPolicy( temp, mahaloJarFile );
- String mahaloConfig = createMahaloConfig( temp );
- System.out.println( "Policy: " + Policy.getPolicy() );
- NonActivatableServiceDescriptor serviceDescriptor = new NonActivatableServiceDescriptor(
- httpURLtext,
- securityPolicyLocation,
- mahaloJarLocation,
- "com.sun.jini.mahalo.TransientMahaloImpl",
- new String[]{ mahaloConfig } );
- lookupCreated = (NonActivatableServiceDescriptor.Created) serviceDescriptor.create( serviceDescConfig );
-
- }
-
- public void passivate()
- throws Exception
- {
- System.out.println( "Destroying Mahalo." );
- Object admin = ( (Administrable) lookupCreated.proxy ).getAdmin();
- ( (DestroyAdmin) admin ).destroy();
- removeFile( fileToCleanup );
- }
-
- private String createMahaloConfig( File dir )
- throws IOException
- {
- StringBuffer configuration = new StringBuffer();
- if( my.configuration().useJrmp().get() )
- {
- System.out.println( "Using JRMP..." );
- configuration.append( "import net.jini.jrmp.JrmpExporter;\n" +
- "\n" +
- "com.sun.jini.mahalo\n" +
- "{\n" +
- " serverExporter = new JrmpExporter();\n" );
- }
- else
- {
- System.out.println( "Using JERI..." );
- configuration.append( "import net.jini.jeri.BasicILFactory;\n" +
- "import net.jini.jeri.BasicJeriExporter;\n" +
- "import net.jini.jeri.tcp.TcpServerEndpoint;\n" +
- "\n" +
- "com.sun.jini.mahalo\n" +
- "{\n" +
- " private invocationLayerFactory = new BasicILFactory();\n" +
- " serverExporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),\n" +
- " invocationLayerFactory,\n" +
- " false,\n" +
- " true);\n" );
- }
- configuration.append( " initialLookupGroups = new String[] {" );
- String groupData = my.configuration().groups().get();
- String[] groups;
- if( groupData != null )
- {
- groups = convert( groupData );
- }
- else
- {
- groups = new String[]{ "qi4j" };
- }
- boolean first = true;
- for( String group : groups )
- {
- if( !first )
- {
- configuration.append( ", " );
- }
- first = false;
- configuration.append( "\"" );
- configuration.append( group );
- configuration.append( "\"" );
- }
-
- configuration.append( "};\n}" );
- File configFile = new File( dir, "mahalo.conf" );
- if( !configFile.exists() )
- {
- InputStream config = new ByteArrayInputStream( configuration.toString().getBytes() );
- copyStreamToFile( config, configFile );
- }
- return configFile.getAbsolutePath();
- }
-
- private String[] convert( String data )
- {
- if( data == null )
- {
- return new String[0];
- }
- ArrayList<String> result = new ArrayList<String>();
- StringTokenizer st = new StringTokenizer( data, ",", false );
- while( st.hasMoreTokens() )
- {
- String token = st.nextToken();
- result.add( token );
- }
- String[] retVal = new String[result.size()];
- return result.toArray( retVal );
- }
-
-
- private String createMahaloJars( File temp )
- throws IOException
- {
- File mahaloJar = new File( temp, "mahalo-2.1.1.jar" );
- if( !mahaloJar.exists() )
- {
- InputStream mahalo = getClass().getResourceAsStream( "mahalo-2.1.1.jar" );
- copyStreamToFile( mahalo, mahaloJar );
- }
- return mahaloJar.getAbsolutePath();
- }
-
- private void removeFile( File fileToCleanup )
- {
- if( fileToCleanup == null )
- {
- return;
- }
-
- File[] files = fileToCleanup.listFiles();
- if( files == null )
- {
- return;
- }
- for( File file : files )
- {
- removeFile( file );
- }
- fileToCleanup.delete();
- }
-
- private String constructDownloadURL()
- throws UnknownHostException
- {
- Interface[] interfaces = httpService.interfacesServed();
- String host = interfaces[ 0 ].hostName();
- int port = interfaces[ 0 ].port();
- String protocol = interfaces[ 0 ].protocol().toString();
- return protocol + "://" + host + ":" + port + "/jini/mahalo-dl.jar";
- }
-
- private String createSecurityPolicy( File tempDir, File mahaloJarFile )
- throws IOException
- {
- String securityPolicy = my.configuration().securityPolicy().get();
- if( securityPolicy == null || "".equals( securityPolicy ) )
- {
- securityPolicy = "grant { permission java.security.AllPermission; };";
- }
- File securityPolicyFile = new File( tempDir, "mahalo-security.policy" );
- copyStringToFile( securityPolicy, securityPolicyFile );
- return securityPolicyFile.getAbsolutePath();
- }
-
- private void copyStringToFile( String securityPolicy, File securityPolicyFile )
- throws IOException
- {
- ByteArrayInputStream bais = new ByteArrayInputStream( securityPolicy.getBytes() );
- copyStreamToFile( bais, securityPolicyFile );
- }
-
- private void copyStreamToFile( InputStream inputStream, File destinationFile )
- throws IOException
- {
- destinationFile = destinationFile.getAbsoluteFile();
- File parentFile = destinationFile.getParentFile();
- if( !parentFile.exists() )
- {
- parentFile.mkdirs();
- }
- FileOutputStream fos = new FileOutputStream( destinationFile );
- Streams.copyStream( inputStream, fos, true );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/ResourceServletMixin.java
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/ResourceServletMixin.java b/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/ResourceServletMixin.java
deleted file mode 100644
index cd80c20..0000000
--- a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/ResourceServletMixin.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.transaction;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import org.qi4j.library.jini.lookup.Streams;
-
-public class ResourceServletMixin extends HttpServlet
-{
- protected void doGet( HttpServletRequest request, HttpServletResponse response )
- throws ServletException, IOException
- {
- InputStream in = getClass().getResourceAsStream( "mahalo-dl-2.1.1.jar" );
- response.setContentType( "application/java" );
- OutputStream out = response.getOutputStream();
- Streams.copyStream( in, out, true );
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/TransactionManagerService.java
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/TransactionManagerService.java b/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/TransactionManagerService.java
deleted file mode 100644
index 5e03792..0000000
--- a/libraries/jini/transaction/src/main/java/org/qi4j/library/jini/transaction/TransactionManagerService.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.transaction;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.Activatable;
-import org.qi4j.api.service.ServiceComposite;
-
-@Mixins( MahaloMixin.class )
-public interface TransactionManagerService extends Activatable, ServiceComposite
-{
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/main/resources/org/qi4j/library/jini/transaction/mahalo-2.1.1.jar
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/main/resources/org/qi4j/library/jini/transaction/mahalo-2.1.1.jar b/libraries/jini/transaction/src/main/resources/org/qi4j/library/jini/transaction/mahalo-2.1.1.jar
deleted file mode 100644
index 878729f..0000000
Binary files a/libraries/jini/transaction/src/main/resources/org/qi4j/library/jini/transaction/mahalo-2.1.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/main/resources/org/qi4j/library/jini/transaction/mahalo-dl-2.1.1.jar
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/main/resources/org/qi4j/library/jini/transaction/mahalo-dl-2.1.1.jar b/libraries/jini/transaction/src/main/resources/org/qi4j/library/jini/transaction/mahalo-dl-2.1.1.jar
deleted file mode 100644
index dbe4ff8..0000000
Binary files a/libraries/jini/transaction/src/main/resources/org/qi4j/library/jini/transaction/mahalo-dl-2.1.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/test/java/org/qi4j/library/jini/transaction/MahaloStartTest.java
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/test/java/org/qi4j/library/jini/transaction/MahaloStartTest.java b/libraries/jini/transaction/src/test/java/org/qi4j/library/jini/transaction/MahaloStartTest.java
deleted file mode 100644
index 6420385..0000000
--- a/libraries/jini/transaction/src/test/java/org/qi4j/library/jini/transaction/MahaloStartTest.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.transaction;
-
-import net.jini.core.lookup.ServiceTemplate;
-import net.jini.core.transaction.server.TransactionManager;
-import net.jini.discovery.DiscoveryEvent;
-import net.jini.discovery.DiscoveryListener;
-import net.jini.discovery.DiscoveryManagement;
-import net.jini.discovery.LookupDiscoveryManager;
-import net.jini.lookup.LookupCache;
-import net.jini.lookup.ServiceDiscoveryEvent;
-import net.jini.lookup.ServiceDiscoveryListener;
-import net.jini.lookup.ServiceDiscoveryManager;
-import net.jini.security.policy.DynamicPolicyProvider;
-import static org.junit.Assert.assertTrue;
-import org.junit.Test;
-import org.qi4j.api.injection.scope.Service;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.entitystore.memory.MemoryEntityStoreService;
-import org.qi4j.library.http.JettyServiceAssembler;
-import org.qi4j.library.jini.lookup.JiniLookupServiceAssembler;
-import org.qi4j.test.AbstractQi4jTest;
-
-import java.io.IOException;
-import java.security.*;
-import java.util.Collection;
-import java.util.logging.*;
-
-public class MahaloStartTest extends AbstractQi4jTest
-{
- private static Logger logger = Logger.getLogger( "" );
-
- static
- {
- Handler[] handlers = logger.getHandlers();
- for( Handler handler : handlers )
- {
- Formatter formatter = new SimpleFormatter();
- handler.setFormatter( formatter );
- }
- logger.setLevel( Level.FINEST );
-
- if( System.getSecurityManager() == null )
- {
- Policy basePolicy = new AllPolicy();
- DynamicPolicyProvider policyProvider = new DynamicPolicyProvider( basePolicy );
- Policy.setPolicy( policyProvider );
- System.setSecurityManager( new SecurityManager() );
- }
- }
-
-
- public void assemble( ModuleAssembly module ) throws AssemblyException
- {
- new JettyServiceAssembler().assemble( module );
- new JiniLookupServiceAssembler().assemble( module );
- module.addObjects( Holder.class );
- module.addServices( MemoryEntityStoreService.class );
- new JiniTransactionServiceAssembler().assemble( module );
- }
-
- @Test
- public void whenStartingMahaloExpectFoundTransactionManager()
- throws Exception
- {
- LookupCache cache = initialize();
- MyServiceDiscoveryListener listener = new MyServiceDiscoveryListener();
- cache.addListener( listener );
- Holder object = objectBuilderFactory.newObject( Holder.class );
- synchronized( this )
- {
- if( !listener.added )
- {
- wait( 25000 );
- }
- }
- synchronized( listener )
- {
- assertTrue( listener.added );
- }
- }
-
-
- private LookupCache initialize()
- throws IOException
- {
- DiscoveryManagement discoveryManager = new LookupDiscoveryManager( null, null, new MyDiscoveryListener() );
- ServiceDiscoveryManager sdm = new ServiceDiscoveryManager( discoveryManager, null );
- Class[] types = new Class[]{ TransactionManager.class };
- ServiceTemplate template = new ServiceTemplate( null, types, null );
- LookupCache lookupCache = sdm.createLookupCache( template, null, null );
- return lookupCache;
- }
-
- public static class Holder
- {
- @Service TransactionManagerService service;
- }
-
- private static class MyDiscoveryListener
- implements DiscoveryListener
- {
-
- public void discovered( DiscoveryEvent e )
- {
- printEvent( e, "Discovered: " );
- }
-
- public void discarded( DiscoveryEvent e )
- {
- printEvent( e, "Discarded: " );
- }
-
- private void printEvent( DiscoveryEvent e, String message )
- {
- System.out.println( e );
- Collection<String[]> collection = e.getGroups().values();
- for( String[] array : collection )
- {
- StringBuffer groups = new StringBuffer();
- boolean first = true;
- for( String group : array )
- {
- if( !first )
- {
- groups.append( "," );
- }
- first = false;
- groups.append( group );
- }
- System.out.println( message + groups );
- }
- }
- }
-
- private class MyServiceDiscoveryListener
- implements ServiceDiscoveryListener
- {
- boolean added = false;
- boolean removed = false;
-
- public MyServiceDiscoveryListener()
- {
- }
-
- public void serviceAdded( ServiceDiscoveryEvent event )
- {
- synchronized( MahaloStartTest.this )
- {
- logger.info( "Added: " + event.getPostEventServiceItem() );
- added = true;
- MahaloStartTest.this.notifyAll();
- }
- }
-
- public void serviceRemoved( ServiceDiscoveryEvent event )
- {
- synchronized( MahaloStartTest.this )
- {
- logger.info( "Removed: " + event.getPostEventServiceItem() );
- removed = true;
- MahaloStartTest.this.notifyAll();
- }
- }
-
- public void serviceChanged( ServiceDiscoveryEvent event )
- {
- }
- }
-
- public static class AllPolicy extends Policy
- {
-
- public AllPolicy()
- {
- }
-
- public PermissionCollection getPermissions( CodeSource codeSource )
- {
- Permissions allPermission;
- allPermission = new Permissions();
- allPermission.add( new AllPermission() );
- return allPermission;
- }
-
- public void refresh()
- {
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/transaction/src/test/resources/org/qi4j/library/http/JettyService.properties
----------------------------------------------------------------------
diff --git a/libraries/jini/transaction/src/test/resources/org/qi4j/library/http/JettyService.properties b/libraries/jini/transaction/src/test/resources/org/qi4j/library/http/JettyService.properties
deleted file mode 100644
index 7a1adb8..0000000
--- a/libraries/jini/transaction/src/test/resources/org/qi4j/library/http/JettyService.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-port=8040
-hostName=127.0.0.1
-resourcePath=/
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/pom.xml b/libraries/pom.xml
index 9aeae7d..e7297e7 100644
--- a/libraries/pom.xml
+++ b/libraries/pom.xml
@@ -22,11 +22,5 @@
<module>thread</module>
<module>unitofwork</module>
<module>validation</module>
-
- <!-- Depends on incubator release of Apache River.
- Could not find a repository with the correct JARs.
- Unable to make it compile against Apache River TLP artifacts.
- <module>jini</module> -->
-
</modules>
</project>
[3/4] zest-sandbox git commit: Cleanup Zest Sandbox - Remove dead
projects
Posted by pa...@apache.org.
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientMixin.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientMixin.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientMixin.java
deleted file mode 100644
index 13d03bb..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientMixin.java
+++ /dev/null
@@ -1,483 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces.javaspaces;
-
-import net.jini.config.ConfigurationException;
-import net.jini.config.ConfigurationFile;
-import net.jini.core.entry.UnusableEntryException;
-import net.jini.core.lease.LeaseDeniedException;
-import net.jini.core.lookup.ServiceTemplate;
-import net.jini.core.transaction.Transaction;
-import net.jini.core.transaction.TransactionException;
-import net.jini.core.transaction.TransactionFactory;
-import net.jini.core.transaction.server.TransactionManager;
-import net.jini.discovery.DiscoveryEvent;
-import net.jini.discovery.DiscoveryListener;
-import net.jini.discovery.DiscoveryManagement;
-import net.jini.discovery.LookupDiscoveryManager;
-import net.jini.lookup.LookupCache;
-import net.jini.lookup.ServiceDiscoveryEvent;
-import net.jini.lookup.ServiceDiscoveryListener;
-import net.jini.lookup.ServiceDiscoveryManager;
-import net.jini.space.JavaSpace05;
-import net.jini.space.MatchSet;
-import org.qi4j.api.configuration.Configuration;
-import org.qi4j.api.injection.scope.This;
-import org.qi4j.api.service.Activatable;
-import org.qi4j.library.spaces.Space;
-import org.qi4j.library.spaces.SpaceException;
-import org.qi4j.library.spaces.SpaceTransaction;
-
-import java.io.*;
-import java.rmi.RemoteException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Stack;
-import java.util.StringTokenizer;
-
-public class JavaSpacesClientMixin
- implements Space, Activatable
-{
- @This private Configuration<JavaSpacesClientConfiguration> my;
- private ServiceHolder<JavaSpace05> spaceService;
- private ServiceHolder<TransactionManager> transactionService;
- private StackThreadLocal<TransactionProxy> transactionStack;
-
- public JavaSpacesClientMixin()
- {
- transactionStack = new StackThreadLocal<TransactionProxy>();
- }
-
- public void write( String id, String entry )
- {
- synchronized( this )
- {
- if( spaceService.service != null )
- {
- try
- {
- StorageEntry storageEntry = new StorageEntry( id, entry );
- spaceService.service.write( storageEntry, currentTransaction(), 6000 );
- }
- catch( TransactionException e )
- {
- e.printStackTrace(); // Can not happen without own transaction.
- }
- catch( RemoteException e )
- {
- throw new SpaceException( "Remote problems: " + e.getMessage(), e );
- }
- }
- }
- }
-
- public Serializable take( String id, long timeout )
- {
- synchronized( this )
- {
- if( spaceService.service != null )
- {
- try
- {
- StorageEntry entry = (StorageEntry) spaceService.service.take( new StorageEntry( id, null ), currentTransaction(), 6000 );
- if( entry == null )
- {
- return null;
- }
- return entry.data();
- }
- catch( TransactionException e )
- {
- e.printStackTrace(); // Can not happen without own transaction.
- }
- catch( RemoteException e )
- {
- throw new SpaceException( "Remote problems: " + e.getMessage(), e );
- }
- catch( UnusableEntryException e )
- {
- e.printStackTrace();
- }
- catch( InterruptedException e )
- {
- e.printStackTrace();
- }
- }
- }
- return null;
- }
-
- public String takeIfExists( String id )
- {
- synchronized( this )
- {
- if( spaceService.service != null )
- {
- try
- {
- StorageEntry entry = (StorageEntry) spaceService.service.takeIfExists( new StorageEntry( id, null ), currentTransaction(), 6000 );
- if( entry == null )
- {
- return null;
- }
- return entry.data();
- }
- catch( TransactionException e )
- {
- e.printStackTrace(); // Can not happen without own transaction.
- }
- catch( RemoteException e )
- {
- throw new SpaceException( "Remote problems: " + e.getMessage(), e );
- }
- catch( UnusableEntryException e )
- {
- e.printStackTrace();
- }
- catch( InterruptedException e )
- {
- e.printStackTrace();
- }
- }
- return null;
- }
- }
-
- public Serializable read( String id, long timeout )
- {
- synchronized( this )
- {
- if( spaceService.service != null )
- {
- try
- {
- StorageEntry entry = (StorageEntry) spaceService.service.read( new StorageEntry( id, null ), currentTransaction(), timeout );
- if( entry == null )
- {
- return null;
- }
- return entry.data();
- }
- catch( TransactionException e )
- {
- e.printStackTrace(); // Can not happen without own transaction.
- }
- catch( RemoteException e )
- {
- throw new SpaceException( "Remote problems: " + e.getMessage(), e );
- }
- catch( UnusableEntryException e )
- {
- e.printStackTrace();
- }
- catch( InterruptedException e )
- {
- e.printStackTrace();
- }
- }
- }
- return null;
- }
-
- public String readIfExists( String id )
- {
- synchronized( this )
- {
- if( spaceService.service != null )
- {
-
- try
- {
- StorageEntry entry = (StorageEntry) spaceService.service.readIfExists( new StorageEntry( id, null ), currentTransaction(), 6000 );
- if( entry == null )
- {
- return null;
- }
- return entry.data();
- }
- catch( TransactionException e )
- {
- e.printStackTrace(); // Can not happen without own transaction.
- }
- catch( RemoteException e )
- {
- throw new SpaceException( "Remote problems: " + e.getMessage(), e );
- }
- catch( UnusableEntryException e )
- {
- e.printStackTrace();
- }
- catch( InterruptedException e )
- {
- e.printStackTrace();
- }
- }
- }
- return null;
- }
-
- public SpaceTransaction newTransaction()
- {
- synchronized( this )
- {
- if( transactionService.service != null )
- {
- try
- {
- Transaction.Created created = TransactionFactory.create( transactionService.service, 60000 );
- Transaction transaction = created.transaction;
- System.out.println( "NEW: " + transaction );
- TransactionProxy transactionProxy = new TransactionProxy( transaction, this );
- transactionStack.get().push( transactionProxy );
- return transactionProxy;
- }
- catch( LeaseDeniedException e )
- {
- e.printStackTrace();
- }
- catch( RemoteException e )
- {
- e.printStackTrace();
- }
- }
- return new NullTransactionProxy();
- }
- }
-
- public boolean isReady()
- {
- return spaceService.service != null && transactionService.service != null;
- }
-
- public void activate()
- throws Exception
- {
- String groupConfig = my.configuration().groups().get();
- System.out.println( "GROUPS: " + groupConfig );
- String[] groups = convert( groupConfig );
- spaceService = initializeLookup( groups, JavaSpace05.class );
- transactionService = initializeLookup( groups, TransactionManager.class );
- }
-
- private String[] convert( String data )
- {
- if( data == null )
- {
- return new String[0];
- }
- StringTokenizer st = new StringTokenizer( data, ",", false );
- ArrayList<String> result = new ArrayList<String>();
- while( st.hasMoreTokens() )
- {
- String item = st.nextToken().trim();
- result.add( item );
- }
- String[] retVal = new String[result.size()];
- return result.toArray( retVal );
- }
-
- public void passivate()
- throws Exception
- {
- spaceService.lookupCache.terminate();
- transactionService.lookupCache.terminate();
- }
-
- static <T> ServiceHolder<T> initializeLookup( String[] groups, Class<T> type )
- throws IOException
- {
- ClassLoader classloader = JavaSpacesClientMixin.class.getClassLoader();
- InputStream in = JavaSpacesClientMixin.class.getResourceAsStream( "jini.config" );
- Reader reader = new InputStreamReader( in );
- String[] options = new String[0];
- DiscoveryManagement dm = null;
- try
- {
- net.jini.config.Configuration config = new ConfigurationFile( reader, options, classloader );
- dm = new LookupDiscoveryManager( groups, null, null, config );
- }
- catch( ConfigurationException e )
- {
- e.printStackTrace();
- }
- ServiceDiscoveryManager sdm = new ServiceDiscoveryManager( dm, null );
- Class[] types = new Class[]{ type };
- ServiceTemplate template = new ServiceTemplate( null, types, null );
- LookupCache lookupCache = sdm.createLookupCache( template, null, null );
- return new ServiceHolder<T>( dm, lookupCache );
- }
-
- Transaction currentTransaction()
- {
- Stack<TransactionProxy> curStack = transactionStack.get();
- if( curStack.size() == 0 )
- {
- System.err.println( "WARNING: Transaction is null." );
- return null;
- }
- TransactionProxy proxy = curStack.peek();
- if( proxy == null )
- {
- System.err.println( "WARNING: Transaction is null." );
- return null;
- }
- else if( proxy.transaction == null )
- {
- System.err.println( "WARNING: Transaction is null." );
- }
- Transaction transaction = proxy.transaction;
- System.out.println( "LOOKUP: " + transaction );
- return transaction;
- }
-
- void removeTransaction( TransactionProxy transaction )
- {
- Stack<TransactionProxy> curStack = transactionStack.get();
- curStack.remove( transaction );
- }
-
- public Iterator<String> iterator()
- {
- ArrayList templates = new ArrayList();
- templates.add( new StorageEntry(null, null) );
- try
- {
- Transaction txn = currentTransaction();
- MatchSet matchSet = spaceService.service.contents( templates, txn, 60000, 1000 );
- return new EntryIterator( matchSet );
- }
- catch( TransactionException e )
- {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
- }
- catch( RemoteException e )
- {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
- }
- return null;
- }
-
- static class ServiceHolder<T>
- implements DiscoveryListener
- {
- private DiscoveryManagement dm;
- private LookupCache lookupCache;
- T service;
-
- public ServiceHolder( DiscoveryManagement dm, LookupCache lookupCache )
- {
- this.dm = dm;
- this.lookupCache = lookupCache;
- this.dm.addDiscoveryListener( this );
- lookupCache.addListener( new ServiceDiscoveryListener()
- {
- public void serviceAdded( ServiceDiscoveryEvent event )
- {
- System.out.println( "Service Added: " + event );
- service = (T) event.getPostEventServiceItem().service;
- }
-
- public void serviceRemoved( ServiceDiscoveryEvent event )
- {
- System.out.println( "Service Removed: " + event );
- service = null;
- }
-
- public void serviceChanged( ServiceDiscoveryEvent event )
- {
- System.out.println( "Service Changed: " + event );
- }
- } );
-
- }
-
- public void dispose()
- {
- dm.removeDiscoveryListener( this );
- }
-
- public void discovered( DiscoveryEvent e )
- {
- System.out.println( "Discovered: " + e.getGroups() );
- }
-
- public void discarded( DiscoveryEvent e )
- {
- System.out.println( "Discarded: " + e.getGroups() );
- }
- }
-
- private static class EntryIterator
- implements Iterator<String>
- {
- private MatchSet matchSet;
- private StorageEntry nextEntry;
-
- public EntryIterator( MatchSet matchSet )
- {
- this.matchSet = matchSet;
- try
- {
- nextEntry = getNext( matchSet );
- }
- catch( RemoteException e )
- {
- e.printStackTrace();
- }
- catch( UnusableEntryException e )
- {
- e.printStackTrace();
- }
- }
-
- private StorageEntry getNext( MatchSet matchSet )
- throws RemoteException, UnusableEntryException
- {
- StorageEntry storageEntry = (StorageEntry) matchSet.next();
- return storageEntry;
- }
-
- public boolean hasNext()
- {
- return nextEntry != null;
- }
-
- public String next()
- {
- String result = nextEntry.data();
- try
- {
- nextEntry = getNext( matchSet );
- }
- catch( RemoteException e )
- {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
- }
- catch( UnusableEntryException e )
- {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
- }
- return result;
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientService.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientService.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientService.java
deleted file mode 100644
index ac32046..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces.javaspaces;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.Activatable;
-import org.qi4j.api.service.ServiceComposite;
-import org.qi4j.library.spaces.Space;
-
-@Mixins( { JavaSpacesClientMixin.class } )
-public interface JavaSpacesClientService extends Space, Activatable, ServiceComposite
-{
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/NullTransactionProxy.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/NullTransactionProxy.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/NullTransactionProxy.java
deleted file mode 100644
index ecf59e8..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/NullTransactionProxy.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces.javaspaces;
-
-import org.qi4j.library.spaces.SpaceTransaction;
-
-final class NullTransactionProxy
- implements SpaceTransaction
-{
- NullTransactionProxy()
- {
- }
-
- public void commit()
- {
- }
-
- public void abort()
- {
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/StackThreadLocal.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/StackThreadLocal.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/StackThreadLocal.java
deleted file mode 100644
index 9fa0952..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/StackThreadLocal.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces.javaspaces;
-
-import java.util.Stack;
-
-public class StackThreadLocal<E>
- extends ThreadLocal<Stack<E>>
-{
- protected Stack<E> initialValue()
- {
- return new Stack<E>();
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/StorageEntry.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/StorageEntry.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/StorageEntry.java
deleted file mode 100644
index ca36a65..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/StorageEntry.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces.javaspaces;
-
-import net.jini.core.entry.Entry;
-
-public final class StorageEntry
- implements Entry
-{
- public String identity;
- public String payload;
-
- public StorageEntry()
- {
- }
-
- public StorageEntry( String id, String data )
- {
- identity = id;
- payload = data;
- }
-
- public String identity()
- {
- return identity;
- }
-
- public String data()
- {
- return payload;
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/TransactionProxy.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/TransactionProxy.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/TransactionProxy.java
deleted file mode 100644
index ce094cf..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/TransactionProxy.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces.javaspaces;
-
-import net.jini.core.transaction.CannotAbortException;
-import net.jini.core.transaction.CannotCommitException;
-import net.jini.core.transaction.Transaction;
-import net.jini.core.transaction.UnknownTransactionException;
-import org.qi4j.library.spaces.SpaceException;
-import org.qi4j.library.spaces.SpaceTransaction;
-
-import java.rmi.RemoteException;
-
-final class TransactionProxy
- implements SpaceTransaction
-{
- Transaction transaction;
- private JavaSpacesClientMixin javaspacesMixin;
-
- TransactionProxy( Transaction transaction, JavaSpacesClientMixin mixin )
- {
- this.transaction = transaction;
- javaspacesMixin = mixin;
- }
-
- public void commit()
- {
- try
- {
- System.out.println( "COMMIT: " + transaction );
- transaction.commit();
- javaspacesMixin.removeTransaction( this );
- }
- catch( UnknownTransactionException e )
- {
- throw new SpaceException( "Can not commit: " + e.getMessage(), e );
- }
- catch( CannotCommitException e )
- {
- throw new SpaceException( "Can not commit: " + e.getMessage(), e );
- }
- catch( RemoteException e )
- {
- throw new SpaceException( "Can not commit: " + e.getMessage(), e );
- }
- }
-
- public void abort()
- {
- try
- {
- System.out.println( "ABORT: " + transaction );
- transaction.abort();
- javaspacesMixin.removeTransaction( this );
- }
- catch( UnknownTransactionException e )
- {
- throw new SpaceException( "Can not abort: " + e.getMessage(), e );
- }
- catch( CannotAbortException e )
- {
- throw new SpaceException( "Can not abort: " + e.getMessage(), e );
- }
- catch( RemoteException e )
- {
- throw new SpaceException( "Can not abort: " + e.getMessage(), e );
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/resources/org/qi4j/library/spaces/javaspaces/JavaSpacesClientService.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/resources/org/qi4j/library/spaces/javaspaces/JavaSpacesClientService.properties b/extensions/entitystore-javaspaces/src/main/resources/org/qi4j/library/spaces/javaspaces/JavaSpacesClientService.properties
deleted file mode 100644
index ea0e4e9..0000000
--- a/extensions/entitystore-javaspaces/src/main/resources/org/qi4j/library/spaces/javaspaces/JavaSpacesClientService.properties
+++ /dev/null
@@ -1 +0,0 @@
-groups=qi4j
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/resources/org/qi4j/library/spaces/javaspaces/jini.config
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/resources/org/qi4j/library/spaces/javaspaces/jini.config b/extensions/entitystore-javaspaces/src/main/resources/org/qi4j/library/spaces/javaspaces/jini.config
deleted file mode 100644
index 0a963e3..0000000
--- a/extensions/entitystore-javaspaces/src/main/resources/org/qi4j/library/spaces/javaspaces/jini.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-
-net.jini.discovery.LookupDiscovery
-{
- multicastInterfaces = new NetworkInterface[] { NetworkInterface.getByInetAddress( InetAddress.getByName( "127.0.0.1" ) ) };
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/test/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/test/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreTest.java b/extensions/entitystore-javaspaces/src/test/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreTest.java
deleted file mode 100644
index edd97f9..0000000
--- a/extensions/entitystore-javaspaces/src/test/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreTest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Copyright 2008 Jan Kronquist.
- *
- * Licensed 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 org.qi4j.entitystore.javaspaces;
-
-import java.io.File;
-import java.security.AllPermission;
-import java.security.CodeSource;
-import java.security.PermissionCollection;
-import java.security.Permissions;
-import java.security.Policy;
-import net.jini.security.policy.DynamicPolicyProvider;
-import org.junit.After;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.qi4j.api.common.Visibility;
-import org.qi4j.api.unitofwork.UnitOfWorkCompletionException;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.entitystore.memory.MemoryEntityStoreService;
-import org.qi4j.library.http.JettyServiceAssembler;
-import org.qi4j.library.jini.javaspaces.JiniJavaSpacesServiceAssembler;
-import org.qi4j.library.jini.lookup.JiniLookupServiceAssembler;
-import org.qi4j.library.jini.transaction.JiniTransactionServiceAssembler;
-import org.qi4j.library.spaces.javaspaces.JavaSpacesClientConfiguration;
-import org.qi4j.library.spaces.javaspaces.JavaSpacesClientService;
-import org.qi4j.spi.uuid.UuidIdentityGeneratorService;
-import org.qi4j.test.entity.AbstractEntityStoreTest;
-
-/**
- * JavaSpaces EntityStore test
- */
-@Ignore
-public class JavaSpacesEntityStoreTest
- extends AbstractEntityStoreTest
-{
- static
- {
- Policy basePolicy = new AllPolicy();
- DynamicPolicyProvider policyProvider = new DynamicPolicyProvider( basePolicy );
- Policy.setPolicy( policyProvider );
- }
-
- @SuppressWarnings( "unchecked" )
- public void assemble( ModuleAssembly module )
- throws AssemblyException
- {
- super.assemble( module );
- module.addServices( JavaSpacesEntityStoreService.class,
- MemoryEntityStoreService.class,
- UuidIdentityGeneratorService.class )
- .instantiateOnStartup();
-
- ModuleAssembly configModule = module.layerAssembly().moduleAssembly( "JavaSpacesConfiguration" );
- new JiniTransactionServiceAssembler().assemble( configModule );
- new JiniLookupServiceAssembler().assemble( configModule );
- new JiniJavaSpacesServiceAssembler().assemble( configModule );
- new JettyServiceAssembler().assemble( configModule );
- configModule.addServices( JavaSpacesClientService.class ).visibleIn( Visibility.layer ).instantiateOnStartup();
- configModule.addEntities( JavaSpacesClientConfiguration.class );
- configModule.addServices( MemoryEntityStoreService.class ).instantiateOnStartup();
- configModule.addServices( MemoryEntityStoreService.class,
- UuidIdentityGeneratorService.class );
- }
-
- @Override
- @After
- public void tearDown()
- throws Exception
- {
- super.tearDown();
- delete( new File( "qi4jtemp" ) );
- Thread.sleep( 1000 );
- }
-
- @Test
- @Override
- public void givenConcurrentUnitOfWorksWhenUoWCompletesThenCheckConcurrentModification()
- throws UnitOfWorkCompletionException
- {
- super.givenConcurrentUnitOfWorksWhenUoWCompletesThenCheckConcurrentModification();
- }
-
- private void delete( File dir )
- {
- File[] files = dir.listFiles();
- if( files == null )
- {
- return;
- }
- for( File file : files )
- {
- if( file.isDirectory() )
- {
- delete( file );
- }
- file.delete();
- }
- dir.delete();
- }
-
- @Test
- public void enableTests()
- {
- }
-
- public static class AllPolicy
- extends Policy
- {
-
- public AllPolicy()
- {
- }
-
- public PermissionCollection getPermissions( CodeSource codeSource )
- {
- Permissions allPermission;
- allPermission = new Permissions();
- allPermission.add( new AllPermission() );
- return allPermission;
- }
-
- public void refresh()
- {
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/test/java/org/qi4j/entitystore/javaspaces/JavaspacesTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/test/java/org/qi4j/entitystore/javaspaces/JavaspacesTest.java b/extensions/entitystore-javaspaces/src/test/java/org/qi4j/entitystore/javaspaces/JavaspacesTest.java
deleted file mode 100644
index 18c1ad1..0000000
--- a/extensions/entitystore-javaspaces/src/test/java/org/qi4j/entitystore/javaspaces/JavaspacesTest.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.entitystore.javaspaces;
-
-import java.io.IOException;
-import java.security.AllPermission;
-import java.security.CodeSource;
-import java.security.PermissionCollection;
-import java.security.Permissions;
-import java.security.Policy;
-import java.util.logging.FileHandler;
-import java.util.logging.Formatter;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.logging.SimpleFormatter;
-import net.jini.security.policy.DynamicPolicyProvider;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.qi4j.api.injection.scope.Service;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.entitystore.memory.MemoryEntityStoreService;
-import org.qi4j.library.http.JettyServiceAssembler;
-import org.qi4j.library.jini.javaspaces.JiniJavaSpacesServiceAssembler;
-import org.qi4j.library.jini.lookup.JiniLookupServiceAssembler;
-import org.qi4j.library.jini.transaction.JiniTransactionServiceAssembler;
-import org.qi4j.library.spaces.Space;
-import org.qi4j.library.spaces.javaspaces.JavaSpacesClientAssembler;
-import org.qi4j.test.AbstractQi4jTest;
-
-@Ignore( "Implementation is not working yet." )
-public class JavaspacesTest extends AbstractQi4jTest
-{
- private Space qi4jspace;
-
- static
- {
- Logger logger = Logger.getLogger( "" );
- Handler handler = null;
- try
- {
- handler = new FileHandler( "output.log" );
- Formatter formatter = new SimpleFormatter();
- handler.setFormatter( formatter );
- }
- catch( IOException e )
- {
- e.printStackTrace();
- }
- logger.addHandler( handler );
- logger.setLevel( Level.FINEST );
- }
-
- protected Space space()
- {
- if( qi4jspace == null )
- {
- qi4jspace = objectBuilderFactory.newObject( SpaceHolder.class ).getSpace();
- }
- return qi4jspace;
- }
-
- public void assemble( ModuleAssembly module )
- throws AssemblyException
- {
- if( System.getSecurityManager() == null )
- {
- Policy allPolicy = new TestPolicyAllPermissions();
- Policy.setPolicy( new DynamicPolicyProvider( allPolicy ) );
- System.setSecurityManager( new SecurityManager() );
- }
- new JiniLookupServiceAssembler().assemble( module );
- new JiniTransactionServiceAssembler().assemble( module );
- new JiniJavaSpacesServiceAssembler().assemble( module );
- new JettyServiceAssembler().assemble( module );
- module.addServices( MemoryEntityStoreService.class );
- new JavaSpacesClientAssembler().assemble( module );
- module.addObjects( SpaceHolder.class );
- }
-
- @Test
- public void dummyTest()
- {
- }
-
- public static class SpaceHolder
- {
- @Service private Space space;
-
- public Space getSpace()
- {
- synchronized( this )
- {
- int count = 1000;
- while( !space.isReady() && count > 0 )
- {
- try
- {
- wait( 5 );
- count--;
- }
- catch( InterruptedException e )
- {
- e.printStackTrace();
- }
- }
- if( !space.isReady() )
- {
- throw new RuntimeException( "Can not find the JavaSpace." );
- }
- }
- return space;
- }
- }
-
- public static class TestPolicyAllPermissions extends Policy
- {
- public PermissionCollection getPermissions( CodeSource codeSource )
- {
- Permissions permissions;
- permissions = new Permissions();
- permissions.add( new AllPermission() );
- return permissions;
- }
-
- public void refresh()
- {
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/test/resources/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreService.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/test/resources/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreService.properties b/extensions/entitystore-javaspaces/src/test/resources/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreService.properties
deleted file mode 100644
index 9c3e86b..0000000
--- a/extensions/entitystore-javaspaces/src/test/resources/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreService.properties
+++ /dev/null
@@ -1 +0,0 @@
-uri=/./Qi4jSpace?groups=qi4j
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/test/resources/org/qi4j/library/http/JettyService.properties
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/test/resources/org/qi4j/library/http/JettyService.properties b/extensions/entitystore-javaspaces/src/test/resources/org/qi4j/library/http/JettyService.properties
deleted file mode 100644
index 7a1adb8..0000000
--- a/extensions/entitystore-javaspaces/src/test/resources/org/qi4j/library/http/JettyService.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-port=8040
-hostName=127.0.0.1
-resourcePath=/
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/bootstrap/osgi.bundle
----------------------------------------------------------------------
diff --git a/extensions/osgi/bootstrap/osgi.bundle b/extensions/osgi/bootstrap/osgi.bundle
deleted file mode 100644
index a8bd9f6..0000000
--- a/extensions/osgi/bootstrap/osgi.bundle
+++ /dev/null
@@ -1,20 +0,0 @@
-Bundle-Activator: org.qi4j.osgi.bootstrap.Activator
-
-Private-Package: org.qi4j.osgi.bootstrap
-
-Ignore-Package: com_cenqua_clover
-
-Import-Package: org.osgi.framework, \
- org.qi4j.api.common, \
- org.qi4j.api.composite, \
- org.qi4j.api.entity, \
- org.qi4j.api.injection.scope, \
- org.qi4j.api.mixin, \
- org.qi4j.api.property, \
- org.qi4j.api.structure, \
- org.qi4j.bootstrap, \
- org.qi4j.entitystore.memory, \
- org.qi4j.spi.entitystore.helpers, \
- org.qi4j.spi.structure
-
-Export-Package:
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/bootstrap/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/osgi/bootstrap/pom.xml b/extensions/osgi/bootstrap/pom.xml
deleted file mode 100644
index f0430f3..0000000
--- a/extensions/osgi/bootstrap/pom.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.qi4j.osgi</groupId>
- <artifactId>org.qi4j.core.osgi-test</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.qi4j.osgi</groupId>
- <artifactId>qi4j-osgi-bootstrap</artifactId>
- <name>Qi4j Core - OSGi Bootstrap</name>
- <packaging>jar</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>1.2.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.bootstrap</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.spi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.runtime</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.swissbox</groupId>
- <artifactId>pax-swissbox-core</artifactId>
- <version>1.2.0</version>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.swissbox</groupId>
- <artifactId>pax-swissbox-extender</artifactId>
- <version>1.2.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>1.2.0</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/bootstrap/src/main/java/org/qi4j/osgi/bootstrap/Activator.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/bootstrap/src/main/java/org/qi4j/osgi/bootstrap/Activator.java b/extensions/osgi/bootstrap/src/main/java/org/qi4j/osgi/bootstrap/Activator.java
deleted file mode 100644
index 0b884b2..0000000
--- a/extensions/osgi/bootstrap/src/main/java/org/qi4j/osgi/bootstrap/Activator.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.osgi.bootstrap;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import org.ops4j.pax.swissbox.core.BundleClassLoader;
-import org.ops4j.pax.swissbox.extender.BundleObserver;
-import org.ops4j.pax.swissbox.extender.BundleURLScanner;
-import org.ops4j.pax.swissbox.extender.BundleWatcher;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.qi4j.bootstrap.internal.ServiceLoader;
-import org.qi4j.bootstrap.Qi4jRuntime;
-
-public final class Activator
- implements BundleActivator
-{
- private BundleWatcher<URL> urlBundleWatcher;
-
- public void start( BundleContext bundleContext )
- throws Exception
- {
- BundleURLScanner urlScanner =
- new BundleURLScanner( "META-INF/services", Qi4jRuntime.class.getName(), false );
- urlBundleWatcher = new BundleWatcher<URL>( bundleContext, urlScanner, new Qi4jBundleObserver() );
- urlBundleWatcher.start();
- }
-
- public void stop( BundleContext bundleContext )
- throws Exception
- {
- urlBundleWatcher.stop();
- }
-
- private static class Qi4jBundleObserver
- implements BundleObserver<URL>
- {
- private final HashMap<Bundle, ClassLoader> loaders;
-
- private Qi4jBundleObserver()
- {
- loaders = new HashMap<Bundle, ClassLoader>();
- }
-
- public void addingEntries( Bundle bundle, List<URL> entries )
- {
- BundleClassLoader classloader = new BundleClassLoader( bundle );
- ServiceLoader.addClassloader( classloader );
- loaders.put( bundle, classloader );
- }
-
- public void removingEntries( Bundle bundle, List<URL> entries )
- {
- ClassLoader classloader = loaders.get( bundle );
- ServiceLoader.removeClassloader( classloader );
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/example/osgi.bundle
----------------------------------------------------------------------
diff --git a/extensions/osgi/example/osgi.bundle b/extensions/osgi/example/osgi.bundle
deleted file mode 100644
index b4aaf84..0000000
--- a/extensions/osgi/example/osgi.bundle
+++ /dev/null
@@ -1,20 +0,0 @@
-Bundle-Activator: org.qi4j.core.test.osgi.internal.Activator
-
-Private-Package: org.qi4j.core.test.osgi.internal
-
-Ignore-Package: com_cenqua_clover
-
-Import-Package: org.osgi.framework, \
- org.qi4j.api.common, \
- org.qi4j.api.composite, \
- org.qi4j.api.entity, \
- org.qi4j.api.injection.scope, \
- org.qi4j.api.mixin, \
- org.qi4j.api.property, \
- org.qi4j.api.structure, \
- org.qi4j.bootstrap, \
- org.qi4j.entitystore.memory, \
- org.qi4j.spi.entitystore.helpers, \
- org.qi4j.spi.structure
-
-Export-Package: org.qi4j.core.test.osgi;version=${pom.version}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/example/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/osgi/example/pom.xml b/extensions/osgi/example/pom.xml
deleted file mode 100644
index 27aaf41..0000000
--- a/extensions/osgi/example/pom.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.qi4j.osgi</groupId>
- <artifactId>org.qi4j.core.osgi-test</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.qi4j.core.osgi</groupId>
- <artifactId>qi4j-osgi-example</artifactId>
- <name>Qi4j Core - OSGi Example</name>
- <packaging>jar</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>1.2.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.bootstrap</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.spi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.runtime</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>1.2.0</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/example/src/main/java/org/qi4j/osgi/AComposite.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/example/src/main/java/org/qi4j/osgi/AComposite.java b/extensions/osgi/example/src/main/java/org/qi4j/osgi/AComposite.java
deleted file mode 100644
index 4b24a83..0000000
--- a/extensions/osgi/example/src/main/java/org/qi4j/osgi/AComposite.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.qi4j.osgi;
-
-import org.qi4j.api.property.Property;
-import org.qi4j.api.common.Optional;
-
-public interface AComposite
-{
- @Optional Property<String> property();
-
- String sayValue();
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/example/src/main/java/org/qi4j/osgi/AnEntity.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/example/src/main/java/org/qi4j/osgi/AnEntity.java b/extensions/osgi/example/src/main/java/org/qi4j/osgi/AnEntity.java
deleted file mode 100644
index acc7aab..0000000
--- a/extensions/osgi/example/src/main/java/org/qi4j/osgi/AnEntity.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright 2008 Edward Yakop.
-*
-* Licensed 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 org.qi4j.osgi;
-
-import org.qi4j.api.property.Property;
-import org.qi4j.api.common.Optional;
-
-public interface AnEntity
-{
- @Optional Property<String> property();
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/APrivateComposite.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/APrivateComposite.java b/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/APrivateComposite.java
deleted file mode 100644
index a394166..0000000
--- a/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/APrivateComposite.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright 2008 Edward Yakop.
-*
-* Licensed 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 org.qi4j.osgi.internal;
-
-import org.qi4j.api.composite.Composite;
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.core.test.osgi.AComposite;
-import org.qi4j.api.injection.scope.This;
-
-@Mixins( APrivateComposite.ACompositeMixin.class )
-interface APrivateComposite extends AComposite, Composite
-{
- abstract class ACompositeMixin
- implements AComposite
- {
- @This private AComposite me;
-
- public final String sayValue()
- {
- return "Saying: " + me.property().get();
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/Activator.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/Activator.java b/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/Activator.java
deleted file mode 100644
index 30add70..0000000
--- a/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/Activator.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman. All rights Reserved.
- *
- * Licensed 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 org.qi4j.osgi.internal;
-
-import java.util.Hashtable;
-import java.util.logging.Logger;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.qi4j.api.structure.Module;
-import org.qi4j.bootstrap.ApplicationAssembler;
-import org.qi4j.bootstrap.ApplicationAssembly;
-import org.qi4j.bootstrap.ApplicationAssemblyFactory;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.Energy4Java;
-import org.qi4j.bootstrap.LayerAssembly;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.entitystore.memory.MemoryEntityStoreService;
-import org.qi4j.spi.entity.helpers.UuidIdentityGeneratorService;
-import org.qi4j.spi.structure.ApplicationSPI;
-
-public final class Activator
- implements BundleActivator
-{
- private static final Logger LOGGER = Logger.getLogger( Activator.class.getName() );
-
- private static final String MODULE_NAME = "Single Module.";
- private static final String LAYER_NAME = "Single Layer.";
-
- private ApplicationSPI application;
- private ServiceRegistration moduleRegistration;
-
- public void start( BundleContext bundleContext )
- throws Exception
- {
- LOGGER.info( "Starting Bundle [" + bundleContext.getBundle().getSymbolicName() + "]" );
-
- Energy4Java boot = new Energy4Java();
- ApplicationAssembler assembler = new MyApplicationAssembler();
- application = boot.newApplication( assembler );
-
- LOGGER.info( "Activating application." );
- application.activate();
-
- Module module = application.findModule( LAYER_NAME, MODULE_NAME );
- LOGGER.info( "Find module [" + LAYER_NAME + ", " + MODULE_NAME + "] isFound [" + ( module != null ) + "]" );
-
- moduleRegistration = bundleContext.registerService( Module.class.getName(), module, new Hashtable() );
- LOGGER.info( "Module registered." );
- }
-
- public void stop( BundleContext bundleContext )
- throws Exception
- {
- moduleRegistration.unregister();
- application.passivate();
-
- moduleRegistration = null;
- application = null;
- }
-
-
- private static class MyApplicationAssembler
- implements ApplicationAssembler
- {
- public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
- throws AssemblyException
- {
- ApplicationAssembly applicationAssembly = applicationFactory.newApplicationAssembly();
- LayerAssembly layerAssembly = applicationAssembly.newLayerAssembly( LAYER_NAME );
- ModuleAssembly moduleAssembly = layerAssembly.newModuleAssembly( MODULE_NAME );
-
- moduleAssembly.addComposites( APrivateComposite.class );
- moduleAssembly.addEntities( AnEntityComposite.class );
- moduleAssembly.addServices( MemoryEntityStoreService.class );
- moduleAssembly.addServices( UuidIdentityGeneratorService.class );
-
- return applicationAssembly;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/AnEntityComposite.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/AnEntityComposite.java b/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/AnEntityComposite.java
deleted file mode 100644
index 1b5fdf7..0000000
--- a/extensions/osgi/example/src/main/java/org/qi4j/osgi/internal/AnEntityComposite.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright 2008 Edward Yakop.
-*
-* Licensed 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 org.qi4j.osgi.internal;
-
-import org.qi4j.core.test.osgi.AnEntity;
-import org.qi4j.api.entity.EntityComposite;
-
-interface AnEntityComposite extends AnEntity, EntityComposite
-{
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/example/test.bundles
----------------------------------------------------------------------
diff --git a/extensions/osgi/example/test.bundles b/extensions/osgi/example/test.bundles
deleted file mode 100644
index 030ecbb..0000000
--- a/extensions/osgi/example/test.bundles
+++ /dev/null
@@ -1,12 +0,0 @@
-mvn:net.sourceforge.cglib/com.springsource.net.sf.cglib/2.1.3
-mvn:org.ops4j.pax.logging/pax-logging-api
-mvn:org.ops4j.pax.logging/pax-logging-service
-mvn:org.qi4j.core/qi4j-core-api@update
-mvn:org.qi4j.core/qi4j-core-spi@update
-mvn:org.qi4j.core/qi4j-core-runtime@update
-mvn:org.qi4j.core/qi4j-core-bootstrap@update
-mvn:org.qi4j.core.osgi/qi4j-osgi-example@update
-mvn:org.ops4j.pax.swissbox/pax-swissbox-extender
-mvn:org.ops4j.pax.swissbox/pax-swissbox-core
-mvn:org.ops4j.base/ops4j-base-lang
-mvn:org.ops4j.pax.swissbox/pax-swissbox-lifecycle
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/integrationTests/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/osgi/integrationTests/pom.xml b/extensions/osgi/integrationTests/pom.xml
deleted file mode 100644
index c7b0d5c..0000000
--- a/extensions/osgi/integrationTests/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.qi4j.osgi</groupId>
- <artifactId>org.qi4j.core.osgi-test</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>org.qi4j.core.osgi</groupId>
- <artifactId>qi4j-osgi-integrationTests</artifactId>
- <name>Qi4j Core - OSGi integration test</name>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>version.qi4j</name>
- <value>${pom.version}</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core.osgi</groupId>
- <artifactId>qi4j-osgi-example</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.logging</groupId>
- <artifactId>pax-logging-api</artifactId>
- <version>1.1.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.core</artifactId>
- <version>1.2.0</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/AbstractTest.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/AbstractTest.java b/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/AbstractTest.java
deleted file mode 100644
index c88830c..0000000
--- a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/AbstractTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Copyright 2008 Edward Yakop.
-*
-* Licensed 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 org.qi4j.osgi.test;
-
-import java.util.logging.Logger;
-import static org.junit.Assert.assertNotNull;
-import org.junit.runner.RunWith;
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
-import static org.ops4j.pax.exam.CoreOptions.systemProperty;
-import org.ops4j.pax.exam.Option;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.logProfile;
-import org.ops4j.pax.exam.junit.Configuration;
-import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.qi4j.api.structure.Module;
-
-@RunWith( JUnit4TestRunner.class )
-public abstract class AbstractTest
-{
- private final Logger LOGGER = Logger.getLogger( getClass().getName() );
-
- private static final String SYMBOLIC_NAME_QI4J_EXAMPLE = "org.qi4j.core.osgi.qi4j-osgi-example";
-
- @Configuration
- public final Option[] configure()
- {
- return options(
- logProfile(),
- // this is how you set the default log level when using pax logging (logProfile)
- systemProperty( "org.ops4j.pax.logging.DefaultServiceLog.level" ).value( "INFO" )
- );
- }
-
- @Configuration
- public final Option[] baseProvision()
- {
- String qi4jVersion = System.getProperty( "version.qi4j", "1.0" );
-
- return options( provision(
- "mvn:org.ops4j.pax.logging/pax-logging-api@2",
- "mvn:org.ops4j.pax.logging/pax-logging-service@2",
- "mvn:org.qi4j.core/qi4j-core-api/" + qi4jVersion + "@2",
- "mvn:org.qi4j.core/qi4j-core-spi/" + qi4jVersion + "@2",
- "mvn:org.ops4j.base/ops4j-base-lang@2",
- "mvn:org.ops4j.pax.swissbox/pax-swissbox-extender@2",
- "mvn:org.ops4j.pax.swissbox/pax-swissbox-core@2",
- "mvn:org.ops4j.pax.swissbox/pax-swissbox-lifecycle@2",
- "mvn:org.qi4j.core/qi4j-core-bootstrap/" + qi4jVersion + "@2",
- "mvn:org.qi4j.core/qi4j-core-runtime/" + qi4jVersion + "@3",
- "mvn:org.qi4j.core.osgi/qi4j-osgi-example/" + qi4jVersion + "@4"
- ) );
- }
-
- protected final Bundle getQi4jExampleBundle( BundleContext bundleContext )
- {
- Bundle exampleBundle = null;
- Bundle[] bundles = bundleContext.getBundles();
- for( Bundle bundle : bundles )
- {
- String symbolicName = bundle.getSymbolicName();
- if( SYMBOLIC_NAME_QI4J_EXAMPLE.equals( symbolicName ) )
- {
- exampleBundle = bundle;
- break;
- }
- }
-
- assertNotNull( exampleBundle );
- return exampleBundle;
- }
-
- protected final ServiceReference getModuleServiceRef( BundleContext bundleContext )
- {
- return bundleContext.getServiceReference( Module.class.getName() );
- }
-
- protected final void printBundleDetails( BundleContext bundleContext )
- {
- Bundle[] bundles = bundleContext.getBundles();
- for( Bundle bundle : bundles )
- {
- LOGGER.info( "Bundle [" + bundle.getSymbolicName() + "] State [" + bundle.getState() + "]" );
-
- LOGGER.info( "Exported Services: " );
- ServiceReference[] registeredServices = bundle.getRegisteredServices();
- if( registeredServices == null || registeredServices.length == 0 )
- {
- LOGGER.info( "none" );
- }
- else
- {
- for( ServiceReference registeredService : registeredServices )
- {
- LOGGER.info( registeredService.toString() );
- }
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/BundleLifecycleTest.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/BundleLifecycleTest.java b/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/BundleLifecycleTest.java
deleted file mode 100644
index 77de18c..0000000
--- a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/BundleLifecycleTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright 2008 Edward Yakop.
- *
- * Licensed 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 org.qi4j.osgi.test;
-
-import java.util.logging.Logger;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import org.junit.Test;
-import org.ops4j.pax.exam.Inject;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceReference;
-
-public class BundleLifecycleTest extends AbstractTest
-{
-
- @Inject
- private BundleContext bundleContext;
-
- @Test
- public final void testLifecycle()
- throws BundleException
- {
-// printBundleDetails( bundleContext );
-
- assertNotNull( getModuleServiceRef( bundleContext ) );
-
- Bundle exampleBundle = getQi4jExampleBundle( bundleContext );
- exampleBundle.stop();
-
- assertNull( getModuleServiceRef( bundleContext ) );
-
- exampleBundle.start();
-
- assertNotNull( getModuleServiceRef( bundleContext ) );
- }
-
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/BundleLifecycleWithCglibTest.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/BundleLifecycleWithCglibTest.java b/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/BundleLifecycleWithCglibTest.java
deleted file mode 100644
index 5f92ad0..0000000
--- a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/BundleLifecycleWithCglibTest.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.qi4j.osgi.test;
-
-import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.Configuration;
-
-public final class BundleLifecycleWithCglibTest extends BundleLifecycleTest
-{
- @Configuration
- public final Option[] cglibProvision()
- {
- String cglibVersion = System.getProperty( "version.cglib", "2.2" );
- return options(
- provision( "mvn:cglib/cglib-nodep/" + cglibVersion )
- );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/CompositeTest.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/CompositeTest.java b/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/CompositeTest.java
deleted file mode 100644
index ea58f9d..0000000
--- a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/CompositeTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Copyright 2008 Edward Yakop.
-*
-* Licensed 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 org.qi4j.osgi.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import org.junit.Test;
-import org.ops4j.pax.exam.Inject;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.qi4j.api.composite.TransientBuilderFactory;
-import org.qi4j.api.property.Property;
-import org.qi4j.api.structure.Module;
-import org.qi4j.core.test.osgi.AComposite;
-
-public final class CompositeTest extends AbstractTest
-{
- @Inject
- private BundleContext bundleContext;
-
- @Test
- public final void testCreational()
- {
- ServiceReference moduleServiceRef = getModuleServiceRef( bundleContext );
- assertNotNull( moduleServiceRef );
-
- Module module = (Module) bundleContext.getService( moduleServiceRef );
- assertNotNull( module );
-
- TransientBuilderFactory factory = module.transientBuilderFactory();
- AComposite composite = factory.newTransient( AComposite.class );
- assertNotNull( composite );
-
- Property<String> property = composite.property();
- assertNotNull( property );
-
- assertNull( property.get() );
- property.set( "abc" );
- assertEquals( "abc", property.get() );
-
- // Clean up
- bundleContext.ungetService( moduleServiceRef );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/EntityTest.java
----------------------------------------------------------------------
diff --git a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/EntityTest.java b/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/EntityTest.java
deleted file mode 100644
index 633ab56..0000000
--- a/extensions/osgi/integrationTests/src/test/java/org/qi4j/osgi/test/EntityTest.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/* Copyright 2008 Edward Yakop.
-*
-* Licensed 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 org.qi4j.osgi.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-import org.junit.Test;
-import org.ops4j.pax.exam.Inject;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.qi4j.api.entity.Identity;
-import org.qi4j.api.property.Property;
-import org.qi4j.api.structure.Module;
-import org.qi4j.api.unitofwork.NoSuchEntityException;
-import org.qi4j.api.unitofwork.UnitOfWork;
-import org.qi4j.api.unitofwork.UnitOfWorkCompletionException;
-import org.qi4j.api.unitofwork.UnitOfWorkFactory;
-import org.qi4j.core.test.osgi.AnEntity;
-
-public final class EntityTest extends AbstractTest
-{
- @Inject
- private BundleContext bundleContext;
-
- private UnitOfWorkFactory getUnitOfWorkFactory( ServiceReference moduleRef )
- {
- assertNotNull( moduleRef );
-
- Module module = (Module) bundleContext.getService( moduleRef );
- assertNotNull( module );
-
- return module.unitOfWorkFactory();
- }
-
- private String createNewEntity( UnitOfWorkFactory uowf )
- throws UnitOfWorkCompletionException
- {
- UnitOfWork uow = uowf.newUnitOfWork();
- AnEntity entity = uow.newEntity( AnEntity.class );
- assertNotNull( entity );
-
- String identity = ( (Identity) entity ).identity().get();
-
- Property<String> property = entity.property();
- assertNotNull( property );
-
- assertNull( property.get() );
- property.set( "abc" );
- assertEquals( "abc", property.get() );
-
- uow.complete();
-
- return identity;
- }
-
- @Test
- public final void testCRUD()
- throws Throwable
- {
- ServiceReference moduleRef = getModuleServiceRef( bundleContext );
- UnitOfWorkFactory uowf = getUnitOfWorkFactory( moduleRef );
-
- // Test creational
- String identity = createNewEntity( uowf );
-
- // Test retrieval
- UnitOfWork work = uowf.newUnitOfWork();
- AnEntity entity = work.get(AnEntity.class, identity);
- assertNotNull( entity );
-
- // Test update
- String newPropValue = entity.property().get() + "a";
- entity.property().set( newPropValue );
- work.complete();
-
- work = uowf.newUnitOfWork();
- entity = work.get(AnEntity.class, identity);
- assertNotNull( entity );
- assertEquals( newPropValue, entity.property().get() );
- work.complete();
-
- // Test removal
- work = uowf.newUnitOfWork();
- entity = work.get(AnEntity.class, identity);
- assertNotNull( entity );
- work.remove( entity );
- work.complete();
-
- // Commented out: The odd thing is, removal fails here.
- work = uowf.newUnitOfWork();
- try
- {
- entity = work.get(AnEntity.class, identity);
- fail( "Test removal fail. [" + ( entity == null ) + "] identity [" + identity + "]" );
- }
- catch( NoSuchEntityException e )
- {
- // Expected
- }
- work.complete();
-
- // Clean up
- bundleContext.ungetService( moduleRef );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/osgi/pom.xml b/extensions/osgi/pom.xml
deleted file mode 100644
index 27d9e83..0000000
--- a/extensions/osgi/pom.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.qi4j.sandbox</groupId>
- <artifactId>qi4j-sandbox-extensions</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <groupId>org.qi4j.osgi</groupId>
- <artifactId>org.qi4j.core.osgi-test</artifactId>
- <name>Qi4j OSGi (Build POM)</name>
- <packaging>pom</packaging>
-
- <properties>
- <version.pax.swissbox>1.2.0</version.pax.swissbox>
- <version.pax.exam>1.2.0</version.pax.exam>
- <version.pax.logging>1.4</version.pax.logging>
- </properties>
-
- <modules>
- <module>bootstrap</module>
- <module>testBootstrap</module>
- <module>example</module>
- <module>integrationTests</module>
- </modules>
-
- <!-- This POM is ONLY to initiate the modules to be built. -->
- <developers>
- <developer>
- <id>niclas</id>
- <name>Niclas Hedhman</name>
- <email>niclas@codedragons.com</email>
- <url>http://www.codedragons.com</url>
- <organization>CodeDragons Malaysia Sdn Bhd</organization>
- <organizationUrl>http://www.codedragons.com</organizationUrl>
- <roles>
- <role>ReleaseManager</role>
- <role>Developer</role>
- </roles>
- <timezone>UTC+8</timezone>
- </developer>
- <developer>
- <id>rickard</id>
- <name>Rickard Öberg</name>
- <email>rickard.oberg@jayway.se</email>
- <url>http://www.jayway.se</url>
- <organization>Jayway</organization>
- <organizationUrl>http://www.jayway.se</organizationUrl>
- <roles>
- <role>Innovator</role>
- <role>Developer</role>
- </roles>
- <timezone>UTC+1</timezone>
- </developer>
- <developer>
- <id>efy</id>
- <name>Edward Yakop</name>
- <email>efy@codedragons.com</email>
- <url>http://www.codedragons.com</url>
- <organization>CodeDragons Malaysia Sdn Bhd</organization>
- <organizationUrl>http://www.codedragons.com</organizationUrl>
- <roles>
- <role>Developer</role>
- </roles>
- <timezone>UTC+8</timezone>
- </developer>
- <developer>
- <id>adreghiciu</id>
- <name>Alin Dreghiciu</name>
- <email>adreghiciu@codedragons.com</email>
- <url>http://www.codedragons.com</url>
- <organization>CodeDragons Malaysia Sdn Bhd</organization>
- <organizationUrl>http://www.codedragons.com</organizationUrl>
- <roles>
- <role>Developer</role>
- </roles>
- <timezone>UTC+2</timezone>
- </developer>
- <developer>
- <id>mesirii</id>
- <name>Michael Hunger</name>
- <roles>
- <role>Developer</role>
- </roles>
- <timezone>UTC+1</timezone>
- </developer>
- </developers>
-
- <dependencies>
- <!-- Pax exam -->
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam</artifactId>
- <version>${version.pax.exam}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit</artifactId>
- <version>${version.pax.exam}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-default</artifactId>
- <version>${version.pax.exam}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.ops4j.pax.swissbox</groupId>
- <artifactId>pax-swissbox-core</artifactId>
- <version>${version.pax.swissbox}</version>
- <scope>provided</scope>
- </dependency>
-
- </dependencies>
- </dependencyManagement>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/osgi/testBootstrap/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/osgi/testBootstrap/pom.xml b/extensions/osgi/testBootstrap/pom.xml
deleted file mode 100644
index 8624870..0000000
--- a/extensions/osgi/testBootstrap/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.qi4j.osgi</groupId>
- <artifactId>org.qi4j.core.osgi-test</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.qi4j.core.osgi</groupId>
- <artifactId>org.qi4j.core.osgi-test-bootstrap</artifactId>
-
- <name>Qi4j Core - OSGi Bootstrap tests</name>
-
- <dependencies>
- <!-- bootstrap -->
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib-nodep</artifactId>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.logging</groupId>
- <artifactId>pax-logging-api</artifactId>
- <version>${version.pax.logging}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.logging</groupId>
- <artifactId>pax-logging-service</artifactId>
- <version>${version.pax.logging}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ops4j.base</groupId>
- <artifactId>ops4j-base-lang</artifactId>
- <version>1.2.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.ops4j.pax.swissbox</groupId>
- <artifactId>pax-swissbox-core</artifactId>
- <version>${version.pax.swissbox}</version>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.swissbox</groupId>
- <artifactId>pax-swissbox-extender</artifactId>
- <version>${version.pax.swissbox}</version>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.swissbox</groupId>
- <artifactId>pax-swissbox-lifecycle</artifactId>
- <version>${version.pax.swissbox}</version>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 1abe46f..7093373 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -18,20 +18,8 @@
<module>entitystore-s3</module>
<module>entitystore-swift</module>
- <!-- Used coherence version not in any public repository.
- Unable to make it compile against coherence-incubator.
+ <!-- Coherence needs a manual installation
<module>entitystore-coherence</module> -->
- <!-- See libraries/jini in sandbox
- <module>entitystore-javaspaces</module> -->
-
- <!-- Unable to make it compile.
- Plus `library/osgi` is already part of the SDK since 2.0.
- <module>osgi</module> -->
-
- <!-- There are two implementations.
- See the `gigaspaces_impl` branch of this repository
- <module>entitstore-gigaspaces/qi4j-entitystore-gs-sample</module> -->
-
</modules>
</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/common/dev-status.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/common/dev-status.xml b/libraries/jini/common/dev-status.xml
deleted file mode 100644
index dc92d29..0000000
--- a/libraries/jini/common/dev-status.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1">
- <status>
- <codebase>early</codebase>
- <!--none,early,beta,stable,mature-->
- <documentation>brief</documentation>
- <!-- none, brief, good, complete -->
- <unittests>some</unittests>
- <!-- none, some, good, complete -->
- </status>
- <licenses>
- <license>ALv2</license>
- </licenses>
-</module>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/common/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/common/pom.xml b/libraries/jini/common/pom.xml
deleted file mode 100644
index 24e23a3..0000000
--- a/libraries/jini/common/pom.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-common</artifactId>
-</project>
[2/4] zest-sandbox git commit: Cleanup Zest Sandbox - Remove dead
projects
Posted by pa...@apache.org.
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/pom.xml b/libraries/jini/importer/pom.xml
deleted file mode 100644
index 4bc0aac..0000000
--- a/libraries/jini/importer/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-importer</artifactId>
- <name>Qi4j Library - Jini Services Importer</name>
-
- <dependencies>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.testsupport</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.runtime</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.bootstrap</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library</groupId>
- <artifactId>org.qi4j.library.observations</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-core</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-ext</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jsk-lib</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.wonderly</groupId>
- <artifactId>startnow</artifactId>
- <version>1.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniImporter.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniImporter.java b/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniImporter.java
deleted file mode 100644
index 5fba734..0000000
--- a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniImporter.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer;
-
-import org.qi4j.api.common.Optional;
-import org.qi4j.api.injection.scope.Service;
-import org.qi4j.api.service.ImportedServiceDescriptor;
-import org.qi4j.api.service.ServiceImporter;
-import org.qi4j.api.service.ServiceImporterException;
-
-import java.io.IOException;
-import java.lang.reflect.Proxy;
-
-public class JiniImporter
- implements ServiceImporter
-{
- @Optional @Service private JiniStatusService statusService;
-
- /**
- * Import a service from Jini by looking creating a Proxy which holds the Lookup cache to the wanted Jini service.
- *
- * @param serviceDescriptor The service descriptor.
- * @return a service instance
- * @throws ServiceImporterException
- */
-
- public Object importService( ImportedServiceDescriptor serviceDescriptor )
- throws ServiceImporterException
- {
- final Class<?> serviceType = serviceDescriptor.type();
- JiniProxyHandler handler;
- try
- {
- handler = new JiniProxyHandler( serviceType, statusService );
- }
- catch( IOException e )
- {
- throw new ServiceImporterException( "Unable to establish network.", e );
- }
- Class[] type = new Class[]{ serviceType };
- return Proxy.newProxyInstance( JiniImporter.class.getClassLoader(), type, handler );
- }
-
- public boolean isActive( Object instance )
- {
- JiniProxyHandler jiniHandler = (JiniProxyHandler) Proxy.getInvocationHandler( instance );
- return jiniHandler.isActive();
- }
-
- public boolean isAvailable( Object instance )
- {
- JiniProxyHandler jiniHandler = (JiniProxyHandler) Proxy.getInvocationHandler( instance );
- return jiniHandler.isActive();
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniProxyHandler.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniProxyHandler.java b/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniProxyHandler.java
deleted file mode 100644
index d0cf194..0000000
--- a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniProxyHandler.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer;
-
-import net.jini.core.entry.Entry;
-import net.jini.core.lookup.ServiceID;
-import net.jini.core.lookup.ServiceItem;
-import net.jini.core.lookup.ServiceTemplate;
-import net.jini.discovery.DiscoveryManagement;
-import net.jini.lease.LeaseRenewalManager;
-import net.jini.lookup.*;
-import org.qi4j.api.service.ServiceImporterException;
-
-import java.io.IOException;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-
-public class JiniProxyHandler
- implements InvocationHandler, ServiceDiscoveryListener
-{
- private JiniStatusService statusService;
- private LookupCache lookupCache;
- private Object jiniService;
-
- JiniProxyHandler( Class serviceType, JiniStatusService statusService )
- throws IOException
- {
- this.statusService = statusService;
- LeaseRenewalManager leaseRenewal = null;
- DiscoveryManagement discoveryManagement = null;
- ServiceDiscoveryManager sdm = new ServiceDiscoveryManager( discoveryManagement, leaseRenewal );
- ServiceItemFilter filter = null;
- Entry[] entries = null; // Lookup all, regardless of entries.
- ServiceID serviceId = null; // Lookup all, regardless of serviceId.
- Class[] type = new Class[]{ serviceType };
- ServiceTemplate template = new ServiceTemplate( serviceId, type, entries );
- lookupCache = sdm.createLookupCache( template, filter, this );
- lookupCache.addListener( this );
- }
-
- public Object invoke( Object o, Method method, Object[] args )
- throws Throwable
- {
- synchronized( this )
- {
- if( jiniService == null )
- {
- ServiceItem item = lookupCache.lookup( null );
- if( item == null )
- {
- throw new ServiceImporterException( "Jini service currently not available" );
- }
- jiniService = item.service;
-
- if( jiniService == null )
- {
- throw new ServiceImporterException( "Jini service currently not available" );
- }
- }
-
- return method.invoke( jiniService, args );
- }
- }
-
- public synchronized boolean isActive()
- {
- return jiniService != null;
- }
-
- public void serviceAdded( ServiceDiscoveryEvent serviceDiscoveryEvent )
- {
- synchronized( this )
- {
- ServiceItem item = serviceDiscoveryEvent.getPostEventServiceItem();
- jiniService = item.service;
- }
- if( statusService != null )
- {
- statusService.serviceAdded( serviceDiscoveryEvent );
- }
- }
-
- public void serviceRemoved( ServiceDiscoveryEvent serviceDiscoveryEvent )
- {
- synchronized( this )
- {
- ServiceItem item = serviceDiscoveryEvent.getPostEventServiceItem();
- if( item.service.equals( jiniService ) )
- {
- jiniService = null;
- }
- }
- if( statusService != null )
- {
- statusService.serviceRemoved( serviceDiscoveryEvent );
- }
- }
-
- public void serviceChanged( ServiceDiscoveryEvent serviceDiscoveryEvent )
- {
- if( statusService != null )
- {
- statusService.serviceChanged( serviceDiscoveryEvent );
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniServiceObservation.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniServiceObservation.java b/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniServiceObservation.java
deleted file mode 100644
index d03353d..0000000
--- a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniServiceObservation.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer;
-
-import org.qi4j.api.property.Property;
-import org.qi4j.library.observations.Observation;
-
-public interface JiniServiceObservation extends Observation
-{
- Property<String> serviceId();
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatus.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatus.java b/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatus.java
deleted file mode 100644
index 57448fa..0000000
--- a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatus.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer;
-
-import net.jini.core.lookup.ServiceID;
-
-public interface JiniStatus
-{
- boolean isAvailable( ServiceID service );
-
- boolean isAvailable( Class type );
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatusMixin.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatusMixin.java b/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatusMixin.java
deleted file mode 100644
index cf0d3b7..0000000
--- a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatusMixin.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer;
-
-import net.jini.core.lookup.ServiceID;
-import net.jini.core.lookup.ServiceItem;
-import net.jini.lookup.ServiceDiscoveryEvent;
-import net.jini.lookup.ServiceDiscoveryListener;
-import org.qi4j.api.injection.scope.This;
-import org.qi4j.library.observations.Observable;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.WeakHashMap;
-
-public class JiniStatusMixin
- implements JiniStatus, ServiceDiscoveryListener
-{
- @This Observable<JiniServiceObservation> observable;
-
- private WeakHashMap<ServiceID, Object> serviceIds;
- private WeakHashMap<Class, Set<Object>> services;
-
- public JiniStatusMixin()
- {
- services = new WeakHashMap<Class, Set<Object>>();
- serviceIds = new WeakHashMap<ServiceID, Object>();
- }
-
- public boolean isAvailable( ServiceID service )
- {
- return serviceIds.containsKey( service );
- }
-
- public boolean isAvailable( Class type )
- {
- return services.containsKey( type );
- }
-
- public void serviceAdded( ServiceDiscoveryEvent serviceDiscoveryEvent )
- {
- ServiceItem item = serviceDiscoveryEvent.getPostEventServiceItem();
- Object service = item.service;
- Class[] types = item.service.getClass().getClasses();
- ServiceID id = item.serviceID;
- serviceIds.put( id, service );
- for( Class type : types )
- {
- Set<Object> set = services.get( type );
- if( set == null )
- {
- set = new HashSet<Object>();
- services.put( type, set );
- }
- set.add( service );
- }
- }
-
- public void serviceRemoved( ServiceDiscoveryEvent serviceDiscoveryEvent )
- {
- ServiceItem item = serviceDiscoveryEvent.getPreEventServiceItem();
- Object service = item.service;
- Class[] types = item.service.getClass().getClasses();
- ServiceID id = item.serviceID;
- serviceIds.remove( id );
- for( Class type : types )
- {
- Set<Object> set = services.get( type );
- if( set != null )
- {
- set.remove( service );
- if( set.size() == 0 )
- {
- services.remove( type );
- }
- }
- }
- }
-
- public void serviceChanged( ServiceDiscoveryEvent serviceDiscoveryEvent )
- {
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatusService.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatusService.java b/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatusService.java
deleted file mode 100644
index fb8652f..0000000
--- a/libraries/jini/importer/src/main/java/org/qi4j/library/jini/importer/JiniStatusService.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer;
-
-import net.jini.lookup.ServiceDiscoveryListener;
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.ServiceComposite;
-import org.qi4j.library.observations.Observable;
-
-@Mixins( { JiniStatusMixin.class } )
-public interface JiniStatusService
- extends JiniStatus, ServiceDiscoveryListener, Observable<JiniServiceObservation>, ServiceComposite
-{
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/ImportExternalJiniServiceTest.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/ImportExternalJiniServiceTest.java b/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/ImportExternalJiniServiceTest.java
deleted file mode 100644
index 37267e4..0000000
--- a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/ImportExternalJiniServiceTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.qi4j.api.service.ServiceFinder;
-import org.qi4j.api.service.ServiceReference;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.bootstrap.SingletonAssembler;
-import org.qi4j.library.jini.importer.org.qi4j.library.jini.tests.InterpreterService;
-
-import java.io.IOException;
-import java.util.Iterator;
-
-/**
- * This testcase starts an external non-Qi4j, Jini application and then makes sure that such Jini service will appear
- * as a Qi4j service via the ServiceImporter mechanism.
- */
-public class ImportExternalJiniServiceTest
-{
- private Process process;
-
- @Ignore( "Doesn't seem to work right now" )
- @Test
- public void givenExternalJiniServicePresentInitiallyWhenQi4jApplicationStartsExpectServiceToBeImported()
- throws IOException, InterruptedException
- {
- startExternalJiniService();
-
- SingletonAssembler assembler = new SingletonAssembler()
- {
- public void assemble( ModuleAssembly module ) throws AssemblyException
- {
- module.importedServices( InterpreterService.class ).importedBy( JiniImporter.class );
- }
- };
- final ServiceFinder finder = assembler.serviceFinder();
- final Iterable<ServiceReference<InterpreterService>> iterable = finder.findServices( InterpreterService.class );
- final Iterator<ServiceReference<InterpreterService>> iterator = iterable.iterator();
- final String serviceName = InterpreterService.class.getName();
- assertTrue( "Service proxy not found: " + serviceName, iterator.hasNext() );
-// assertTrue( "Service is not active: " + serviceName, iterator.next().isActive() );
- InterpreterService service = iterator.next().get();
- service.push( 123 );
- service.push( 321 );
- service.addition();
- assertEquals( 444, (int) service.popLong() );
- shutdownExternalJiniService();
- }
-
- private void startExternalJiniService()
- throws IOException
- {
- String[] args = { "org.qi4j.library.jini.tests.Main" };
- process = Runtime.getRuntime().exec( "java", args );
- }
-
- private void shutdownExternalJiniService()
- throws IOException, InterruptedException
- {
- process.destroy();
- process.waitFor();
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/IllegalExpressionException.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/IllegalExpressionException.java b/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/IllegalExpressionException.java
deleted file mode 100644
index b1561f2..0000000
--- a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/IllegalExpressionException.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer.org.qi4j.library.jini.tests;
-
-public class IllegalExpressionException extends RuntimeException
-{
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/InterpreterService.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/InterpreterService.java b/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/InterpreterService.java
deleted file mode 100644
index d5781ee..0000000
--- a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/InterpreterService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer.org.qi4j.library.jini.tests;
-
-public interface InterpreterService
-{
- void push( long value );
-
- void push( double value );
-
- long popLong();
-
- double popDouble();
-
- void addition();
-
- void subtraction();
-
- void multiplication();
-
- void division();
-
- void modulo();
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/InterpreterServiceImpl.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/InterpreterServiceImpl.java b/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/InterpreterServiceImpl.java
deleted file mode 100644
index feb710f..0000000
--- a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/InterpreterServiceImpl.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer.org.qi4j.library.jini.tests;
-
-import net.jini.config.ConfigurationException;
-import org.wonderly.jini2.PersistentJiniService;
-
-import java.io.IOException;
-import java.util.Stack;
-
-public class InterpreterServiceImpl extends PersistentJiniService
- implements InterpreterService
-{
- private Stack<Entry> stack = new Stack<Entry>();
-
- public InterpreterServiceImpl( String[] arguments )
- throws IOException, ConfigurationException
- {
- super( arguments );
- }
-
- public void push( long value )
- {
- stack.push( new Entry( value ) );
- }
-
- public void push( double value )
- {
- stack.push( new Entry( value ) );
- }
-
- public long popLong()
- {
- Entry entry = stack.pop();
- return entry.value.longValue();
- }
-
- public double popDouble()
- {
- Entry entry = stack.pop();
- return entry.value.doubleValue();
- }
-
- public void addition()
- {
- Entry entry1 = stack.pop();
- Entry entry2 = stack.pop();
- if( entry1.type == EntryType.llong )
- {
- if( entry2.type != EntryType.llong )
- {
- throw new IllegalExpressionException();
- }
- final long result = entry2.value.longValue() + entry1.value.longValue();
- stack.push( new Entry( result ) );
- }
- else
- {
- if( entry2.type != EntryType.ddouble )
- {
- throw new IllegalExpressionException();
- }
- final double result = entry2.value.doubleValue() + entry1.value.doubleValue();
- stack.push( new Entry( result ) );
- }
- }
-
- public void subtraction()
- {
- Entry entry1 = stack.pop();
- Entry entry2 = stack.pop();
- if( entry1.type == EntryType.llong )
- {
- if( entry2.type != EntryType.llong )
- {
- throw new IllegalExpressionException();
- }
- final long result = entry2.value.longValue() - entry1.value.longValue();
- stack.push( new Entry( result ) );
- }
- else
- {
- if( entry2.type != EntryType.ddouble )
- {
- throw new IllegalExpressionException();
- }
- final double result = entry2.value.doubleValue() - entry1.value.doubleValue();
- stack.push( new Entry( result ) );
- }
- }
-
- public void multiplication()
- {
- Entry entry1 = stack.pop();
- Entry entry2 = stack.pop();
- if( entry1.type == EntryType.llong )
- {
- if( entry2.type != EntryType.llong )
- {
- throw new IllegalExpressionException();
- }
- final long result = entry2.value.longValue() * entry1.value.longValue();
- stack.push( new Entry( result ) );
- }
- else
- {
- if( entry2.type != EntryType.ddouble )
- {
- throw new IllegalExpressionException();
- }
- final double result = entry2.value.doubleValue() * entry1.value.doubleValue();
- stack.push( new Entry( result ) );
- }
- }
-
- public void division()
- {
- Entry entry1 = stack.pop();
- Entry entry2 = stack.pop();
- if( entry1.type == EntryType.llong )
- {
- if( entry2.type != EntryType.llong )
- {
- throw new IllegalExpressionException();
- }
- final long result = entry2.value.longValue() / entry1.value.longValue();
- stack.push( new Entry( result ) );
- }
- else
- {
- if( entry2.type != EntryType.ddouble )
- {
- throw new IllegalExpressionException();
- }
- final double result = entry2.value.doubleValue() / entry1.value.doubleValue();
- stack.push( new Entry( result ) );
- }
- }
-
- public void modulo()
- {
- Entry entry1 = stack.pop();
- Entry entry2 = stack.pop();
- if( entry1.type == EntryType.llong )
- {
- if( entry2.type != EntryType.llong )
- {
- throw new IllegalExpressionException();
- }
- final long result = entry2.value.longValue() % entry1.value.longValue();
- stack.push( new Entry( result ) );
- }
- else
- {
- throw new IllegalExpressionException();
- }
- }
-
- private class Entry
- {
- EntryType type;
- Number value;
-
- public Entry( double value )
- {
- type = EntryType.ddouble;
- this.value = value;
- }
-
- public Entry( long value )
- {
- type = EntryType.llong;
- this.value = value;
- }
- }
-
- private enum EntryType
- {
- ddouble, llong
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/Main.java
----------------------------------------------------------------------
diff --git a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/Main.java b/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/Main.java
deleted file mode 100644
index 10f3840..0000000
--- a/libraries/jini/importer/src/test/java/org/qi4j/library/jini/importer/org/qi4j/library/jini/tests/Main.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.importer.org.qi4j.library.jini.tests;
-
-import java.security.*;
-
-public class Main
-{
- private static InterpreterServiceImpl jiniService;
-
- public static void main( String[] args )
- throws Exception
- {
- Policy.setPolicy( new AllPolicy() );
- jiniService = new InterpreterServiceImpl( args );
- jiniService.startService();
- System.out.println( "Started 1!" );
- System.out.println( jiniService.getServiceID() );
- System.out.println( "Started 2!" );
- }
-
- private static class AllPolicy extends Policy
- {
- public PermissionCollection getPermissions( CodeSource codeSource )
- {
- final AllPermission allPermission = new AllPermission();
- final Permissions permissions = new Permissions();
- permissions.add( allPermission );
- return permissions;
- }
-
- public void refresh()
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/dev-status.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/dev-status.xml b/libraries/jini/javaspaces/dev-status.xml
deleted file mode 100644
index dc92d29..0000000
--- a/libraries/jini/javaspaces/dev-status.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1">
- <status>
- <codebase>early</codebase>
- <!--none,early,beta,stable,mature-->
- <documentation>brief</documentation>
- <!-- none, brief, good, complete -->
- <unittests>some</unittests>
- <!-- none, some, good, complete -->
- </status>
- <licenses>
- <license>ALv2</license>
- </licenses>
-</module>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/pom.xml b/libraries/jini/javaspaces/pom.xml
deleted file mode 100644
index d84809c..0000000
--- a/libraries/jini/javaspaces/pom.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-javaspaces</artifactId>
- <name>Qi4j Library - Jini Javaspaces Services</name>
-
- <dependencies>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.testsupport</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.runtime</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.bootstrap</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library</groupId>
- <artifactId>org.qi4j.library.http</artifactId>
- <version>${version.qi4j}</version>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library</groupId>
- <artifactId>org.qi4j.library.logging</artifactId>
- <version>${version.qi4j}</version>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-lookup</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-transaction</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-core</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-ext</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>outrigger</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>start</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jsk-lib</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/JavaSpacesService.java
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/JavaSpacesService.java b/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/JavaSpacesService.java
deleted file mode 100644
index db70923..0000000
--- a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/JavaSpacesService.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.javaspaces;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.Activatable;
-import org.qi4j.api.service.ServiceComposite;
-
-@Mixins( OutriggerMixin.class )
-public interface JavaSpacesService extends Activatable, ServiceComposite
-{
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/JiniJavaSpacesServiceAssembler.java
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/JiniJavaSpacesServiceAssembler.java b/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/JiniJavaSpacesServiceAssembler.java
deleted file mode 100644
index b7be5a2..0000000
--- a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/JiniJavaSpacesServiceAssembler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.javaspaces;
-
-import org.qi4j.bootstrap.Assembler;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.library.http.ServletInfo;
-
-public class JiniJavaSpacesServiceAssembler
- implements Assembler
-{
- public void assemble( ModuleAssembly module )
- throws AssemblyException
- {
- module.addEntities( OutriggerConfiguration.class );
- ServletInfo servletInfo = new ServletInfo( "/jini/outrigger-dl.jar" );
- module.addServices( OutriggerDownloadServletService.class ).instantiateOnStartup().setMetaInfo( servletInfo );
- module.addServices( JavaSpacesService.class ).instantiateOnStartup();
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerConfiguration.java b/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerConfiguration.java
deleted file mode 100644
index 8accf08..0000000
--- a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerConfiguration.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.javaspaces;
-
-import org.qi4j.api.common.Optional;
-import org.qi4j.api.common.UseDefaults;
-import org.qi4j.api.configuration.ConfigurationComposite;
-import org.qi4j.api.property.Property;
-
-public interface OutriggerConfiguration extends ConfigurationComposite
-{
- @Optional @UseDefaults Property<Boolean> useJrmp();
-
- @Optional Property<String> hostInterface();
-
- @Optional Property<String> securityPolicy();
-
- @Optional Property<String> outriggerDlJarLocation();
-
- /**
- * The groups that this Reggie instance should be serving.
- * This is a comma separated list of strings.
- *
- * @return the groups that Reggie is serving.
- */
- @Optional Property<String> groups();
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerDownloadServletService.java
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerDownloadServletService.java b/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerDownloadServletService.java
deleted file mode 100644
index b482e0a..0000000
--- a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerDownloadServletService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.javaspaces;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.ServiceComposite;
-
-import javax.servlet.Servlet;
-
-@Mixins( ResourceServletMixin.class )
-public interface OutriggerDownloadServletService extends Servlet, ServiceComposite
-{
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerMixin.java
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerMixin.java b/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerMixin.java
deleted file mode 100644
index eef45d0..0000000
--- a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/OutriggerMixin.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.javaspaces;
-
-import com.sun.jini.start.NonActivatableServiceDescriptor;
-import net.jini.config.Configuration;
-import net.jini.config.EmptyConfiguration;
-import org.qi4j.api.common.Optional;
-import org.qi4j.api.injection.scope.Service;
-import org.qi4j.api.injection.scope.This;
-import org.qi4j.api.service.Activatable;
-import org.qi4j.library.http.HttpService;
-import org.qi4j.library.http.Interface;
-import org.qi4j.library.jini.lookup.Streams;
-
-import java.io.*;
-import java.net.UnknownHostException;
-import java.security.Policy;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-public class OutriggerMixin
- implements Activatable
-{
- @Optional @Service HttpService httpService;
- @This org.qi4j.api.configuration.Configuration<OutriggerConfiguration> my;
-
- private NonActivatableServiceDescriptor.Created lookupCreated;
- private File fileToCleanup;
-
- public void activate()
- throws Exception
- {
- // Prepare a temporary directory.
- File qi4j = new File( "qi4jtemp" );
- qi4j.mkdir();
- fileToCleanup = qi4j.getAbsoluteFile();
- File jini = new File( qi4j, "jini" );
- jini.mkdirs();
- File temp = File.createTempFile( "outrigger", "", jini );
- temp.delete();
- temp.mkdirs();
- // Start Outrigger
- Configuration serviceDescConfig = EmptyConfiguration.INSTANCE;
- String httpURLtext = my.configuration().outriggerDlJarLocation().get();
- if( httpURLtext == null )
- {
- // If Http Service not running in this JVM, we need the Download URL from configuration.
- if( httpService != null )
- {
- httpURLtext = constructDownloadURL();
- }
- }
- String outriggerJarLocation = createOutriggerJars( temp );
- File outriggerJarFile = new File( outriggerJarLocation );
- String securityPolicyLocation = createSecurityPolicy( temp, outriggerJarFile );
- String outriggerConfig = createOutriggerConfig( temp );
- System.out.println( " Http: " + httpURLtext );
- System.out.println( " Security: " + Policy.getPolicy() );
- System.out.println( " Jar Location: " + outriggerJarLocation );
- System.out.println( "Configuration: " + outriggerConfig );
- NonActivatableServiceDescriptor serviceDescriptor = new NonActivatableServiceDescriptor(
- httpURLtext,
- securityPolicyLocation,
- outriggerJarLocation,
- "com.sun.jini.outrigger.TransientOutriggerImpl",
- new String[]{ outriggerConfig } );
- lookupCreated = (NonActivatableServiceDescriptor.Created) serviceDescriptor.create( serviceDescConfig );
-
- }
-
- public void passivate() throws Exception
- {
- // How to shutdown properly???
- removeFile( fileToCleanup );
- }
-
- private String createOutriggerConfig( File dir )
- throws IOException
- {
- StringBuffer configuration = new StringBuffer();
- if( my.configuration().useJrmp().get() )
- {
- System.out.println( "Using JRMP..." );
- configuration.append( "import net.jini.jrmp.JrmpExporter;\n" +
- "import net.jini.core.discovery.LookupLocator;\n" +
- "\n" +
- "com.sun.jini.outrigger\n" +
- "{\n" +
- " serverExporter = new JrmpExporter();\n" );
- }
- else
- {
- System.out.println( "Using JERI..." );
- configuration.append( "import net.jini.jeri.BasicILFactory;\n" +
- "import net.jini.jeri.BasicJeriExporter;\n" +
- "import net.jini.jeri.tcp.TcpServerEndpoint;\n" +
- "import net.jini.core.discovery.LookupLocator;\n" +
- "com.sun.jini.outrigger\n" +
- "{" +
- " private invocationLayerFactory = new BasicILFactory();\n" +
- " serverExporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),\n" +
- " invocationLayerFactory,\n" +
- " false,\n" +
- " true);\n" );
- }
- configuration.append( " initialLookupGroups = new String[] {" );
- String groupData = my.configuration().groups().get();
- String[] groups;
- if( groupData != null )
- {
- groups = convert( groupData );
- }
- else
- {
- groups = new String[]{ "qi4j" };
- }
- boolean first = true;
- for( String group : groups )
- {
- if( !first )
- {
- configuration.append( ", " );
- }
- first = false;
- configuration.append( "\"" );
- configuration.append( group );
- configuration.append( "\"" );
- }
-
- configuration.append( "};\n}" );
-
- File outriggerConfigFile = new File( dir, "outrigger.conf" );
- if( !outriggerConfigFile.exists() )
- {
- InputStream outriggerConfig = new ByteArrayInputStream( configuration.toString().getBytes() );
- copyStreamToFile( outriggerConfig, outriggerConfigFile );
- }
- return outriggerConfigFile.getAbsolutePath();
- }
-
- private String[] convert( String data )
- {
- if( data == null )
- {
- return new String[0];
- }
- ArrayList<String> result = new ArrayList<String>();
- StringTokenizer st = new StringTokenizer( data, ",", false );
- while( st.hasMoreTokens() )
- {
- String token = st.nextToken();
- result.add( token );
- }
- String[] retVal = new String[result.size()];
- return result.toArray( retVal );
- }
-
- private String createOutriggerJars( File temp )
- throws IOException
- {
- File outriggerJar = new File( temp, "outrigger-2.1.1.jar" );
- if( !outriggerJar.exists() )
- {
- InputStream outrigger = getClass().getResourceAsStream( "outrigger-2.1.1.jar" );
- copyStreamToFile( outrigger, outriggerJar );
- }
- return outriggerJar.getAbsolutePath();
- }
-
- private void removeFile( File fileToCleanup )
- {
- if( fileToCleanup == null )
- {
- return;
- }
-
- File[] files = fileToCleanup.listFiles();
- if( files == null )
- {
- return;
- }
- for( File file : files )
- {
- removeFile( file );
- }
- fileToCleanup.delete();
- }
-
- private String constructDownloadURL()
- throws UnknownHostException
- {
- Interface[] interfaces = httpService.interfacesServed();
- String host = interfaces[ 0 ].hostName();
- int port = interfaces[ 0 ].port();
- String protocol = interfaces[ 0 ].protocol().toString();
- return protocol + "://" + host + ":" + port + "/jini/outrigger-dl.jar";
- }
-
- private String createSecurityPolicy( File tempDir, File outriggerJarFile )
- throws IOException
- {
- String securityPolicy = my.configuration().securityPolicy().get();
- if( securityPolicy == null || "".equals( securityPolicy ) )
- {
- securityPolicy = "grant { permission java.security.AllPermission; };";
- }
- File securityPolicyFile = new File( tempDir, "outrigger-security.policy" );
- copyStringToFile( securityPolicy, securityPolicyFile );
- return securityPolicyFile.getAbsolutePath();
- }
-
- private void copyStringToFile( String securityPolicy, File securityPolicyFile )
- throws IOException
- {
- ByteArrayInputStream bais = new ByteArrayInputStream( securityPolicy.getBytes() );
- copyStreamToFile( bais, securityPolicyFile );
- }
-
- private void copyStreamToFile( InputStream inputStream, File destinationFile )
- throws IOException
- {
- destinationFile = destinationFile.getAbsoluteFile();
- File parentFile = destinationFile.getParentFile();
- if( !parentFile.exists() )
- {
- parentFile.mkdirs();
- }
- FileOutputStream fos = new FileOutputStream( destinationFile );
- Streams.copyStream( inputStream, fos, true );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/ResourceServletMixin.java
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/ResourceServletMixin.java b/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/ResourceServletMixin.java
deleted file mode 100644
index 07a2e14..0000000
--- a/libraries/jini/javaspaces/src/main/java/org/qi4j/library/jini/javaspaces/ResourceServletMixin.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.javaspaces;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import org.qi4j.library.jini.lookup.Streams;
-
-public class ResourceServletMixin extends HttpServlet
-{
- protected void doGet( HttpServletRequest request, HttpServletResponse response )
- throws ServletException, IOException
- {
- InputStream in = getClass().getResourceAsStream( "outrigger-dl-2.1.1.jar" );
- response.setContentType( "application/java" );
- OutputStream out = response.getOutputStream();
- Streams.copyStream( in, out, true );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/main/resources/org/qi4j/library/jini/javaspaces/outrigger-2.1.1.jar
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/main/resources/org/qi4j/library/jini/javaspaces/outrigger-2.1.1.jar b/libraries/jini/javaspaces/src/main/resources/org/qi4j/library/jini/javaspaces/outrigger-2.1.1.jar
deleted file mode 100644
index e5319ef..0000000
Binary files a/libraries/jini/javaspaces/src/main/resources/org/qi4j/library/jini/javaspaces/outrigger-2.1.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/main/resources/org/qi4j/library/jini/javaspaces/outrigger-dl-2.1.1.jar
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/main/resources/org/qi4j/library/jini/javaspaces/outrigger-dl-2.1.1.jar b/libraries/jini/javaspaces/src/main/resources/org/qi4j/library/jini/javaspaces/outrigger-dl-2.1.1.jar
deleted file mode 100644
index e5319ef..0000000
Binary files a/libraries/jini/javaspaces/src/main/resources/org/qi4j/library/jini/javaspaces/outrigger-dl-2.1.1.jar and /dev/null differ
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/test/java/org/qi4j/library/jini/javaspaces/OutriggerStartTest.java
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/test/java/org/qi4j/library/jini/javaspaces/OutriggerStartTest.java b/libraries/jini/javaspaces/src/test/java/org/qi4j/library/jini/javaspaces/OutriggerStartTest.java
deleted file mode 100644
index 05d3c32..0000000
--- a/libraries/jini/javaspaces/src/test/java/org/qi4j/library/jini/javaspaces/OutriggerStartTest.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.javaspaces;
-
-import java.io.IOException;
-import java.security.AllPermission;
-import java.security.CodeSource;
-import java.security.PermissionCollection;
-import java.security.Permissions;
-import java.security.Policy;
-import java.util.Collection;
-import java.util.logging.Formatter;
-import java.util.logging.Handler;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.logging.SimpleFormatter;
-import net.jini.core.lookup.ServiceTemplate;
-import net.jini.discovery.DiscoveryEvent;
-import net.jini.discovery.DiscoveryListener;
-import net.jini.discovery.DiscoveryManagement;
-import net.jini.discovery.LookupDiscoveryManager;
-import net.jini.lookup.LookupCache;
-import net.jini.lookup.ServiceDiscoveryEvent;
-import net.jini.lookup.ServiceDiscoveryListener;
-import net.jini.lookup.ServiceDiscoveryManager;
-import net.jini.security.policy.DynamicPolicyProvider;
-import net.jini.space.JavaSpace05;
-import org.junit.Test;
-import org.qi4j.api.injection.scope.Service;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.entitystore.memory.MemoryEntityStoreService;
-import org.qi4j.library.http.JettyServiceAssembler;
-import org.qi4j.library.jini.lookup.JiniLookupServiceAssembler;
-import org.qi4j.library.jini.transaction.JiniTransactionServiceAssembler;
-import org.qi4j.test.AbstractQi4jTest;
-
-public class OutriggerStartTest extends AbstractQi4jTest
-{
- private static Logger logger = Logger.getLogger( "" );
-
- static
- {
- Handler[] handlers = logger.getHandlers();
- for( Handler handler : handlers )
- {
- Formatter formatter = new SimpleFormatter();
- handler.setFormatter( formatter );
- }
- logger.setLevel( Level.FINEST );
-
- Policy basePolicy = new AllPolicy();
- DynamicPolicyProvider policyProvider = new DynamicPolicyProvider( basePolicy );
- Policy.setPolicy( policyProvider );
- }
-
-
- public void assemble( ModuleAssembly module ) throws AssemblyException
- {
- new JiniTransactionServiceAssembler().assemble( module );
- new JiniLookupServiceAssembler().assemble( module );
- new JiniJavaSpacesServiceAssembler().assemble( module );
- new JettyServiceAssembler().assemble( module );
- module.addObjects( Holder.class );
- module.addServices( MemoryEntityStoreService.class );
- }
-
- @Test
- public void whenStartingOutriggerExpectFoundJavaSpace05()
- throws Exception
- {
- LookupCache cache = initialize();
- MyServiceDiscoveryListener listener = new MyServiceDiscoveryListener();
- cache.addListener( listener );
- Holder object = objectBuilderFactory.newObject( Holder.class );
- synchronized( this )
- {
- if( !listener.added )
- {
- wait( 5000 );
- }
- }
- org.junit.Assert.assertTrue( listener.added );
- }
-
-
- private LookupCache initialize()
- throws IOException
- {
- DiscoveryManagement discoveryManager = new LookupDiscoveryManager( null, null, new MyDiscoveryListener() );
- ServiceDiscoveryManager sdm = new ServiceDiscoveryManager( discoveryManager, null );
- Class[] types = new Class[]{ JavaSpace05.class };
- ServiceTemplate template = new ServiceTemplate( null, types, null );
- LookupCache lookupCache = sdm.createLookupCache( template, null, null );
- return lookupCache;
-
- }
-
- public static class Holder
- {
- @Service JavaSpacesService service;
- }
-
- private static class MyDiscoveryListener
- implements DiscoveryListener
- {
-
- public void discovered( DiscoveryEvent e )
- {
- printEvent( e, "Discovered: " );
- }
-
- public void discarded( DiscoveryEvent e )
- {
- printEvent( e, "Discarded: " );
- }
-
- private void printEvent( DiscoveryEvent e, String message )
- {
- Collection<String[]> collection = e.getGroups().values();
- for( String[] array : collection )
- {
- StringBuffer groups = new StringBuffer();
- boolean first = true;
- for( String group : array )
- {
- if( !first )
- {
- groups.append( "," );
- }
- first = false;
- groups.append( group );
- System.out.println( message + groups );
- }
- }
- }
- }
-
- private class MyServiceDiscoveryListener
- implements ServiceDiscoveryListener
- {
- boolean added = false;
- boolean removed = false;
-
- public MyServiceDiscoveryListener()
- {
- }
-
- public void serviceAdded( ServiceDiscoveryEvent event )
- {
- synchronized( OutriggerStartTest.this )
- {
- logger.info( "Added: " + event.getPostEventServiceItem() );
- added = true;
- OutriggerStartTest.this.notifyAll();
- }
- }
-
- public void serviceRemoved( ServiceDiscoveryEvent event )
- {
- synchronized( OutriggerStartTest.this )
- {
- logger.info( "Removed: " + event.getPostEventServiceItem() );
- removed = true;
- OutriggerStartTest.this.notifyAll();
- }
- }
-
- public void serviceChanged( ServiceDiscoveryEvent event )
- {
- }
- }
-
- public static class AllPolicy extends Policy
- {
-
- public AllPolicy()
- {
- }
-
- public PermissionCollection getPermissions( CodeSource codeSource )
- {
- Permissions allPermission;
- allPermission = new Permissions();
- allPermission.add( new AllPermission() );
- return allPermission;
- }
-
- public void refresh()
- {
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/javaspaces/src/test/resources/org/qi4j/library/http/JettyService.properties
----------------------------------------------------------------------
diff --git a/libraries/jini/javaspaces/src/test/resources/org/qi4j/library/http/JettyService.properties b/libraries/jini/javaspaces/src/test/resources/org/qi4j/library/http/JettyService.properties
deleted file mode 100644
index 7a1adb8..0000000
--- a/libraries/jini/javaspaces/src/test/resources/org/qi4j/library/http/JettyService.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-port=8040
-hostName=127.0.0.1
-resourcePath=/
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/dev-status.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/dev-status.xml b/libraries/jini/lookup/dev-status.xml
deleted file mode 100644
index dc92d29..0000000
--- a/libraries/jini/lookup/dev-status.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1">
- <status>
- <codebase>early</codebase>
- <!--none,early,beta,stable,mature-->
- <documentation>brief</documentation>
- <!-- none, brief, good, complete -->
- <unittests>some</unittests>
- <!-- none, some, good, complete -->
- </status>
- <licenses>
- <license>ALv2</license>
- </licenses>
-</module>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/pom.xml b/libraries/jini/lookup/pom.xml
deleted file mode 100644
index 86a6b70..0000000
--- a/libraries/jini/lookup/pom.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-lookup</artifactId>
- <name>Qi4j Library - Jini Lookup Service</name>
-
- <dependencies>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.testsupport</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.runtime</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.bootstrap</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library</groupId>
- <artifactId>org.qi4j.library.http</artifactId>
- <version>${version.qi4j}</version>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library</groupId>
- <artifactId>org.qi4j.library.logging</artifactId>
- <version>${version.qi4j}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-core</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-ext</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>reggie</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>start</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jsk-lib</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/JiniLookupServiceAssembler.java
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/JiniLookupServiceAssembler.java b/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/JiniLookupServiceAssembler.java
deleted file mode 100644
index 12a025f..0000000
--- a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/JiniLookupServiceAssembler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.lookup;
-
-import org.qi4j.bootstrap.Assembler;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-import org.qi4j.library.http.ServletInfo;
-
-public class JiniLookupServiceAssembler
- implements Assembler
-{
- public void assemble( ModuleAssembly module )
- throws AssemblyException
- {
- module.addEntities( ReggieConfiguration.class );
- ServletInfo servletInfo = new ServletInfo( "/jini/reggie-dl.jar" );
- module.addServices( ReggieDownloadServletService.class ).instantiateOnStartup().setMetaInfo( servletInfo );
- module.addServices( ServiceRegistryService.class ).instantiateOnStartup();
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieConfiguration.java b/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieConfiguration.java
deleted file mode 100644
index 6eb357b..0000000
--- a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieConfiguration.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.lookup;
-
-import org.qi4j.api.common.Optional;
-import org.qi4j.api.common.UseDefaults;
-import org.qi4j.api.configuration.ConfigurationComposite;
-import org.qi4j.api.property.Property;
-
-public interface ReggieConfiguration extends ConfigurationComposite
-{
- @Optional @UseDefaults Property<Boolean> useJrmp();
-
- @Optional Property<String> hostInterface();
-
- @Optional Property<String> securityPolicy();
-
- @Optional Property<String> reggieDlJarLocation();
-
- /**
- * The groups that this Reggie instance should be serving.
- * This is a comma separated list of strings.
- *
- * @return the groups that Reggie is serving.
- */
- @Optional Property<String> groups();
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieDownloadServletService.java
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieDownloadServletService.java b/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieDownloadServletService.java
deleted file mode 100644
index ab31569..0000000
--- a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieDownloadServletService.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.lookup;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.ServiceComposite;
-
-import javax.servlet.Servlet;
-
-@Mixins( ResourceServletMixin.class )
-public interface ReggieDownloadServletService extends Servlet, ServiceComposite
-{
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieMixin.java
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieMixin.java b/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieMixin.java
deleted file mode 100644
index ddfeaad..0000000
--- a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ReggieMixin.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.lookup;
-
-import com.sun.jini.admin.DestroyAdmin;
-import com.sun.jini.start.NonActivatableServiceDescriptor;
-import net.jini.admin.Administrable;
-import net.jini.config.Configuration;
-import net.jini.config.EmptyConfiguration;
-import org.qi4j.api.common.Optional;
-import org.qi4j.api.injection.scope.Service;
-import org.qi4j.api.injection.scope.This;
-import org.qi4j.api.service.Activatable;
-import org.qi4j.library.http.HttpService;
-import org.qi4j.library.http.Interface;
-
-import java.io.*;
-import java.net.UnknownHostException;
-import java.security.Policy;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-public class ReggieMixin
- implements Activatable
-{
- @Optional @Service HttpService httpService;
- @This org.qi4j.api.configuration.Configuration<ReggieConfiguration> my;
-
- private NonActivatableServiceDescriptor.Created lookupCreated;
- private File fileToCleanup;
-
- public void activate()
- throws Exception
- {
- // Prepare a temporary directory.
- File qi4j = new File( "qi4jtemp" );
- qi4j.mkdir();
- fileToCleanup = qi4j.getAbsoluteFile();
- File jini = new File( qi4j, "jini" );
- jini.mkdirs();
- File temp = File.createTempFile( "reggie", "", jini );
- temp.delete();
- boolean success = temp.mkdirs();
- // Start Reggie
- Configuration serviceDescConfig = EmptyConfiguration.INSTANCE;
- String httpURL = my.configuration().reggieDlJarLocation().get();
- if( httpURL == null )
- {
- // If Http Service not running in this JVM, we need the Download URL from configuration.
- if( httpService != null )
- {
- httpURL = constructDownloadURL();
- }
- }
- String reggieJarLocation = createReggieJars( temp );
- File reggieJarFile = new File( reggieJarLocation );
- String securityPolicyLocation = createSecurityPolicy( temp, reggieJarFile );
- String reggieConfig = createReggieConfig( temp );
- System.out.println( "Policy: " + Policy.getPolicy() );
- NonActivatableServiceDescriptor serviceDescriptor = new NonActivatableServiceDescriptor(
- httpURL,
- securityPolicyLocation,
- reggieJarLocation,
- "com.sun.jini.reggie.TransientRegistrarImpl",
- new String[]{ reggieConfig } );
- lookupCreated = (NonActivatableServiceDescriptor.Created) serviceDescriptor.create( serviceDescConfig );
- }
-
- public void passivate() throws Exception
- {
- System.out.println( "Destroying Reggie." );
- Object admin = ( (Administrable) lookupCreated.proxy ).getAdmin();
- ( (DestroyAdmin) admin ).destroy();
- removeFile( fileToCleanup );
- }
-
- private String createReggieConfig( File dir )
- throws IOException
- {
- StringBuffer configuration = new StringBuffer();
- if( my.configuration().useJrmp().get() )
- {
- System.out.println( "Using JRMP..." );
- configuration.append( "import net.jini.jrmp.JrmpExporter;\n" +
- "\n" +
- "com.sun.jini.reggie {\n" +
- "\n" +
- " serverExporter = new JrmpExporter();\n" );
- }
- else
- {
- System.out.println( "Using JERI..." );
- configuration.append( "import net.jini.jeri.BasicILFactory;\n" +
- "import net.jini.jeri.BasicJeriExporter;\n" +
- "import net.jini.jeri.tcp.TcpServerEndpoint;\n" +
- "\n" +
- "com.sun.jini.reggie\n" +
- "{\n" +
- " private invocationLayerFactory = new BasicILFactory();\n" +
- " serverExporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),\n" +
- " invocationLayerFactory,\n" +
- " false,\n" +
- " true);\n" );
- }
- configuration.append( " initialMemberGroups = new String[] {" );
- String groupData = my.configuration().groups().get();
- String[] groups;
- if( groupData != null )
- {
- groups = convert( groupData );
- }
- else
- {
- groups = new String[]{ "qi4j" };
- }
- boolean first = true;
- for( String group : groups )
- {
- if( !first )
- {
- configuration.append( ", " );
- }
- first = false;
- configuration.append( " \"" );
- configuration.append( group );
- configuration.append( "\" " );
- }
-
- configuration.append( "};\n}" );
- File reggieConfigFile = new File( dir, "reggie.conf" );
- if( !reggieConfigFile.exists() )
- {
- InputStream reggieConfig = new ByteArrayInputStream( configuration.toString().getBytes() );
- copyStreamToFile( reggieConfig, reggieConfigFile );
- }
- return reggieConfigFile.getAbsolutePath();
- }
-
- private String[] convert( String data )
- {
- if( data == null )
- {
- return new String[0];
- }
- ArrayList<String> result = new ArrayList<String>();
- StringTokenizer st = new StringTokenizer( data, ",", false );
- while( st.hasMoreTokens() )
- {
- String token = st.nextToken();
- result.add( token );
- }
- String[] retVal = new String[result.size()];
- return result.toArray( retVal );
- }
-
-
- private String createReggieJars( File temp )
- throws IOException
- {
- File reggieJar = new File( temp, "reggie-2.1.1.jar" );
- if( !reggieJar.exists() )
- {
- InputStream reggie = getClass().getResourceAsStream( "reggie-2.1.1.jar" );
- copyStreamToFile( reggie, reggieJar );
- }
- return reggieJar.getAbsolutePath();
- }
-
- private void removeFile( File fileToCleanup )
- {
- if( fileToCleanup == null )
- {
- return;
- }
-
- File[] files = fileToCleanup.listFiles();
- if( files == null )
- {
- return;
- }
- for( File file : files )
- {
- removeFile( file );
- }
- fileToCleanup.delete();
- }
-
- private String constructDownloadURL()
- throws UnknownHostException
- {
- Interface[] interfaces = httpService.interfacesServed();
- String host = interfaces[ 0 ].hostName();
- int port = interfaces[ 0 ].port();
- String protocol = interfaces[ 0 ].protocol().toString();
- return protocol + "://" + host + ":" + port + "/jini/reggie-dl.jar";
- }
-
- private String createSecurityPolicy( File tempDir, File reggieJarFile )
- throws IOException
- {
- String securityPolicy = my.configuration().securityPolicy().get();
- if( securityPolicy == null || "".equals( securityPolicy ) )
- {
- securityPolicy = "grant { permission java.security.AllPermission; };";
- }
- File securityPolicyFile = new File( tempDir, "reggie-security.policy" );
- copyStringToFile( securityPolicy, securityPolicyFile );
- return securityPolicyFile.getAbsolutePath();
- }
-
- private void copyStringToFile( String securityPolicy, File securityPolicyFile )
- throws IOException
- {
- ByteArrayInputStream bais = new ByteArrayInputStream( securityPolicy.getBytes() );
- copyStreamToFile( bais, securityPolicyFile );
- }
-
- private void copyStreamToFile( InputStream inputStream, File destinationFile )
- throws IOException
- {
- destinationFile = destinationFile.getAbsoluteFile();
- File parentFile = destinationFile.getParentFile();
- if( !parentFile.exists() )
- {
- parentFile.mkdirs();
- }
- FileOutputStream fos = new FileOutputStream( destinationFile );
- Streams.copyStream( inputStream, fos, true );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ResourceServletMixin.java
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ResourceServletMixin.java b/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ResourceServletMixin.java
deleted file mode 100644
index de9e6d5..0000000
--- a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ResourceServletMixin.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.lookup;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class ResourceServletMixin extends HttpServlet
-{
- protected void doGet( HttpServletRequest request, HttpServletResponse response )
- throws ServletException, IOException
- {
- InputStream in = getClass().getResourceAsStream( "reggie-dl-2.1.1.jar" );
- response.setContentType( "application/java" );
- OutputStream out = response.getOutputStream();
- Streams.copyStream( in, out, true );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ServiceRegistryService.java
----------------------------------------------------------------------
diff --git a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ServiceRegistryService.java b/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ServiceRegistryService.java
deleted file mode 100644
index 9050a66..0000000
--- a/libraries/jini/lookup/src/main/java/org/qi4j/library/jini/lookup/ServiceRegistryService.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.jini.lookup;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.Activatable;
-import org.qi4j.api.service.ServiceComposite;
-
-@Mixins( { ReggieMixin.class } )
-public interface ServiceRegistryService extends Activatable, ServiceComposite
-{
-}
[4/4] zest-sandbox git commit: Cleanup Zest Sandbox - Remove dead
projects
Posted by pa...@apache.org.
Cleanup Zest Sandbox - Remove dead projects
- libraries/jini
- extensions/entitystore-javaspaces
- extensions/entitystore-gigaspaces
- extensions/osgi
Project: http://git-wip-us.apache.org/repos/asf/zest-sandbox/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-sandbox/commit/25dbfc23
Tree: http://git-wip-us.apache.org/repos/asf/zest-sandbox/tree/25dbfc23
Diff: http://git-wip-us.apache.org/repos/asf/zest-sandbox/diff/25dbfc23
Branch: refs/heads/feature/sandbox-cleanup
Commit: 25dbfc233ff0aa6c65212585856f76d543b3e061
Parents: 562f2ca
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Apr 20 10:03:59 2015 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Apr 20 10:03:59 2015 +0200
----------------------------------------------------------------------
.../qi4j-entitystore-gs-sample/common/pom.xml | 25 -
.../entitystore/gigaspaces/common/Data.java | 122 -----
.../feeder/Feeder.launch | 13 -
.../qi4j-entitystore-gs-sample/feeder/pom.xml | 50 --
.../feeder/src/main/assembly/assembly.xml | 37 --
.../entitystore/gigaspaces/feeder/Feeder.java | 101 ----
.../src/main/resources/META-INF/spring/pu.xml | 50 --
.../qi4j-entitystore-gs-sample/pom.xml | 69 ---
.../processor/Processor.launch | 12 -
.../processor/Processor_2_1.launch | 13 -
.../processor/pom.xml | 50 --
.../processor/src/main/assembly/assembly.xml | 37 --
.../gigaspaces/processor/Processor.java | 44 --
.../src/main/resources/META-INF/spring/pu.xml | 64 ---
.../src/main/resources/META-INF/spring/sla.xml | 20 -
.../ProcessorIntegrationTest-context.xml | 58 ---
.../processor/ProcessorIntegrationTest.java | 55 ---
.../gigaspaces/processor/ProcessorTest.java | 25 -
.../qi4j-entitystore-gs-sample/readme.txt | 106 ----
.../entitystore-javaspaces/dev-status.xml | 14 -
extensions/entitystore-javaspaces/pom.xml | 92 ----
extensions/entitystore-javaspaces/readme.txt | 5 -
.../javaspaces/JavaSpacesEntityStoreMixin.java | 143 ------
.../JavaSpacesEntityStoreService.java | 40 --
.../java/org/qi4j/library/spaces/Space.java | 30 --
.../org/qi4j/library/spaces/SpaceException.java | 28 --
.../qi4j/library/spaces/SpaceTransaction.java | 23 -
.../javaspaces/JavaSpacesClientAssembler.java | 33 --
.../JavaSpacesClientConfiguration.java | 26 -
.../javaspaces/JavaSpacesClientMixin.java | 483 -------------------
.../javaspaces/JavaSpacesClientService.java | 28 --
.../spaces/javaspaces/NullTransactionProxy.java | 36 --
.../spaces/javaspaces/StackThreadLocal.java | 29 --
.../library/spaces/javaspaces/StorageEntry.java | 47 --
.../spaces/javaspaces/TransactionProxy.java | 84 ----
.../JavaSpacesClientService.properties | 1 -
.../qi4j/library/spaces/javaspaces/jini.config | 9 -
.../javaspaces/JavaSpacesEntityStoreTest.java | 140 ------
.../entitystore/javaspaces/JavaspacesTest.java | 146 ------
.../JavaSpacesEntityStoreService.properties | 1 -
.../qi4j/library/http/JettyService.properties | 3 -
extensions/osgi/bootstrap/osgi.bundle | 20 -
extensions/osgi/bootstrap/pom.xml | 57 ---
.../java/org/qi4j/osgi/bootstrap/Activator.java | 77 ---
extensions/osgi/example/osgi.bundle | 20 -
extensions/osgi/example/pom.xml | 47 --
.../src/main/java/org/qi4j/osgi/AComposite.java | 11 -
.../src/main/java/org/qi4j/osgi/AnEntity.java | 25 -
.../qi4j/osgi/internal/APrivateComposite.java | 37 --
.../java/org/qi4j/osgi/internal/Activator.java | 97 ----
.../qi4j/osgi/internal/AnEntityComposite.java | 24 -
extensions/osgi/example/test.bundles | 12 -
extensions/osgi/integrationTests/pom.xml | 55 ---
.../java/org/qi4j/osgi/test/AbstractTest.java | 117 -----
.../org/qi4j/osgi/test/BundleLifecycleTest.java | 53 --
.../osgi/test/BundleLifecycleWithCglibTest.java | 18 -
.../java/org/qi4j/osgi/test/CompositeTest.java | 59 ---
.../java/org/qi4j/osgi/test/EntityTest.java | 121 -----
extensions/osgi/pom.xml | 123 -----
extensions/osgi/testBootstrap/pom.xml | 56 ---
extensions/pom.xml | 14 +-
libraries/jini/common/dev-status.xml | 14 -
libraries/jini/common/pom.xml | 11 -
libraries/jini/importer/pom.xml | 63 ---
.../library/jini/importer/JiniImporter.java | 70 ---
.../library/jini/importer/JiniProxyHandler.java | 121 -----
.../jini/importer/JiniServiceObservation.java | 26 -
.../qi4j/library/jini/importer/JiniStatus.java | 27 --
.../library/jini/importer/JiniStatusMixin.java | 98 ----
.../jini/importer/JiniStatusService.java | 29 --
.../importer/ImportExternalJiniServiceTest.java | 83 ----
.../jini/tests/IllegalExpressionException.java | 22 -
.../library/jini/tests/InterpreterService.java | 39 --
.../jini/tests/InterpreterServiceImpl.java | 196 --------
.../org/qi4j/library/jini/tests/Main.java | 52 --
libraries/jini/javaspaces/dev-status.xml | 14 -
libraries/jini/javaspaces/pom.xml | 83 ----
.../jini/javaspaces/JavaSpacesService.java | 27 --
.../JiniJavaSpacesServiceAssembler.java | 36 --
.../jini/javaspaces/OutriggerConfiguration.java | 42 --
.../OutriggerDownloadServletService.java | 28 --
.../library/jini/javaspaces/OutriggerMixin.java | 247 ----------
.../jini/javaspaces/ResourceServletMixin.java | 39 --
.../library/jini/javaspaces/outrigger-2.1.1.jar | Bin 56751 -> 0 bytes
.../jini/javaspaces/outrigger-dl-2.1.1.jar | Bin 56751 -> 0 bytes
.../jini/javaspaces/OutriggerStartTest.java | 208 --------
.../qi4j/library/http/JettyService.properties | 3 -
libraries/jini/lookup/dev-status.xml | 14 -
libraries/jini/lookup/pom.xml | 72 ---
.../jini/lookup/JiniLookupServiceAssembler.java | 36 --
.../jini/lookup/ReggieConfiguration.java | 42 --
.../lookup/ReggieDownloadServletService.java | 28 --
.../qi4j/library/jini/lookup/ReggieMixin.java | 245 ----------
.../jini/lookup/ResourceServletMixin.java | 38 --
.../jini/lookup/ServiceRegistryService.java | 27 --
.../org/qi4j/library/jini/lookup/Streams.java | 81 ----
.../org/qi4j/library/jini/lookup/jini.config | 9 -
.../qi4j/library/jini/lookup/reggie-2.1.1.jar | Bin 141059 -> 0 bytes
.../library/jini/lookup/reggie-dl-2.1.1.jar | Bin 58054 -> 0 bytes
.../library/jini/lookup/ReggieStartTest.java | 204 --------
.../qi4j/library/http/JettyService.properties | 3 -
libraries/jini/pom.xml | 21 -
libraries/jini/transaction/dev-status.xml | 14 -
libraries/jini/transaction/pom.xml | 77 ---
.../JiniTransactionServiceAssembler.java | 36 --
.../jini/transaction/MahaloConfiguration.java | 36 --
.../MahaloDownloadServletService.java | 28 --
.../library/jini/transaction/MahaloMixin.java | 247 ----------
.../jini/transaction/ResourceServletMixin.java | 39 --
.../transaction/TransactionManagerService.java | 27 --
.../library/jini/transaction/mahalo-2.1.1.jar | Bin 107269 -> 0 bytes
.../jini/transaction/mahalo-dl-2.1.1.jar | Bin 16470 -> 0 bytes
.../jini/transaction/MahaloStartTest.java | 207 --------
.../qi4j/library/http/JettyService.properties | 3 -
libraries/pom.xml | 6 -
115 files changed, 1 insertion(+), 6552 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/common/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/common/pom.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/common/pom.xml
deleted file mode 100644
index e32f4e5..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/common/pom.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.qi4j.entitystore.gigaspaces</groupId>
- <artifactId>common</artifactId>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>common</name>
- <parent>
- <groupId>org.qi4j.entitystore.gigaspaces</groupId>
- <artifactId>qi4j-entitystore-gs-sample</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <build>
- <finalName>qi4j-entitystore-gs-sample-common</finalName>
- <resources>
- <resource>
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </resource>
- </resources>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/common/src/main/java/org/qi4j/entitystore/gigaspaces/common/Data.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/common/src/main/java/org/qi4j/entitystore/gigaspaces/common/Data.java b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/common/src/main/java/org/qi4j/entitystore/gigaspaces/common/Data.java
deleted file mode 100644
index b8b5838..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/common/src/main/java/org/qi4j/entitystore/gigaspaces/common/Data.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package org.qi4j.entitystore.gigaspaces.common;
-
-import com.gigaspaces.annotation.pojo.SpaceClass;
-import com.gigaspaces.annotation.pojo.SpaceId;
-import com.gigaspaces.annotation.pojo.SpaceRouting;
-
-
-/**
- * A simple object used to work with the Space. Important properties include the id
- * of the object, a type (used to perform routing when working with partitioned space),
- * the raw data and processed data, and a boolean flag indicating if this Data object
- * was processed or not.
- */
-@SpaceClass
-public class Data {
-
- private String id;
-
- private Long type;
-
- private String rawData;
-
- private String data;
-
- private Boolean processed;
-
- /**
- * Constructs a new Data object.
- */
- public Data() {
-
- }
-
- /**
- * Constructs a new Data object with the given type
- * and raw data.
- */
- public Data(long type, String rawData) {
- this.type = type;
- this.rawData = rawData;
- this.processed = false;
- }
-
- /**
- * The id of this object.
- */
- @SpaceId(autoGenerate=true)
- public String getId() {
- return id;
- }
-
- /**
- * The id of this object. Its value will be auto generated when it is written
- * to the space.
- */
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * The type of the data object. Used as the routing field when working with
- * a partitioned space.
- */
- @SpaceRouting
- public Long getType() {
- return type;
- }
-
- /**
- * The type of the data object. Used as the routing field when working with
- * a partitioned space.
- */
- public void setType(Long type) {
- this.type = type;
- }
-
- /**
- * The raw data this object holds.
- */
- public String getRawData() {
- return rawData;
- }
-
- /**
- * The raw data this object holds.
- */
- public void setRawData(String rawData) {
- this.rawData = rawData;
- }
-
- /**
- * The processed data this object holds.
- */
- public String getData() {
- return data;
- }
-
- /**
- * The processed data this object holds.
- */
- public void setData(String data) {
- this.data = data;
- }
-
- /**
- * A boolean flag indicating if the data object was processed or not.
- */
- public Boolean isProcessed() {
- return processed;
- }
-
- /**
- * A boolean flag indicating if the data object was processed or not.
- */
- public void setProcessed(Boolean processed) {
- this.processed = processed;
- }
-
- public String toString() {
- return "id[" + id + "] type[" + type + "] rawData[" + rawData + "] data[" + data + "] processed[" + processed + "]";
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/Feeder.launch
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/Feeder.launch b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/Feeder.launch
deleted file mode 100644
index 75d453e..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/Feeder.launch
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
- <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
- <listEntry value="/feeder"/>
- </listAttribute>
- <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
- <listEntry value="4"/>
- </listAttribute>
- <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
- <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE"
- value="org.openspaces.pu.container.integrated.IntegratedProcessingUnitContainer"/>
- <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="feeder"/>
-</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/pom.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/pom.xml
deleted file mode 100644
index 7e6c90d..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.qi4j.entitystore.gigaspaces</groupId>
- <artifactId>feeder</artifactId>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>feeder</name>
- <parent>
- <groupId>org.qi4j.entitystore.gigaspaces</groupId>
- <artifactId>qi4j-entitystore-gs-sample</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <properties>
- <gsType>PU</gsType>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.qi4j.entitystore.gigaspaces</groupId>
- <artifactId>common</artifactId>
- <version>1.0-SNAPSHOT</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
- <build>
- <finalName>qi4j-entitystore-gs-sample-feeder</finalName>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <attach>false</attach>
- <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
- <descriptors>
- <descriptor>src/main/assembly/assembly.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/assembly/assembly.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/assembly/assembly.xml
deleted file mode 100644
index aac9f1f..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<assembly>
- <id>assemble-pu</id>
- <formats>
- <format>jar</format>
- <format>dir</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>target/classes</directory>
- <lineEnding>keep</lineEnding>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/**</include>
- </includes>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <useProjectArtifact>false</useProjectArtifact>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- <outputDirectory>lib</outputDirectory>
- <excludes>
- <exclude>org.qi4j.entitystore.gigaspaces:common</exclude>
- </excludes>
- </dependencySet>
- <dependencySet>
- <useProjectArtifact>false</useProjectArtifact>
- <useTransitiveDependencies>true</useTransitiveDependencies>
- <useTransitiveFiltering>true</useTransitiveFiltering>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>org.qi4j.entitystore.gigaspaces:common</include>
- </includes>
- </dependencySet>
- </dependencySets>
-</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/java/org/qi4j/entitystore/gigaspaces/feeder/Feeder.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/java/org/qi4j/entitystore/gigaspaces/feeder/Feeder.java b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/java/org/qi4j/entitystore/gigaspaces/feeder/Feeder.java
deleted file mode 100644
index 6622d96..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/java/org/qi4j/entitystore/gigaspaces/feeder/Feeder.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package org.qi4j.entitystore.gigaspaces.feeder;
-
-import org.qi4j.entitystore.gigaspaces.common.Data;
-
-import org.openspaces.core.GigaSpace;
-import org.openspaces.core.SpaceInterruptedException;
-import org.openspaces.core.context.GigaSpaceContext;
-
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
-
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-
-
-/**
- * A feeder bean starts a scheduled task that writes a new Data objects to the space
- * (in an unprocessed state).
- *
- * <p>The space is injected into this bean using OpenSpaces support for @GigaSpaceContext
- * annotation.
- *
- * <p>The scheduling uses the java.util.concurrent Scheduled Executor Service. It
- * is started and stopped based on Spring life cycle events.
- *
- * @author kimchy
- */
-public class Feeder implements InitializingBean, DisposableBean {
-
- private ScheduledExecutorService executorService;
-
- private ScheduledFuture<?> sf;
-
- private long numberOfTypes = 10;
-
- private long defaultDelay = 1000;
-
- private FeederTask feederTask;
-
- @GigaSpaceContext
- private GigaSpace gigaSpace;
-
- /**
- * Sets the number of types that will be used to set {@link org.openspaces.example.data.common.Data#setType(Long)}.
- *
- * <p>The type is used as the routing index for partitioned space. This will affect the distribution of Data
- * objects over a partitioned space.
- */
- public void setNumberOfTypes(long numberOfTypes) {
- this.numberOfTypes = numberOfTypes;
- }
-
- public void setDefaultDelay(long defaultDelay) {
- this.defaultDelay = defaultDelay;
- }
-
- public void afterPropertiesSet() throws Exception {
- System.out.println("--- STARTING FEEDER WITH CYCLE [" + defaultDelay + "]");
- executorService = Executors.newScheduledThreadPool(1);
- feederTask = new FeederTask();
- sf = executorService.scheduleAtFixedRate(feederTask, defaultDelay, defaultDelay,
- TimeUnit.MILLISECONDS);
- }
-
- public void destroy() throws Exception {
- sf.cancel(false);
- sf = null;
- executorService.shutdown();
- }
-
- public long getFeedCount() {
- return feederTask.getCounter();
- }
-
-
- public class FeederTask implements Runnable {
-
- private long counter = 1;
-
- public void run() {
- try {
- long time = System.currentTimeMillis();
- Data data = new Data((counter++ % numberOfTypes), "FEEDER " + Long.toString(time));
- gigaSpace.write(data);
- System.out.println("--- FEEDER WROTE " + data);
- } catch (SpaceInterruptedException e) {
- // ignore, we are being shutdown
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public long getCounter() {
- return counter;
- }
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/resources/META-INF/spring/pu.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/resources/META-INF/spring/pu.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/resources/META-INF/spring/pu.xml
deleted file mode 100644
index 3813bf3..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/feeder/src/main/resources/META-INF/spring/pu.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:os-core="http://www.openspaces.org/schema/core"
- xmlns:os-events="http://www.openspaces.org/schema/events"
- xmlns:os-remoting="http://www.openspaces.org/schema/remoting"
- xmlns:os-sla="http://www.openspaces.org/schema/sla"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.openspaces.org/schema/core http://www.openspaces.org/schema/core/openspaces-core.xsd
- http://www.openspaces.org/schema/events http://www.openspaces.org/schema/events/openspaces-events.xsd
- http://www.openspaces.org/schema/remoting http://www.openspaces.org/schema/remoting/openspaces-remoting.xsd
- http://www.openspaces.org/schema/sla http://www.openspaces.org/schema/sla/openspaces-sla.xsd">
-
-
- <!--
- Spring propery configurer which allows us to use system properties (such as user.name).
- -->
- <bean id="propertiesConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="properties">
- <props>
- <prop key="numberOfTypes">100</prop>
- </props>
- </property>
- </bean>
-
- <!--
- Enables the usage of @GigaSpaceContext annotation based injection.
- -->
- <os-core:giga-space-context/>
-
- <!--
- A bean representing a space (an IJSpace implementation).
-
- Note, we perform a lookup on the space since we are working against a remote space.
- -->
- <os-core:space id="space" url="jini://*/*/space" />
-
- <!--
- OpenSpaces simplified space API built on top of IJSpace/JavaSpace.
- -->
- <os-core:giga-space id="gigaSpace" space="space"/>
-
- <!--
- The Data feeder bean, writing new Data objects to the space in a constant interval.
- -->
- <bean id="dataFeeder" class="org.qi4j.entitystore.gigaspaces.feeder.Feeder" depends-on="gigaSpace">
- <property name="numberOfTypes" value="${numberOfTypes}" />
- </bean>
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/pom.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/pom.xml
deleted file mode 100644
index 0b0da1d..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/pom.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.qi4j.entitystore.gigaspaces</groupId>
- <artifactId>qi4j-entitystore-gs-sample</artifactId>
- <version>1.0-SNAPSHOT</version>
- <name>qi4j-entitystore-gs-sample</name>
- <packaging>pom</packaging>
- <properties>
- <gsVersion>7.1.2</gsVersion>
- <springVersion>3.0.3.RELEASE</springVersion>
- </properties>
- <modules>
- <module>common</module>
- <module>processor</module>
- <module>feeder</module>
- </modules>
- <dependencies>
- <dependency>
- <groupId>com.gigaspaces</groupId>
- <artifactId>gs-openspaces</artifactId>
- <version>${gsVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <version>${springVersion}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <defaultGoal>package</defaultGoal>
- <testResources>
- <testResource>
- <directory>src/test/java</directory>
- <includes>
- <include>**/*.xml</include>
- </includes>
- </testResource>
- </testResources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-openspaces-plugin</artifactId>
- <version>${gsVersion}</version>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/Processor.launch
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/Processor.launch b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/Processor.launch
deleted file mode 100644
index c659d29..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/Processor.launch
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/processor"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.openspaces.pu.container.integrated.IntegratedProcessingUnitContainer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="processor"/>
-</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/Processor_2_1.launch
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/Processor_2_1.launch b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/Processor_2_1.launch
deleted file mode 100644
index 074b360..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/Processor_2_1.launch
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/processor"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.openspaces.pu.container.integrated.IntegratedProcessingUnitContainer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-cluster total_members=2,1"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="processor"/>
-</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/pom.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/pom.xml
deleted file mode 100644
index 7a2f223..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.qi4j.entitystore.gigaspaces</groupId>
- <artifactId>processor</artifactId>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>processor</name>
- <parent>
- <groupId>org.qi4j.entitystore.gigaspaces</groupId>
- <artifactId>qi4j-entitystore-gs-sample</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <properties>
- <gsType>PU</gsType>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.qi4j.entitystore.gigaspaces</groupId>
- <artifactId>common</artifactId>
- <version>1.0-SNAPSHOT</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
- <build>
- <finalName>qi4j-entitystore-gs-sample-processor</finalName>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <attach>false</attach>
- <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
- <descriptors>
- <descriptor>src/main/assembly/assembly.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/assembly/assembly.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/assembly/assembly.xml
deleted file mode 100644
index aac9f1f..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<assembly>
- <id>assemble-pu</id>
- <formats>
- <format>jar</format>
- <format>dir</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>target/classes</directory>
- <lineEnding>keep</lineEnding>
- <outputDirectory>/</outputDirectory>
- <includes>
- <include>**/**</include>
- </includes>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <useProjectArtifact>false</useProjectArtifact>
- <useTransitiveDependencies>false</useTransitiveDependencies>
- <outputDirectory>lib</outputDirectory>
- <excludes>
- <exclude>org.qi4j.entitystore.gigaspaces:common</exclude>
- </excludes>
- </dependencySet>
- <dependencySet>
- <useProjectArtifact>false</useProjectArtifact>
- <useTransitiveDependencies>true</useTransitiveDependencies>
- <useTransitiveFiltering>true</useTransitiveFiltering>
- <outputDirectory>lib</outputDirectory>
- <includes>
- <include>org.qi4j.entitystore.gigaspaces:common</include>
- </includes>
- </dependencySet>
- </dependencySets>
-</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/java/org/qi4j/entitystore/gigaspaces/processor/Processor.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/java/org/qi4j/entitystore/gigaspaces/processor/Processor.java b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/java/org/qi4j/entitystore/gigaspaces/processor/Processor.java
deleted file mode 100644
index 5ffdf7b..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/java/org/qi4j/entitystore/gigaspaces/processor/Processor.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.qi4j.entitystore.gigaspaces.processor;
-
-import org.qi4j.entitystore.gigaspaces.common.Data;
-
-import org.openspaces.events.adapter.SpaceDataEvent;
-
-
-/**
- * The processor simulates work done no un-processed Data object. The processData
- * accepts a Data object, simulate work by sleeping, and then sets the processed
- * flag to true and returns the processed Data.
- */
-public class Processor {
-
- private long workDuration = 100;
-
- /**
- * Sets the simulated work duration (in milliseconds). Default to 100.
- */
- public void setWorkDuration(long workDuration) {
- this.workDuration = workDuration;
- }
-
- /**
- * Process the given Data object and returning the processed Data.
- *
- * Can be invoked using OpenSpaces Events when a matching event
- * occurs.
- */
- @SpaceDataEvent
- public Data processData(Data data) {
- // sleep to simulate some work
- try {
- Thread.sleep(workDuration);
- } catch (InterruptedException e) {
- // do nothing
- }
- data.setProcessed(true);
- data.setData("PROCESSED : " + data.getRawData());
- System.out.println(" ------ PROCESSED : " + data);
- return data;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/resources/META-INF/spring/pu.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/resources/META-INF/spring/pu.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/resources/META-INF/spring/pu.xml
deleted file mode 100644
index d7e98cb..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/resources/META-INF/spring/pu.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:os-core="http://www.openspaces.org/schema/core"
- xmlns:os-events="http://www.openspaces.org/schema/events"
- xmlns:os-remoting="http://www.openspaces.org/schema/remoting"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.openspaces.org/schema/core http://www.openspaces.org/schema/core/openspaces-core.xsd
- http://www.openspaces.org/schema/events http://www.openspaces.org/schema/events/openspaces-events.xsd
- http://www.openspaces.org/schema/remoting http://www.openspaces.org/schema/remoting/openspaces-remoting.xsd">
-
- <!--
- Spring property configurer which allows us to use system properties (such as user.name).
- -->
- <bean id="propertiesConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
- <!--
- Enables the usage of @GigaSpaceContext annotation based injection.
- -->
- <os-core:giga-space-context/>
-
- <!--
- A bean representing a space (an IJSpace implementation).
-
- Note, we do not specify here the cluster topology of the space. It is declated outside of
- the processing unit or within the SLA bean.
- -->
- <os-core:space id="space" url="/./space" />
-
- <!--
- Defines a local Jini transaction manager.
- -->
- <os-core:local-tx-manager id="transactionManager" space="space"/>
-
- <!--
- OpenSpaces simplified space API built on top of IJSpace/JavaSpace.
- -->
- <os-core:giga-space id="gigaSpace" space="space" tx-manager="transactionManager"/>
-
- <!--
- The data processor bean
- -->
- <bean id="dataProcessor" class="org.qi4j.entitystore.gigaspaces.processor.Processor"/>
-
- <!--
- A polling event container that perfoms (by default) polling take operations against
- the space using the provided template (in our case, and the non processed data objects).
- Once a match is found, the data processor bean event listener is triggered using the
- annotation adapter.
- -->
- <os-events:polling-container id="dataProcessorPollingEventContainer" giga-space="gigaSpace">
- <os-events:tx-support tx-manager="transactionManager"/>
- <os-core:template>
- <bean class="org.qi4j.entitystore.gigaspaces.common.Data">
- <property name="processed" value="false"/>
- </bean>
- </os-core:template>
- <os-events:listener>
- <os-events:annotation-adapter>
- <os-events:delegate ref="dataProcessor"/>
- </os-events:annotation-adapter>
- </os-events:listener>
- </os-events:polling-container>
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/resources/META-INF/spring/sla.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/resources/META-INF/spring/sla.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/resources/META-INF/spring/sla.xml
deleted file mode 100644
index 83931d1..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/main/resources/META-INF/spring/sla.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:os-sla="http://www.openspaces.org/schema/sla"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.openspaces.org/schema/sla http://www.openspaces.org/schema/sla/openspaces-sla.xsd">
-
- <!--
- The SLA bean used when deploying this processing unit to the Service Grid.
-
- The SLA uses a partitioned schema with primary and backup. It will create 2
- partitions each with a single backup.
-
- The SLA bean also mandates that a primary and a backup won't run under the same
- GSC by setting the maxInstancesPerVM to 1.
- -->
- <os-sla:sla cluster-schema="partitioned-sync2backup" number-of-instances="2" number-of-backups="1"
- max-instances-per-vm="1">
- </os-sla:sla>
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorIntegrationTest-context.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorIntegrationTest-context.xml b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorIntegrationTest-context.xml
deleted file mode 100644
index 15df896..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorIntegrationTest-context.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:os-core="http://www.openspaces.org/schema/core"
- xmlns:os-events="http://www.openspaces.org/schema/events"
- xmlns:os-remoting="http://www.openspaces.org/schema/remoting"
- xmlns:os-sla="http://www.openspaces.org/schema/sla"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.openspaces.org/schema/core http://www.openspaces.org/schema/core/openspaces-core.xsd
- http://www.openspaces.org/schema/events http://www.openspaces.org/schema/events/openspaces-events.xsd
- http://www.openspaces.org/schema/remoting http://www.openspaces.org/schema/remoting/openspaces-remoting.xsd
- http://www.openspaces.org/schema/sla http://www.openspaces.org/schema/sla/openspaces-sla.xsd">
-
- <!--
- Spring property configurer which allows us to use system properties (such as user.name).
- -->
- <bean id="propertiesConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-
- <!--
- A bean representing a space (an IJSpace implementation).
- -->
- <os-core:space id="space" url="/./processorSpace" lookup-groups="processor-integrartion-tests" />
-
- <!--
- Defines a local Jini transaction manager.
- -->
- <os-core:local-tx-manager id="transactionManager" space="space"/>
-
- <!--
- OpenSpaces simplified space API built on top of IJSpace/JavaSpace.
- -->
- <os-core:giga-space id="gigaSpace" space="space" tx-manager="transactionManager"/>
-
- <!--
- The data processor bean
- -->
- <bean id="dataProcessor" class="org.qi4j.entitystore.gigaspaces.processor.Processor"/>
-
- <!--
- A polling event container that perfoms (by default) polling take operations against
- the space using the provided template (in our case, and the non processed data objects).
- Once a match is found, the data processor bean event listener is triggered using the
- annotation adapter.
- -->
- <os-events:polling-container id="dataProcessorPollingEventContainer" giga-space="gigaSpace">
- <os-events:tx-support tx-manager="transactionManager"/>
- <os-core:template>
- <bean class="org.qi4j.entitystore.gigaspaces.common.Data">
- <property name="processed" value="false"/>
- </bean>
- </os-core:template>
- <os-events:listener>
- <os-events:annotation-adapter>
- <os-events:delegate ref="dataProcessor"/>
- </os-events:annotation-adapter>
- </os-events:listener>
- </os-events:polling-container>
-</beans>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorIntegrationTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorIntegrationTest.java b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorIntegrationTest.java
deleted file mode 100644
index ee9aabe..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorIntegrationTest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.qi4j.entitystore.gigaspaces.processor;
-
-import org.qi4j.entitystore.gigaspaces.common.Data;
-
-import org.junit.runner.RunWith;
-import org.junit.Before;
-import org.junit.After;
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import org.openspaces.core.GigaSpace;
-
-
-/**
- * Integration test for the Processor. Uses similar xml definition file (ProcessorIntegrationTest-context.xml)
- * to the actual pu.xml. Writs an unprocessed Data to the Space, and verifies that it has been processed by
- * taking a processed one from the space.
- */
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration
-public class ProcessorIntegrationTest {
-
- @Autowired
- GigaSpace gigaSpace;
-
- @Before
- @After
- public void clearSpace() {
- gigaSpace.clear(null);
- }
-
- @Test
- public void verifyProcessing() throws Exception {
- // write the data to be processed to the Space
- Data data = new Data(1, "test");
- gigaSpace.write(data);
-
- // create a template of the processed data (processed)
- Data template = new Data();
- template.setType(1l);
- template.setProcessed(true);
-
- // wait for the result
- Data result = gigaSpace.take(template, 500);
- // verify it
- assertNotNull("No data object was processed", result);
- assertEquals("Processed Flag is false, data was not processed", true, result.isProcessed());
- assertEquals("Processed text mismatch", "PROCESSED : " + data.getRawData(), result.getData());
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorTest.java b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorTest.java
deleted file mode 100644
index f815204..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/processor/src/test/java/org/qi4j/entitystore/gigaspaces/processor/ProcessorTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.qi4j.entitystore.gigaspaces.processor;
-
-import org.qi4j.entitystore.gigaspaces.common.Data;
-
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-
-
-/**
- * A simple unit test that verifies the Processor processData method actually processes
- * the Data object.
- */
-public class ProcessorTest {
-
- @Test
- public void verifyProcessedFlag() {
- Processor processor = new Processor();
- Data data = new Data(1, "test");
-
- Data result = processor.processData(data);
- assertEquals("verify that the data object was processed", true, result.isProcessed());
- assertEquals("verify the data was processed", "PROCESSED : " + data.getRawData(), result.getData());
- assertEquals("verify the type was not changed", data.getType(), result.getType());
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/readme.txt
----------------------------------------------------------------------
diff --git a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/readme.txt b/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/readme.txt
deleted file mode 100644
index 75b3019..0000000
--- a/extensions/entitystore-gigaspaces/qi4j-entitystore-gs-sample/readme.txt
+++ /dev/null
@@ -1,106 +0,0 @@
-Creates a basic SBA application with two processing units. The Feeder
-processing unit sends Data objects through the Space to a Processor.
-The Space and the Processor are collocated in the same processing unit.
-JVM: >= 5.
-
-GENERAL DESCRIPTION:
---------------------
-
- The project consists of three modules: common, processor and feeder. The common
-module includes all the shared resources and classes between both the processor
-and the feeder. In our case, the common module includes the "Data" class which
-is written and taken from the Space.
-
- The processor module, which is a processing unit, starts up a Space and on top of
-it starts a polling container that performs a take from the Space of unprocessed Data
-entries. The take operation results in an "event" that will end up executing the
-"Processor" class. The Processor "processes" the Data object (by setting its processed
-flag to true) and returns it. The return value is automatically written back to the Space.
- The processor also comes with both a unit test and integration test that verifies its behavior.
-
- The feeder module, which is also a processing unit, connects to a Space remotely and
-writes unprocessed Data objects to the Space (resulting in events firing up within
-the processor processing unit).
-
-BUILDING, PACKAGING, RUNNING, DEPLOYING
----------------------------------------
-
-Quick list:
-
-* mvn compile: Compiles the project.
-* mvn os:run: Runs the project.
-* mvn test: Runs the tests in the project.
-* mvn package: Compiles and packages the project.
-* mvn os:run-standalone: Runs a packaged application (from the jars).
-* mvn os:deploy: Deploys the project onto the Service Grid.
-* mvn os:undeploy: Removes the project from the Service Grid.
-
- In order to build the example, a simple "mvn compile" executed from the root of the
-project will compile all the different modules.
-
- Packaging the application can be done using "mvn package" (note, by default, it also
-runs the tests, in order to disable it, use -DskipTests). The packaging process jars up
-the common module. The feeder and processor modules packaging process creates a
-"processing unit structure" directory within the target directory called [app-name]-[module].
-It also creates a jar from the mentioned directory called [app-name]-[module].jar.
-
- In order to simply run both the processor and the feeder (after compiling), "mvn os:run" can be used.
-This will run a single instance of the processor and a single instance of the feeder within
-the same JVM using the compilation level classpath (no need for packaging).
- A specific module can also be executed by itself, which in this case, executing more than
-one instance of the processing unit can be done. For example, running the processor module with
-a cluster topology of 2 partitions, each with one backup, the following command can be used:
-mvn os:run -Dmodule=processor -Dcluster="total_members=2,1".
-
- In order to run a packaged processing unit, "mvn package os:run-standalone" can be used (if
-"mvn package" was already executed, it can be omitted). This operation will run the processing units
-using the packaged jar files. Running a specific module with a cluster topology can be executed using:
-mvn package os:run-standalone -Dmodule=processor -Dcluster="total_members=2,1".
-
- Deploying the application requires starting up a GSM and at least 2 GSCs (scripts located under
-the bin directory within the GigaSpaces installation). Once started, running "mvn package os:deploy"
-will deploy the two processing units.
- When deploying, the SLA elements within each processing unit descriptor (pu.xml) are taken into
-account. This means that by default when deploying the application, 2 partitions, each with
-one backup will be created for the processor, and a single instance of the feeder will be created.
- A special note regarding groups and deployment: If the GSM and GSCs were started under a specific
-group, the -Dgroups=[group-name] will need to be used in the deploy command.
-
-WORKING WITH ECLIPSE
---------------------
-
- In order to generate eclipse project the following command need to be executed from the root of
-the application: "mvn eclipse:eclipse". Pointing the Eclipse import existing project wizard
-to the application root directory will result in importing the three modules.
-If this is a fresh Eclipse installation, the M2_REPO needs be defined and pointed to the local
-maven repository (which resides under USER_HOME/.m2/repository).
-
- The application itself comes with built in launch targets allowing to run the processor and the
-feeder using Eclipse run (or debug) targets.
-
-A NOTE OF CLUSTERING
---------------------
-
- This application focus on showing how SBA is used. The processor starts up an embedded Space and
-works directly on it. When deploying 2 partitions of the processor, two embedded spaces (within the
-same cluster) will be created, with each polling container working only on the cluster member it
-started in an in memory and transactional manner. This is the power of such an architecture, where
-the processing of the Data happens in a collocated manner with the Data. If we want to add High
-Availability to the processor, we can deploy 2 partitions, each with one backup (2,1). In this
-case, the processor instances that ends up starting a cluster member Space which is the backup
-will not perform any processing since the polling container identifies the Space state and won't
-perform the take operation. If one of the processor primaries instances will fail, the backup
-instance will become primary (with an up to date data), and its polling container will start
-processing all the relevant Data. Note, when deploying on top of the Service Grid, the Service
-Grid will also identify that one instance failed, and will automatically start it over in another
-container (GSC).
-
- The feeder works with a clustered view of the Space (the 2,1 cluster topology looking as one), and
-simply writes unprocessed Data objects to the Space. The routing (@SpaceRouting) controls to which
-partition the unprocessed Data will be written and consequently which instance will process it.
-
-MAVEN PLUGIN WIKI PAGE
----------------------------------
-
- For more information about the Maven Plugin please refer to:
-http://www.gigaspaces.com/wiki/display/XAP71/Maven+Plugin
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/dev-status.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/dev-status.xml b/extensions/entitystore-javaspaces/dev-status.xml
deleted file mode 100644
index 1e523b4..0000000
--- a/extensions/entitystore-javaspaces/dev-status.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1">
- <status>
- <codebase>early</codebase>
- <!--none,early,beta,stable,mature-->
- <documentation>none</documentation>
- <!-- none, brief, good, complete -->
- <unittests>none</unittests>
- <!-- none, some, good, complete -->
- </status>
- <licenses>
- <license>ALv2</license>
- </licenses>
-</module>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/pom.xml b/extensions/entitystore-javaspaces/pom.xml
deleted file mode 100644
index 09f3d0d..0000000
--- a/extensions/entitystore-javaspaces/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.qi4j.sandbox</groupId>
- <artifactId>qi4j-sandbox-extensions</artifactId>
- <version>0-SNAPSHOT</version>
- </parent>
- <groupId>org.qi4j.extension</groupId>
- <artifactId>qi4j-entitystore-javaspaces</artifactId>
- <packaging>jar</packaging>
- <name>Qi4j Extension - Entity Store - Java Spaces</name>
-
- <dependencies>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.spi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.runtime</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.bootstrap</artifactId>
- </dependency>
- <dependency>
- <groupId>org.qi4j.core</groupId>
- <artifactId>org.qi4j.core.testsupport</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library</groupId>
- <artifactId>org.qi4j.library.locking</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-core</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.river</groupId>
- <artifactId>jini-ext</artifactId>
- <version>2.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-javaspaces</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-lookup</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.qi4j.library.jini</groupId>
- <artifactId>org.qi4j.library.jini-transaction</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <profiles>
- <profile>
- <id>gigaspaces</id>
- <activation>
- <property>
- <!--
- specifiy -Dcom.gs.home=$JSHOMEDIR and let that point to a local GS installation;
- we cannot use JSHOMEDIR for profile activation because:
- http://jira.codehaus.org/browse/MNG-2848
- http://jira.codehaus.org/browse/MNGECLIPSE-247
- -->
- <name>com.gs.home</name>
- </property>
- </activation>
- </profile>
- </profiles>
-
-</project>
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/readme.txt
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/readme.txt b/extensions/entitystore-javaspaces/readme.txt
deleted file mode 100644
index 1db9082..0000000
--- a/extensions/entitystore-javaspaces/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
-To compile and use this entitystore you currently need JSpaces.jar which is provided by Gigaspaces 6.0
-
-mvn -Dcom.gs.home=<your gigaspaces install dir> <goal>
-
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreMixin.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreMixin.java
deleted file mode 100644
index 6038807..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreMixin.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/* Copyright 2008 Jan Kronquist.
- *
- * Licensed 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 org.qi4j.entitystore.javaspaces;
-
-import org.qi4j.api.entity.EntityReference;
-import org.qi4j.api.injection.scope.Service;
-import org.qi4j.api.io.Input;
-import org.qi4j.api.io.Output;
-import org.qi4j.api.io.Receiver;
-import org.qi4j.api.io.Sender;
-import org.qi4j.entitystore.map.MapEntityStore;
-import org.qi4j.library.spaces.Space;
-import org.qi4j.spi.entity.EntityType;
-import org.qi4j.spi.entitystore.EntityNotFoundException;
-import org.qi4j.spi.entitystore.EntityStoreException;
-
-import java.io.*;
-
-/**
- * Java Spaces implementation of EntityStore.
- */
-public class JavaSpacesEntityStoreMixin
- implements MapEntityStore
-{
- @Service
- private Space space;
-
- public Reader get( EntityReference entityReference )
- throws EntityStoreException
- {
- String id = entityReference.identity();
- String jsonData = space.readIfExists( id );
- if( jsonData == null )
- {
- throw new EntityNotFoundException( entityReference );
- }
- return new StringReader( jsonData );
- }
-
- public Input<Reader, IOException> entityStates()
- {
- return new Input<Reader, IOException>()
- {
- public <ReceiverThrowableType extends Throwable> void transferTo( Output<Reader, ReceiverThrowableType> output ) throws IOException, ReceiverThrowableType
- {
- output.receiveFrom( new Sender<Reader, IOException>()
- {
- public <ReceiverThrowableType extends Throwable> void sendTo( Receiver<Reader, ReceiverThrowableType> receiver ) throws ReceiverThrowableType, IOException
- {
- for (String json : space)
- {
- Reader state = new StringReader( json );
- receiver.receive( state );
- }
- }
- });
- }
- };
- }
- public void applyChanges( MapChanges changes )
- throws IOException
- {
- try
- {
- changes.visitMap( new MapChanger()
- {
- public Writer newEntity( final EntityReference ref, EntityType entityType )
- throws IOException
- {
- return new StringWriter( 1000 )
- {
- @Override
- public void close()
- throws IOException
- {
- super.close();
- String stateData = toString();
- String indexKey = ref.toString();
- space.takeIfExists( indexKey );
- space.write( indexKey, stateData );
- }
- };
- }
-
- public Writer updateEntity( final EntityReference ref, EntityType entityType )
- throws IOException
- {
- return new StringWriter( 1000 )
- {
- @Override
- public void close()
- throws IOException
- {
- super.close();
- String stateData = toString();
- String indexKey = ref.toString();
- space.takeIfExists( indexKey );
- space.write( indexKey, stateData );
- }
- };
- }
-
- public void removeEntity( EntityReference ref, EntityType entityType )
- throws EntityNotFoundException
- {
- String indexKey = ref.toString();
- space.takeIfExists( indexKey );
- }
- } );
- }
- catch( Exception e )
- {
- if( e instanceof IOException )
- {
- throw (IOException) e;
- }
- else if( e instanceof EntityStoreException )
- {
- throw (EntityStoreException) e;
- }
- else
- {
- IOException exception = new IOException();
- exception.initCause( e );
- throw exception;
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreService.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreService.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreService.java
deleted file mode 100644
index 71191eb..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/entitystore/javaspaces/JavaSpacesEntityStoreService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright 2008 Jan Kronquist.
- *
- * Licensed 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 org.qi4j.entitystore.javaspaces;
-
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.service.ServiceComposite;
-import org.qi4j.api.service.Activatable;
-import org.qi4j.api.concern.Concerns;
-import org.qi4j.api.configuration.Configuration;
-import org.qi4j.library.locking.LockingAbstractComposite;
-import org.qi4j.spi.entitystore.EntityStore;
-import org.qi4j.spi.entitystore.StateChangeNotificationConcern;
-import org.qi4j.spi.entitystore.ConcurrentModificationCheckConcern;
-import org.qi4j.spi.entitystore.EntityStateVersions;
-import org.qi4j.entitystore.map.MapEntityStoreMixin;
-
-/**
- * EntityStore service backed by a Java Space
- */
-@Concerns( { StateChangeNotificationConcern.class, ConcurrentModificationCheckConcern.class } )
-@Mixins( { MapEntityStoreMixin.class, JavaSpacesEntityStoreMixin.class } )
-public interface JavaSpacesEntityStoreService
- extends EntityStore, EntityStateVersions, ServiceComposite, Activatable, LockingAbstractComposite, Configuration
-{
-}
-
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/Space.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/Space.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/Space.java
deleted file mode 100644
index f812572..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/Space.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces;
-
-public interface Space extends Iterable<String>
-{
- String readIfExists( String id );
-
- String takeIfExists( String indexKey );
-
- void write( String indexKey, String stateData );
-
- boolean isReady();
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/SpaceException.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/SpaceException.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/SpaceException.java
deleted file mode 100644
index 3d0aab7..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/SpaceException.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces;
-
-public class SpaceException extends RuntimeException
-{
-
- public SpaceException( String message, Throwable cause )
- {
- super( message, cause );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/SpaceTransaction.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/SpaceTransaction.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/SpaceTransaction.java
deleted file mode 100644
index 57de586..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/SpaceTransaction.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2009 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces;
-
-public interface SpaceTransaction
-{
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientAssembler.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientAssembler.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientAssembler.java
deleted file mode 100644
index 3c6e022..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientAssembler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces.javaspaces;
-
-import org.qi4j.bootstrap.Assembler;
-import org.qi4j.bootstrap.AssemblyException;
-import org.qi4j.bootstrap.ModuleAssembly;
-
-public class JavaSpacesClientAssembler
- implements Assembler
-{
- public void assemble( ModuleAssembly module )
- throws AssemblyException
- {
- module.addServices( JavaSpacesClientService.class ).instantiateOnStartup();
- module.addEntities( JavaSpacesClientConfiguration.class );
- }
-}
http://git-wip-us.apache.org/repos/asf/zest-sandbox/blob/25dbfc23/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientConfiguration.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientConfiguration.java b/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientConfiguration.java
deleted file mode 100644
index 0438bdd..0000000
--- a/extensions/entitystore-javaspaces/src/main/java/org/qi4j/library/spaces/javaspaces/JavaSpacesClientConfiguration.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2008 Niclas Hedhman.
- *
- * Licensed 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 org.qi4j.library.spaces.javaspaces;
-
-import org.qi4j.api.configuration.ConfigurationComposite;
-import org.qi4j.api.property.Property;
-
-public interface JavaSpacesClientConfiguration extends ConfigurationComposite
-{
- Property<String> groups();
-}