DAS: JMX/AMX createJDBCResourceConfig() dosent work, creates only 2 mbeans
Hello, I have a problem when using createJDBCResourceConfig() to create a jdbc resource from my application on the Sun App Server via DAS.'
After it gets created on the server it dosent get enabled and dosent have the necessary mbeans attached to it.
I do the following:
Map<String, String> opt = new HashMap<String, String>(); opt.put(ResourceConfigKeys.ENABLED_KEY, Boolean.TRUE.toString()); jdbcrc = domainroot.getDomainConfig().createJDBCResourceConfig("jdbc/newdbcon","derby_netPool", opt);
And that result in a jdbc resource on the server, but its missing alot of MBeans, that result in an unmanageable resource, cant delete , enable or modify it.
(ObjectName, ClassName):
com.sun.appserv:type=jdbc-resource,jndi-name=jdbc/newdbcon,category=config
com.sun.enterprise.admin.config.BaseConfigMBean
amx:j2eeType=X-JDBCResourceConfig,name=jdbc/newdbcon
com.sun.appserv.management.config.JDBCResourceConfig
But should be like this:
amx:X-StandaloneServerConfig=server,j2eeType=X-ResourceRefConfig,name=jdbc/shbs
com.sun.appserv.management.config.ResourceRefConfig
amx:j2eeType=X-JDBCResourceConfig,name=jdbc/shbs
com.sun.appserv.management.config.JDBCResourceConfig
amx:J2EEServer=server,j2eeType=JDBCResource,name=jdbc/shbs
com.sun.appserv.management.j2ee.JDBCResource
com.sun.appserv:type=jdbc-resource,jndi-name=jdbc/shbs,category=config
com.sun.enterprise.admin.config.BaseConfigMBean
com.sun.appserv:j2eeType=JDBCResource,name=jdbc/shbs,J2EEServer=server,category=runtime
com.sun.enterprise.admin.runtime.BaseRuntimeMBean
com.sun.appserv:type=resource-ref,ref=jdbc/shbs,server=server,category=config
com.sun.enterprise.admin.config.BaseConfigMBean
Then I tried to make the MBeans manually via:
ObjectName objn = new ObjectName("com.sun.appserv:j2eeType=JDBCResource,name=jdbc/newdbcon,J2EEServer=server,category=runtime");
//MBSC is MBeanServerConnection
mbsc.createMBean("com.sun.enterprise.admin.runtime.BaseRuntimeMBean", objn);
But that only results in exceptions where it stats it not an MBean etc.
Im stumped and the AMX / DAS information I can find dosent seem to cover this any good, so please help if you can, and thanks for all the help in advance.
Please help,
Kevin

