This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB-QL Select methods

 
Carlos Llona
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello helppp:

the spec says in 11.2.2

Select methods?Select methods are a special type of query method not directly exposed
through the client view. The Bean Provider typically uses select methods to select the persistent
state of an entity object or to select entities that are related to the entity bean for which the
query is defined. The result type of a select method can be an EJBLocalObject (or a collection
of EJBLocalObjects), an EJBObject (or a collection of EJBObjects), or a cmp-field value (or a
collection of such).


I think that the results should be EJBlocalObjects or collecions or cmp-field value (or a collection of such). Why does the result will be ejbObject (remotes) is it right?, In witch cases it would be objects remotes???

sorry my inglish is poor
 
guojun shan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
give a example ,the following is the ejb-jar.xml OF A EJB NAMED CabinEJB:

<entity>
<ejb-name>CabinEJB</ejb-name>
<home>com.titan.cabin.CabinHomeRemote</home>
<remote>com.titan.cabin.CabinRemote</remote>
<ejb-class>com.titan.cabin.CabinBean</ejb-class>
<abstract-schema-name>Cruise</abstract-schema-name>
...
</entity>

THE following EJB QL is correct,right?

SELECT OBJECT(C) FROM Cruise C

so ,it can got a ejbobject or collections of ejbobjects
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic