You are using the source from cvs tip, right?  Yesterday, I checked in the
new read ahead code. This code supports read ahead on-find and read ahead of
relationships. This required a change in the read-ahead metadata.  The new
read ahead xml is as follows:

<read-ahead>
        <strategy>on-load</strategy>
        <page-size>500</page-size>
        <eager-load-group>group name</eager-load-group>
</read-ahead>

strategy is required and must be none, on-load, or on-find.
page-size is the number of rows that the server will block load.
eager-load-group is the name of the load group which will be eager loaded
(either on-load or on-find).

The new read-ahead metadata can be in defaults, entity, query specification,
and relationship-role.

This change also necessated a change in load group specification.  Now there
is a load-groups element which has load-groups elements. Each load-group has
a load-group-name and one or more field-names. Then entity eager-load-group
only contains the name of the load to eager load by default, and the
lazy-load-groups element contain one or more load-group-names. An example
follows:

<load-groups>
   <load-group>
      <load-group-name>basic</load-group-name>
      <field-name>name</field-name>
      <field-name>type</field-name>
   </load-group>
   <load-group>
      <load-group-name>pricing info</load-group-name>
      <field-name>unit</field-name>
      <field-name>costPerUnit</field-name>
      <field-name>weight</field-name>
   </load-group>
   <load-group>
      <load-group-name>shipping info</load-group-name>
      <field-name>weight</field-name>
      <field-name>length</field-name>
      <field-name>girth</field-name>
   </load-group>
</load-groups>

<eager-load-group>basic</eager-load-group>

<lazy-load-groups>
   <load-group-name>basic</load-group-name>
   <load-group-name>pricing info</load-group-name>
   <load-group-name>shipping info</load-group-name>
</lazy-load-groups>

Read the dtd for more info.  You should be able to add cmr fields that have
a foreign key to a load group. Not all of this works perfectly yet, but you
get the idea.  I'm an testing this and fixing bugs right now.

-dain

> -----Original Message-----
> From: Steve Knight [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 16, 2002 1:55 PM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] Problem with CMP2.0 example
> 
> 
> 
> Before I start banging my head against the wall...does anyone 
> know of any 
> obvious reasons why the cmp2.0 example fails to deploy in JBoss 3.0a.
> Here is the Exception:
> 
> 
> 2002-01-16 14:22:28,650 DEBUG 
> [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.AddressEJB] 
> Initializing 
> CMP plugin for AddressEJB
> 2002-01-16 14:22:31,120 DEBUG 
> [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.AddressEJB] Loading 
> standardjbosscmp-jdbc.xml : 
> file:/D:/cygwin/home/KnightS/MyCVS/jboss-all/build/output/jbos
> s-3.0.0alpha/conf/default/standardjbosscmp-jdbc.xml
> 2002-01-16 14:22:31,950 DEBUG 
> [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.AddressEJB] 
> jar:file:/D:/cygwin/home/KnightS/MyCVS/jboss-all/build/output/
jboss-3.0.0alpha/tmp/deploy/Default/cmp2->
example.ear/ejb1003.jar!/META-INF/jbosscmp-jdbc.xml 
> found. Overriding defaults
> 2002-01-16 14:22:32,170 ERROR 
> [org.jboss.ejb.ContainerFactory] Could not 
> deploy 
> file:/D:/cygwin/home/KnightS/MyCVS/jboss-all/build/output/jbos
> s-3.0.0alpha/tmp/deploy/Default/cmp2-example.ear
> org.jboss.deployment.DeploymentException: expected one strategy tag
>       at org.jboss.metadata.MetaData.getUniqueChild(MetaData.java:95)
>       at 
> org.jboss.metadata.MetaData.getUniqueChildContent(MetaData.java:202)
>       at 
> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCReadAheadMetaData.
> <init>(JDBCReadAheadMetaData.java:91)
>       at 
> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<in
> it>(JDBCEntityMetaData.java:505)
>       at 
> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaDat
> a.<init>(JDBCApplicationMetaData.java:237)
>       at 
> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load
> (JDBCXmlFileLoader.java:75)
>       at 
> org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntity
> MetaData(JDBCStoreManager.java:505)
>       at 
> org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.create(JDBCSto
reManager.java:277)
>       at 
> org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersiste
nceManager.java:134)
>       at 
> org.jboss.ejb.EntityContainer.create(EntityContainer.java:309)
>       at org.jboss.ejb.Application.start(Application.java:214)
>       at 
> org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:389)
>       at 
> org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:312)
>       at java.lang.reflect.Method.invoke(Native Method)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1628)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1523)
>       at 
> org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:468)
>       at 
> org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploye
r.java:439)
>       at 
> org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:203)
>       at java.lang.reflect.Method.invoke(Native Method)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1628)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1523)
>       at 
> org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:681)
>       at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:325)
>       at java.lang.Thread.run(Thread.java:484)
> 2002-01-16 14:22:32,280 ERROR 
> [org.jboss.deployment.J2eeDeployer#Default] 
> Starting cmp2-example.ear failed!
> java.lang.NullPointerException
>       at 
> org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.stop(JDBCStore
Manager.java:348)
>       at 
> org.jboss.ejb.plugins.CMPPersistenceManager.stop(CMPPersistenc
eManager.java:180)
>       at org.jboss.ejb.EntityContainer.stop(EntityContainer.java:375)
>       at org.jboss.ejb.Application.stop(Application.java:240)
>       at 
> org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:402)
>       at 
> org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:312)
>       at java.lang.reflect.Method.invoke(Native Method)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1628)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1523)
>       at 
> org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:468)
>       at 
> org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploye
r.java:439)
>       at 
> org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:203)
>       at java.lang.reflect.Method.invoke(Native Method)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1628)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1523)
>       at 
> org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:681)
>       at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:325)
>       at java.lang.Thread.run(Thread.java:484)
> 2002-01-16 14:22:32,330 INFO  
> [org.jboss.deployment.J2eeDeployer#Default] 
> Module cmp2-example.ear is not running
> 2002-01-16 14:22:32,330 DEBUG 
> [org.jboss.management.j2ee.J2EEManagedObject] 
> preDeregister(), parent: 
> SingleJBoss:J2EEDomain=Manager,name=Single,type=J2EEServer
> 2002-01-16 14:22:32,390 INFO  
> [org.jboss.deployment.J2eeDeployer#Default] 
> Destroying application cmp2-example.ear
> 2002-01-16 14:22:32,390 INFO  
> [org.jboss.deployment.J2eeDeployer#Default] 
> Destroyed
> 2002-01-16 14:22:32,390 ERROR 
> [org.jboss.deployment.AutoDeployer] Deployment 
> failed: 
> file:/D:/cygwin/home/KnightS/MyCVS/jboss-all/build/output/jbos
> s-3.0.0alpha/deploy/cmp2-example.ear
> org.jboss.deployment.J2eeDeploymentException: Error while starting 
> cmp2-example.ear: null, Cause: java.lang.NullPointerException
>       at 
> org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:554)
>       at 
> org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploye
r.java:439)
>       at 
> org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:203)
>       at java.lang.reflect.Method.invoke(Native Method)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1628)
>       at 
> com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.
java:1523)
>       at 
> org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:681)
>       at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:325)
>       at java.lang.Thread.run(Thread.java:484)
> 
> 
> 
> Thanks,
> 
> Steve Knight
> 
> 
> 
> 
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to