+ }
+
+ public Object getBean(Class clazz) {
+ return context.getBean(clazz);
+ }
+
+ public <T extends IService> T getService(Class<T> clazz) {
+ return context.getBean(clazz);
+ }
+
+ public DataSource getDataSource() {
+ return dataSource;
+ }
+
+ public JDBCConnectionPool getConnectionPool() {
+ return connPool;
+ }
+
+
+// public static JDBCConnectionPool createConnectionPool() {
+// return new J2EEConnectionPool(getCurrent().getDataSource());
+// }
+
+// public static JDBCConnectionPool getConnectionPool() {
+// return new J2EEConnectionPool(getCurrent().getDataSource());
+// }
+
+
+
+ public static Connection getConnection() throws SQLException {
+ return getCurrent().getDataSource().getConnection();
+ }
+
+ public static DatabaseMetaData getDatabaseMetaData() throws SQLException {
+ if(databaseMetaData == null) {
+ Connection conn = getConnection();
+ databaseMetaData = conn.getMetaData();
+ conn.close();
+ }
+ return databaseMetaData;
+ }
+
+ public static ICdmRepository getApplicationConfiguration() {
+ return (ICdmRepository) getCurrent().getBean("cdmRepository");
+ }
+ public static ITaxonService getTaxonService() {
+ return (ITaxonService)getCurrent().getBean(ITaxonService.class);
+ }
+
+ public static ITaxonNodeService getTaxonNodeService() {
+ return (ITaxonNodeService)getCurrent().getBean(ITaxonNodeService.class);
+ }
+
+ public static IReferenceService getReferenceService() {
+ return (IReferenceService)getCurrent().getBean(IReferenceService.class);
+ }
+
+ public static INameService getNameService() {
+ return (INameService)getCurrent().getBean(INameService.class);
+ }
+
+ public static ICommonService getCommonService() {
+ return (ICommonService)getCurrent().getBean(ICommonService.class);
+ }
+
+ public static IClassificationService getClassificationService() {
+ return (IClassificationService)getCurrent().getBean(IClassificationService.class);
+ }
+
+ public static IVocabularyService getVocabularyService() {
+ return (IVocabularyService)getCurrent().getBean(IVocabularyService.class);
+ }
+
+ public static ITermService getTermService() {
+ return (ITermService)getCurrent().getBean(ITermService.class);
+ }
+
+ public static IDescriptionService getDescriptionService() {
+ return (IDescriptionService)getCurrent().getBean(IDescriptionService.class);
+ }
+
+ public static IPreferenceService getPreferenceService() {
+ return (IPreferenceService)getCurrent().getBean(IPreferenceService.class);
+ }
+
+