This content has been marked as final. Show 4 replies
The early parts of the documentation you are looking at describe sessions. For a tutorial and examples, I'd recommend:
has all the docs and tutorials for different TopLink versions.
The example looks correct, are you using JPA or the native API? The TopLink Session is the main object in TopLink, you can create one through code, or through the SessionManager and a sessions.xml, or if your using JPA, you can access it from the JPA EntityManager. The documentation includes a section of the Using Sessions, perhaps start by reviewing this.
If you are using JPA and EclipseLink, there are now annotations for NamedStoredProcedureQuery's, and you could use the EclipseLink JpaQuery API to set a DataModifyQuery into a JPA Query.
James : http://www.eclipselink.org
Thx for your help..
I forgot to mention that I creating a web application using framework JSF in Eclipse. I found this thread and it works Using Stored Procedures with TopLink / JPA : Success explanation
my problemy still not solved :( If I using CallableStatement from this example - Using Stored Procedures with TopLink / JPA : Success explanation , I can not return record type :( And I need to return the type of record.. I don't now, if StoredProcedureCall can return this types, but I think that is possiblem, isn't it?
2 jsutherl :
How did you mean using JPA EntityManager to acces from calling stored procedures? (Do you have some example pls? :) ) Or I can use EntityManager to create session? In this example Using Stored Procedures with TopLink / JPA : Success explanation I can create Unit Of Work, but if I want create session from EntityManager, then still returns NullPointer Exceptions! There is another way to call stored procedures of the Oracle with using the JPA?
And how work NamedStoredProcedureQuery's in EclipseLink? :) They can return record type?
P.S. Sry for my English ;)
P.P.S. And how can I create session through the code?
Edited by: KLD on Nov 3, 2008 4:21 AM