[jboss-dev-forums] [Design of EJB 3.0] - Setting load-balance-policy

bstansberry@jboss.com do-not-reply at jboss.com
Tue Nov 13 16:58:29 EST 2007


Been trying to sort out the setting of a clustered bean's load balance policy with the unified metadata.  Simple test is to deploy the clusteredsession-test.jar from the ejb3 testsuite and see what happens.  Always get this failure:


  | Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {http://www.jboss.com/x
  | ml/ns/javaee}load-balance-policy not found as a child of {http://www.jboss.com/x
  | ml/ns/javaee}cluster-config
  |         at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startE
  | lement(SundayContentHandler.java:396)
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHan
  | dler.startElement(SaxJBossXBParser.java:407)
  |         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
  | ce)
  |         at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Sourc
  | e)
  |         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unkn
  | own Source)
  |         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
  | Dispatcher.dispatch(Unknown Source)
  |         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
  | known Source)
  |         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  |         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  |         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  |         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  |         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour                                                                            ce)
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars                                                                            er.java:189)
  |         ... 27 more
  | 

First obvious step was to add property loadBalancePolicy to ClusterConfigMetaData. Doesn't help.

Tricky thing here is for EJB2 the relevant cluster-config subelements are "home-load-balance-policy" and "bean-load-balance-policy".  For EJB3 its just "load-balance-policy".  This difference is reflected in different specifications for cluster-config in jboss_5_0.dtd vs  jboss_5_0.xsd.

When I stop the deploy in a debugger I see that JBossXB is expecting the EJB2 properties, even though ejb-jar specifies ejb-jar_3_0.xsd.  The jboss.xml is properly specifying the xmlns and xsi:schemaLocation as well.  

The parsing is being handling by the JBossEjbParsing deployer when this happens.

Any ideas?

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

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



More information about the jboss-dev-forums mailing list