[jboss-user] [Microcontainer] - Re: Code example for a basic parsing deployer

alesj do-not-reply at jboss.com
Wed Apr 2 10:46:53 EDT 2008


I think you're misusing BasicXMLDeployer.
This one expects KernelDeployment. As the exception and code clearly say. :-)
So your URL must point to MC beans xml file.

OK, I'm guessing here.
You have a file that is your custom xml.
e.g.

  | <remoting>
  |    <endpoint name="someendpoint"/>
  | </remoting>
  | 
And you want to get RemotingMD out.
Then all you need to is to change that line

  |       KernelDeployment deployment = (KernelDeployment) unmarshaller.unmarshal(url.toString(), resolver);
  | 
to

  |       RemotingMD deployment = (RemotingMD) unmarshaller.unmarshal(url.toString(), resolver);
  | 
Since the unmarshaller already knows about your schema (if it is previously registered).
And the CCE proves that, by knowing the RemotingMD class.

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

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



More information about the jboss-user mailing list