Tuesday, April 22, 2014

Change hostname in weblogic datasource / connection pool without restarting entire weblogic

A while ago, I posted to change password without restart weblogic, we saw similar issue when we had to change the hostname of the datasource. Changing the hostname in datasource didn't show as effective right away, however after following below steps, it worked like a charm:

  • Change the hostname in connection pool on WebLogic Console for a specific datasource 
  • Untarget the datasource from all servers
 
  • Retarget the datasource to all servers where it was configured before
  • Shutdown Datasource
  • Start Datasource

Tuesday, April 1, 2014

Shutdown composite

Just a sample code to shutdown your composite in your Java Embed activity:

try {       
   oracle.soa.management.facade.Locator locator = oracle.soa.management.facade.LocatorFactory.createLocator();         
   oracle.soa.management.util.CompositeFilter compositeFilter = new oracle.soa.management.util.CompositeFilter();         
   compositeFilter.setCompositeDN("default/CompositeShutdown!1.0");         
   java.util.List<oracle.soa.management.facade.Composite> composites = locator.getComposites(compositeFilter);         
   for(oracle.soa.management.facade.Composite composite: composites) {         
      composite.stop();         
   }       
} catch (Exception e) {         
   e.printStackTrace();        
}