/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4969756
* @summary Test that the same native library coming from the same jar file can
* be loaded twice by two different MLets on the same JVM without conflict.
* @author Luis-Miguel Alventosa
* @run clean LibraryLoaderTest
* @run build LibraryLoaderTest
* @run main LibraryLoaderTest
*/
public class LibraryLoaderTest {
{"testDomain:type=MLet,index=0", "UseNativeLib0.html"},
{"testDomain:type=MLet,index=1", "UseNativeLib1.html"}
};
// Check for supported platforms:
//
//
return;
}
} else {
}
try {
// Create MBeanServer
//
// Create MLet instances and call getRandom on the loaded MBeans
//
// Create ObjectName for MLet
//
// Display old library directory and set it to test.classes
//
// Get MBeans from URL
//
"getMBeansFromURL",
// Iterate through all the loaded MBeans
//
// Now ensure none of the returned objects is a Throwable
//
". The shown Throwable was caught.");
}
// On each of the loaded MBeans, try to invoke their
// native operation
//
try {
} catch (ReflectionException e) {
"the shown exception, occured when" +
" attempting to invoke a native " +
"library based operation.");
}
}
}
} catch (Exception e) {
}
}
}