<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.open-xchange.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Open-Xchange-RMI</id>
	<title>Open-Xchange-RMI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.open-xchange.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Open-Xchange-RMI"/>
	<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Open-Xchange-RMI&amp;action=history"/>
	<updated>2026-11-03T09:33:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wiki.open-xchange.com/wiki/index.php?title=Open-Xchange-RMI&amp;diff=20567&amp;oldid=prev</id>
		<title>Dominik.epple: Created page with &quot;= How to provision Open-Xchange with Java RMI =  == Overview ==  You need a clone of the backend git repo. Therein you find the com.openexchange.admin.rmi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.open-xchange.com/wiki/index.php?title=Open-Xchange-RMI&amp;diff=20567&amp;oldid=prev"/>
		<updated>2015-09-24T13:22:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= How to provision Open-Xchange with Java RMI =  == Overview ==  You need a clone of the &lt;a href=&quot;/wiki/index.php?title=SourceCodeAccess&quot; title=&quot;SourceCodeAccess&quot;&gt;backend git repo&lt;/a&gt;. Therein you find the com.openexchange.admin.rmi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= How to provision Open-Xchange with Java RMI =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
You need a clone of the [[SourceCodeAccess|backend git repo]]. Therein you find the com.openexchange.admin.rmi package which contains the RMI bindings to the provisioning interface.&lt;br /&gt;
&lt;br /&gt;
A documentation of the interface is given here: http://software.open-xchange.com/products/appsuite/doc/RMI&lt;br /&gt;
&lt;br /&gt;
Example source is given below. &lt;br /&gt;
&lt;br /&gt;
To build and run, put the .java files shown below in a directory and use something like&lt;br /&gt;
&lt;br /&gt;
 javac -d build -cp ~/git/backend.git/com.openexchange.admin.rmi/src:. *.java&lt;br /&gt;
 java -cp build CreateContext&lt;br /&gt;
 java -cp build ListContext&lt;br /&gt;
 java -cp build CreateUser&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
