View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.transport.rmi;
8   
9   import org.mule.jndi.MuleInitialContextFactory;
10  import org.mule.tck.services.MatchingMethodsComponent;
11  import org.mule.tck.services.SimpleMathsComponent;
12  
13  import javax.naming.InitialContext;
14  
15  public class MuleRMIFactory
16  {
17  
18      public Object create() throws Exception
19      {
20          InitialContext ic = new InitialContext();
21          ic.addToEnvironment(InitialContext.INITIAL_CONTEXT_FACTORY, MuleInitialContextFactory.class.getName());
22  
23          // Bind our service object
24          ic.bind("SimpleMathsUMO", new SimpleMathsComponent());
25          ic.bind("MatchingUMO", new MatchingMethodsComponent());
26          ic.bind("TestService", new MatchingMethodsComponent());
27          return ic;
28      }
29  
30  }