-
1. Re: EJB-QL supported type in JBoss 3.0.4
pope Jan 24, 2003 4:19 AM (in response to nadia)For the first problem:
- i think that you just jumped over to the third argument that is not defined for that finder
- try to put some paranthesis around the conditions
For the second:
<<JBossQL is a superset of EJB-QL that is designed to address some of the inadequacies of
EJB-QL. In addition to a more flexible syntax, new functions, key words, and clauses have been
added to JBossQL.>>
For more on this i think you must subscribe to the documentation of JBoss.
Note: i am not working at jboss.
pope
---
There are only solutions -
2. Re: EJB-QL supported type in JBoss 3.0.4
nadia Jan 24, 2003 4:55 AM (in response to nadia)Hi Alexandru,
>For the first problem:
>- i think that you just jumped over to the third argument >that is not defined for that finder
--> It's an error of me, the real code is :
<method-params>
<method-param>java.math.BigDecimal</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(o)
FROM CurrentMessage AS o
WHERE o.nombre = ?1 AND o.strId = ?2
</ejb-ql>
>- try to put some paranthesis around the conditions
--> I've done it without but it still wrong.
>For more on this i think you must subscribe to the documentation of JBoss.
--> I agree with you but for the moment I can't. It doesn't depend on me ...
But I really wonder if the BigDecimal type is supported by JBoss .... cause, if I put 2 string it runs, if I put an integer, it also runs ...
Thanks for your help.
Nadia -
3. Re: EJB-QL supported type in JBoss 3.0.4
noel.rocher Jan 24, 2003 5:16 AM (in response to nadia)Hi Nadia,
Which is your DB.
With MSSQLSERVER2000 big decimal is translated as you can see in your jbosscmpjdbc.xml in the conf directory of your server.
====================================
...
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
====================================
Tell me if it helps
Noel -
4. Re: EJB-QL supported type in JBoss 3.0.4
noel.rocher Jan 24, 2003 5:22 AM (in response to nadia)Sorry Nadia,
I've seen your previous message ...
Noel -
5. Re: EJB-QL supported type in JBoss 3.0.4
nadia Jan 24, 2003 5:30 AM (in response to nadia)Hi noel,
I'm using Oracle 9i.
>With MSSQLSERVER2000 big decimal is translated as you can see in your jbosscmpjdbc.xml in the conf directory of your server.
--> ahhhhhhhh !!!!!
I didn't know that file !!!!
So here is the part interesting for me in the standardjbosscmp-jdbc.xml :
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>DECIMAL</jdbc-type>
<sql-type>NUMBER(38,15)</sql-type>
So Jboss accep it .... good !
My question is know : What should I do with that file ?
Should I copy it in my server\deploy directory ?
Should I change my ejb-ql request and write DECIMAL or NUMBER(38,15) ?
That the first time i use it so i don't really know how to do ...
Thanks for your help.
Nadia -
6. Re: EJB-QL supported type in JBoss 3.0.4
noel.rocher Jan 24, 2003 7:31 AM (in response to nadia)Nadia,
1) The files here describe the default behavior of JBoss.
Each one can be overload in your deployment descriptors (web & EJB).
2) as far as we talk about type mapping, you have to think that it's the way JBoss knows how to translate java type in your finders (or selects) to SQL depending on the DB you configure in your datasources. So you have to check if your database column type you use is compatible with the one JBoss will use (in your case NUMBER(38,15) ).
3) It's good to know that people from Atos Origin are interested in this kind of product and not only on big brands' ones.
Noel -
7. Re: EJB-QL supported type in JBoss 3.0.4
nadia Jan 28, 2003 4:29 AM (in response to nadia)Ok, thanks.
Nadia