2 Replies Latest reply on May 11, 2004 5:00 PM by Jerrold Eads

    Multiple container configuration for one entity

    Jerrold Eads Newbie

      Deployment error:
      2004-05-11 11:03:55,625 ERROR [org.jboss.metadata.XmlFileLoader] failed to load jboss.xml.
      There could be a syntax error.
      org.jboss.deployment.DeploymentException:
      Error in jboss.xml for Bean MSSQLServer2000MetaData_ActivityEventCode:
      expected only one configuration-name tag

      I am trying to use both configurations since I need optimistic locking and insert after post
      create. When I try to deploy I get an error because there are two configuration-names. Is
      there a way around this?

      < entity>
      < ejb-name>MSSQLServer2000MetaData_Users</ejb-name >
      < local-jndi-name>MSSQLServer2000MetaData_Users</local-jndi-name >
      < !-- Non nullable foreign keys use a specific configuration so inserts follow post create. -- >
      < configuration-name>INSERT after ejbPostCreate Container</configuration-name >
      < !-- Optimistic locking uses a specific configuration -- >
      < configuration-name>Optimistic Container</configuration-name >


      < container-configurations>
      < !-- <Extends Standard CMP 2.x EntityBean for the purpose of inserting record after post create>-- >
      < container-configuration extends="Standard CMP 2.x EntityBean">
      < container-name>INSERT after ejbPostCreate Container</container-name >
      < insert-after-ejb-post-create>true</insert-after-ejb-post-create >
      </container-configuration >
      < !-- <Extends Per Transaction for the purpose of Optimistic Locking JE 8/18/2003> -- >
      < container-configuration extends="Instance Per Transaction CMP 2.x EntityBean">
      < container-name>Optimistic Container</container-name >
      < !-- <overrides: org.jboss.ejb.plugins.lock.noLock> -- >
      < locking-policy>org.jboss.ejb.plugins.lock.OptimisticLocking</locking-policy >
      </container-configuration >
      </container-configurations >