(or a build system / IDE of your choice).&lt;br /&gt;
&lt;br /&gt;
Example: CreateContext.java&lt;br /&gt;
&lt;br /&gt;
 import java.util.Map;&lt;br /&gt;
 import java.util.HashMap;&lt;br /&gt;
 import java.util.Arrays;&lt;br /&gt;
 import java.rmi.Naming;&lt;br /&gt;
 import java.rmi.NotBoundException;&lt;br /&gt;
 import java.rmi.RemoteException;&lt;br /&gt;
 import java.net.MalformedURLException;&lt;br /&gt;
 import com.openexchange.admin.rmi.OXContextInterface;&lt;br /&gt;
 import com.openexchange.admin.rmi.dataobjects.Context;&lt;br /&gt;
 import com.openexchange.admin.rmi.dataobjects.Credentials;&lt;br /&gt;
 import com.openexchange.admin.rmi.dataobjects.Database;&lt;br /&gt;
 import com.openexchange.admin.rmi.dataobjects.User;&lt;br /&gt;
 import com.openexchange.admin.rmi.dataobjects.UserModuleAccess;&lt;br /&gt;
 import com.openexchange.admin.rmi.exceptions.ContextExistsException;&lt;br /&gt;
 import com.openexchange.admin.rmi.exceptions.InvalidCredentialsException;&lt;br /&gt;
 import com.openexchange.admin.rmi.exceptions.InvalidDataException;&lt;br /&gt;
 import com.openexchange.admin.rmi.exceptions.NoSuchContextException;&lt;br /&gt;
 import com.openexchange.admin.rmi.exceptions.StorageException;&lt;br /&gt;
 &lt;br /&gt;
 public class CreateContext {&lt;br /&gt;
 &lt;br /&gt;
     static String RMI_HOSTNAME           = &amp;quot;rmi://192.168.101.84:1099/&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
     public static void main(final String args[]) {&lt;br /&gt;
 &lt;br /&gt;
         Context ctx = new Context();&lt;br /&gt;
         ctx.setId(2001);&lt;br /&gt;
         ctx.setName(&amp;quot;performance2001&amp;quot;);&lt;br /&gt;
         ctx.setMaxQuota(100l);&lt;br /&gt;
         ctx.addLoginMappings(Arrays.asList(&amp;quot;defaultcontext,unfug&amp;quot;.split(&amp;quot;,&amp;quot;)));&lt;br /&gt;
 &lt;br /&gt;
         final Integer db = new Integer(3);&lt;br /&gt;
         if( null != db ) {&lt;br /&gt;
             ctx.setWriteDatabase(new Database(db));&lt;br /&gt;
         }&lt;br /&gt;
 &lt;br /&gt;
         final Map&amp;lt;String,Map&amp;lt;String,String&amp;gt;&amp;gt; userAttributes = new HashMap&amp;lt;String,Map&amp;lt;String,String&amp;gt;&amp;gt;();&lt;br /&gt;
         final Map&amp;lt;String,String&amp;gt; taxMap = new HashMap&amp;lt;String,String&amp;gt;();&lt;br /&gt;
         taxMap.put(&amp;quot;types&amp;quot;, &amp;quot;strangedomain&amp;quot;);&lt;br /&gt;
         userAttributes.put(&amp;quot;taxonomy&amp;quot;, taxMap);&lt;br /&gt;
         ctx.setUserAttributes(userAttributes);&lt;br /&gt;
 &lt;br /&gt;
         User user = new User();&lt;br /&gt;
         user.setName(&amp;quot;oxadmin&amp;quot;);&lt;br /&gt;
         user.setDisplay_name(&amp;quot;OX Admin&amp;quot;);&lt;br /&gt;
         user.setGiven_name(&amp;quot;OX&amp;quot;);&lt;br /&gt;
         user.setSur_name(&amp;quot;Admin&amp;quot;);&lt;br /&gt;
         user.setPassword(&amp;quot;secret&amp;quot;);&lt;br /&gt;
         user.setPrimaryEmail(&amp;quot;oxadmin@performance2001&amp;quot;);&lt;br /&gt;
         user.setEmail1(&amp;quot;oxadmin@performance2001&amp;quot;);&lt;br /&gt;
         user.setTimezone(&amp;quot;Europe/Berlin&amp;quot;);&lt;br /&gt;
         user.setLanguage(&amp;quot;de_DE&amp;quot;);&lt;br /&gt;
         String accessCombinationName = &amp;quot;all&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
         Credentials auth = new Credentials(&amp;quot;oxadminmaster&amp;quot;, &amp;quot;secret&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
         try {&lt;br /&gt;
             final OXContextInterface oxctx = (OXContextInterface) Naming.lookup(RMI_HOSTNAME +OXContextInterface.RMI_NAME);&lt;br /&gt;
             Context created = oxctx.create(ctx, user, accessCombinationName, auth);&lt;br /&gt;
             System.out.println(&amp;quot;Context &amp;quot; + created.getId() + &amp;quot; successfully created.&amp;quot;);&lt;br /&gt;
         } catch (RemoteException e) {&lt;br /&gt;
             e.printStackTrace();&lt;br /&gt;
         } catch (StorageException e) {&lt;br /&gt;
             e.printStackTrace();&lt;br /&gt;
         } catch (InvalidCredentialsException e) {&lt;br /&gt;
             e.printStackTrace();&lt;br /&gt;
         } catch (InvalidDataException e) {&lt;br /&gt;
             e.printStackTrace();&lt;br /&gt;
         } catch (MalformedURLException e) {&lt;br /&gt;
             e.printStackTrace();&lt;br /&gt;
         } catch (NotBoundException e) {&lt;br /&gt;
             e.printStackTrace();&lt;br /&gt;
         } catch (ContextExistsException e) {&lt;br /&gt;
             e.printStackTrace();&lt;br /&gt;
         }&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Dominik.epple</name></author>
	</entry>
</feed>