Changeset 29657

Show
Ignore:
Timestamp:
01/27/08 11:44:27 (10 months ago)
Author:
bstefanescu
Message:

added support for sending jndi props to clients

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.runtime/branches/autoconfig/src/main/java/org/nuxeo/runtime/config/AbstractServerConfiguration.java

    r29013 r29657  
    2626import org.nuxeo.runtime.Version; 
    2727import org.nuxeo.runtime.api.Framework; 
    28 import org.nuxeo.runtime.api.ServiceLocator; 
    2928import org.nuxeo.runtime.api.login.SecurityDomain; 
    3029 
     
    4241 
    4342    protected Properties properties; 
     43 
     44    protected Properties jndiProperties; 
    4445 
    4546    protected SecurityDomain[] securityDomains; 
     
    133134    } 
    134135 
     136    public Properties getJndiProperties() { 
     137        if (jndiProperties == null) { 
     138            jndiProperties = new Properties(); 
     139            for (Map.Entry<Object,Object> entry :  properties.entrySet()) { 
     140                String key = entry.getKey().toString(); 
     141                if (key.startsWith("jndi.")) { 
     142                    jndiProperties.put(key, entry.getValue()); 
     143                } 
     144            } 
     145        } 
     146        return jndiProperties; 
     147    } 
     148 
     149    /** 
     150     * @param jndiProperties the jndiProperties to set. 
     151     */ 
     152    public void setJndiProperties(Properties jndiProperties) { 
     153        this.jndiProperties = jndiProperties; 
     154    } 
     155 
    135156// TODO 
    136157//    public ServiceLocator getServiceLocator() { 
  • org.nuxeo.runtime/branches/autoconfig/src/main/java/org/nuxeo/runtime/config/ServerConfiguration.java

    r29013 r29657  
    4848    public Properties getProperties(); 
    4949 
     50    /** 
     51     * Get the JNDI properties required by clients to connect to this server 
     52     * @return 
     53     */ 
     54    public Properties getJndiProperties(); 
    5055 
    5156    /** 
  • org.nuxeo.runtime/branches/autoconfig/src/main/java/org/nuxeo/runtime/config/v1/ConfigurationFactory1.java

    r29016 r29657  
    2323import java.util.Properties; 
    2424 
    25 import javax.naming.InitialContext; 
    26  
    2725import org.jboss.remoting.InvokerLocator; 
    2826import org.nuxeo.runtime.Version; 
    2927import org.nuxeo.runtime.api.Framework; 
    30 import org.nuxeo.runtime.api.JBossServiceLocator; 
    3128import org.nuxeo.runtime.api.ServiceDescriptor; 
    3229import org.nuxeo.runtime.api.ServiceHost; 
     
    3835import org.nuxeo.runtime.config.ConfigurationHelper; 
    3936import org.nuxeo.runtime.config.ServerConfiguration; 
     37import org.nuxeo.runtime.osgi.OSGiRuntimeService; 
    4038import org.nuxeo.runtime.services.streaming.StreamingService; 
     39import org.omg.CORBA.FREE_MEM; 
    4140 
    4241/** 
     
    8180        //TODO config.setServiceBindings(bindings); 
    8281 
    83         // 3. set the service locator to be used to lookup services located on this server 
    84         //TODO: collect JNDI Properties to connect to the server 
     82        // 3. set the client Jndi properties for this server 
     83        //config.setJndiProperties(getJNDIProperties()); 
    8584 
    8685        // 4. collect peer information 
     
    146145    } 
    147146 
     147    public Properties getJNDIProperties() { 
     148        // for now JNDI properties are stored in the main properties file using a prefix 
     149        // of jndi. 
     150        return null; 
     151    } 
     152 
    148153}