modified for weblogic.(temporary support)