Alex

Greenhorn
+ Follow
since Dec 19, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alex

Hi
Does anyone know how to enable dynamic ejb-ql queries in weblogic 7.0?
Also how to execute these dynamic queries once they are built.
the weblogic documentation isnt really sufficient.
Thanks
20 years ago
Hello again,
I tried the query by putting it in as a finder in the ejb jar xml an extract from the ejb jar file is below:
<query>
<query-method>
<method-name>findStoresInStoreGroups</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
<method-param>java.lang.Integer</method-param>
</method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(locn) FROM LocationEntity AS locn, IN(locn.StoreGroupMemberEntity) AS group WHERE group.locationIdGroup = ?1 AND group.locationTypeIdGroup = ?2
</ejb-ql>
</query>
and i got the following error when running ejbc? any ideas?
[java] [EJBCompiler] : Compliance Checker said bean was compliant
[java] ERROR: Error from ejbc: Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
[java]
[java] weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
[java] While trying to process Query
[java] Method Name: findStoresInStoreGroups
[java] Parameter Types: (java.lang.Integer, java.lang.Integer)
[java] EJB Query: SELECT OBJECT(locn) FROM LocationEntity AS locn, IN(locn.StoreGroupMemberEntity) AS group WHERE group.locationIdGroup = ?1 AND group.locationTypeIdGroup = ?2
[java] )
[java] Could not parse EJB QL expression: SELECT OBJECT(locn) FROM LocationEntity AS locn, IN(locn.StoreGroupMemberEntity) AS group WHERE group.locationIdGroup = ?1 AND group.locationTypeIdGroup = ?2
[java] weblogic.ejb20.ejbc.EJBCException: line 1: unexpected token: WHERE
[java] Error in FROM clause, there may be a problem with the FROM Clause.
[java] Check that the Range Variable Declarations and the Collection Member Declarations are correct
[java] and that no EJB QL keywords are being used as:
[java] Range Variable names,
[java] Collection Member names,
[java] Abstract Schema names,
Also would this be a ejb select method or is it just a normal finder method?
Thanks for the reply!
Would I put this query into the ejb jar descriptor enclosed within the entity for table A or enclosed within the entity tags for table B. I know that the ejbql will be wtihin a query tag.
Hi,
Can somebody please give me some advice on how to construct ejbql queries when using cmr fields?
For example: I have two tables table A which has got 4 fields in it a b c and d. fields A nd B are primary key fields in table A. And Table B which has 5 fields in it K, E, F , G and H.
Fields G, and H in table B are foreign key fields to Table A.
Table A has a one to many relationship with Table B. (Table B has a one to one with Table A)
If i search in Table B with integer values for E and F it returns me a collection of rows. Each row is a entity local. The values for G and H in these rows map to the primary key fields in Table A which are A and B.
For every result in the collection I want to search table A with the values in G and H.
In sql i would have to do a join between the two tables. How would I do this using EJB_QL?
i think it can be done using the select method rather than a finder method but am not sure how to implement it.

Thanks in advance
Hi,
I have a web based application where the user enters some fields for a form then saves the data. The user later then wants to print the details in a specified format i.e like a form. does anybody have any suggestions how to do this?
I cannot use window.print() function from the jsp because this will print the internet headings at the top of the page, All i want to print is the details on the jsp page in a specified format
Thanks
20 years ago
If i initialise an object via jndi lookup in the setSessionContext method of an EJB Is it possible to add this object to the context so that I can retrieve it from the context at some point much further in the transaction.
how would I add it to the context? How would I get it out of the context? Can it be done? Any code examples would be appreciated.
In addition if this EJB was a client to another EJB say EJB2 would I be able to get access to the object intialised in the sesionContext of EJB1 from EJB2?
Thanks