Changeset 30306

Show
Ignore:
Timestamp:
02/19/08 19:05:09 (9 months ago)
Author:
bstefanescu
Message:

jboss service lookup is using by default the /local suffix when the runtime is in a jboss server and /remote when the runtime is on a client app. (outside jboss)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.runtime/branches/1.4/nuxeo-runtime/src/main/java/org/nuxeo/runtime/api/JBossServiceLocator.java

    r30068 r30306  
    4343        if (properties != null) { 
    4444            prefix = properties.getProperty("prefix", "nuxeo/"); 
    45             suffix = properties.getProperty("suffix", "/remote"); 
     45            suffix = properties.getProperty("suffix", getDefaultSuffix()); 
    4646            // these properties are set only by the client autonficonguration system if needed 
    4747            String value = properties.getProperty(Context.PROVIDER_URL); 
     
    6767    } 
    6868 
     69    public String getDefaultSuffix() { 
     70        return System.getProperty("jboss.home.dir") == null ? "/remote" : "/local"; // if not in jboss return "/remote" 
     71    } 
     72 
    6973} 
  • org.nuxeo.runtime/branches/1.4/nuxeo-runtime/src/main/java/org/nuxeo/runtime/api/ServiceDescriptor.java

    r30068 r30306  
    5858 
    5959    @XNode("locator") 
    60     private String locator; 
     60    private String locatorPattern; // the locator pattern used to compute the final locator 
     61    private transient String locator; // this will be re-computed on the client side 
    6162 
    6263    private ServiceGroup group; 
     
    160161     */ 
    161162    public String getLocator() { 
    162         return locator
     163        return locator == null ? locatorPattern : locator
    163164    } 
    164165