I would like to experiment a with the xpetstore application and AOP so I tried to deploy it on both JBoss 3.2.4RC2 and 4.0.0DR4 but I get a parse exception that I did not encounter when deploying the exact same ear on 3.2.3:
16:56:24,820 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "Order" at line 1, column 23. Was expecting one of: "IN" ... <ABSTRACT_SCHEMA> ...
16:56:24,931 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=OrderItemLocal,service=EJB org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(o) FROM Order AS o WHERE o.customer.userId = ?1'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "Order" at line 1, column 23. Was expecting one of: "IN" ... <ABSTRACT_SCHEMA> ... )
<query> <query-method> <method-name>findByCustomer</method-name> <method-params> <method-param>java.lang.String</method-param> </method-params> </query-method> <ejb-ql>[CDATA[SELECT OBJECT(o) FROM Order AS o WHERE o.customer.userId = ?1]]</ejb-ql> </query>
ORDER is reserved as part of ORDER BY so the error is correct behavior according to JBoss.