[jboss-dev-forums] [Design of POJO Server] - Porting Hibernate MBean / deployer

alesj do-not-reply at jboss.com
Fri Dec 7 15:22:19 EST 2007


org.jboss.hibernate.jmx.Hibernate 'deployer' uses this piece of code:

  |    private URL determineHarUrl() throws Exception
  |    {
  |       log.trace( "Attempting to determine HarUrl..." );
  |       DeploymentInfo deploymentInfo = getDeploymentInfo();
  |       if ( deploymentInfo == null )
  |       {
  |          log.warn( "Unable to locate deployment info [" + getServiceName() + "]" );
  |          return null;
  |       }
  | 
the interesting/critical part is this method:

  |    public DeploymentInfo getDeploymentInfo()
  |       throws JMException
  |    {
  |       Object[] args = {serviceName};
  |       String[] sig = {serviceName.getClass().getName()};
  |       DeploymentInfo sdi = (DeploymentInfo) server.invoke(SARDeployerMBean.OBJECT_NAME,
  |          "getService", args, sig);
  |       return sdi;
  |    }
  | 
Which returns null, since old SARDeployer isn't used anymore, hence empty ObjectName --> DeploymentInfo map.

Is there an equivalent thing?
Or should I go and write new deployer from scratch?

But since this class isn't really a true deployer, it's a simple MBean that knew how to do a URL lookup for entities, ... how to resemble between regualar mbeans and Hibernate mbean / 'deployer'?

We can force the Hibernate users to declare this mbean in a renamed file, instead of jboss-service.xml it could be simple hibernate.xml.

Any ideas on this port?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111321#4111321

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111321



More information about the jboss-dev-forums mailing list