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();
}