Scienze  
Syllabus ItalianoSyllabus IngleseindexlogoutArea Personale UNITN
Sistemi distribuiti: design Forum del Corso Messaggi del Thread
 
Sistemi distribuiti: design - Forum del Corso
Messaggi del Thread

Autore Messaggio
paolo.campigotto
Thread
  Post Postato: 11 febbraio 2005
   Titolo: Doubt with EJB-QL
 

Hi,
       i have two questions for you.
The first one is a problem about EJB-QL programming.
Remember that, creating a CMP Entity Bean, in your ejb-jar.xml file you must write the EJB-QL code for user-defined finder methods. If the type of a Bean field is a particular class (for example java.util.Date), in an EJB-QL query can i access its  public methods using an OO fashion? 
In  order to understand the problem, here is a small example:

  <query>
    <query-method>
       <method-name> findByDate </method-name>
       <method-params>
           <method-param>java.util.Date </method-param>
       </method-params>
    </query-method>
    <ejb-ql>
      <![CDATA[SELECT OBJECT(b) 
        FROM Bank AS b WHERE b.ultimoPrelievo.before (?1)]]>
    </ejb-ql>
  </query>

Where ultimoPrelievo is a Bank entity bean field of type java.util.Date and Boolean before (Date d) is a method of java.util.Date.


The second problem is really more practice. Deploying a simple jar file in my JBoss server, i get this error (here i report only the most significant output lines):

Info: Class not found on 'examples.CountBean': Unexpected error during load of: examples.CountBean, msg=examples/CountBean (Unsupported major.minor version 49.0)

01:02:03,152 ERROR [MainDeployer] could not create deployment: file:/C:/Programmi/jboss3.2.3/server/default/deploy/LittleDemo.jar

Is it meaningful for someone?

Thanks in advance to everybody who will help me.
                                         
afogarolli
  Post Postato: 11 febbraio 2005
   Titolo: Re: Doubt with EJB-QL
 

Hi!
I sincerly didn't understand the first question: "in an EJB-QL query can i access its  public methods using an OO fashion?"
What do you mean with OO fashion? EJB-QL is like SQL of course you can access the fields for checking porpose (es. cmp-field1=?). The function of EJB-QL is the same as SQL but it's just less powerful.

Let's concentrate on the second question...
It'seems that the AS can not deploy the project LittleDemo because it can not find examples.CountBean class.
When jboss trys to deploy a jar it first read ejb-jar.xml and than it checks if all the classes that are listed in the ejb-jar.xml file exist in the root of the jar. So try checking if you write right the ejb-jar and if the archive contains the right class.
If you can not solve the problem send me the application I would check it out.
 
Progetto eLeaf
Contact eLeaf team