Home » Developer & Programmer » JDeveloper, Java & XML » Instances of Java classes lifespan in Oracle (Oracle 10g)
Instances of Java classes lifespan in Oracle [message #329716] Thu, 26 June 2008 05:37 Go to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Hello everyone,

I wanted to know if, once a Java class created in oracle, it were possible for me to create instances of it in oracle itself and manipulate its attributes via its own methods. From what I understood of Java integration with Oracle (until now), one can create classes with methods that interact with oracle counterparts a bit like RPC - Java methods being the skeleton and Oracle procedures and functions acting like the stubs...but that does not provide me with full OOP power since my 'instances' exist only for the time of a call on a method.
With this configuration, my java classes do not exist throughout different procedure calls and no persistance is made possible.

I would appreciate if someone could shed more light on this

regards,

Didier
Re: Instances of Java classes lifespan in Oracle [message #329772 is a reply to message #329716] Thu, 26 June 2008 08:16 Go to previous messageGo to next message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
Hi,

Someone correct me on this if I am wrong. As I know, Yes, you can't do Object Persistence in calling your java class/objects from pl/sql. It's kind of limited to calling only (class) static methods from pl/sql, which somehow defeats the idea of OOP. I've also encountered this before as there are java classes that I need but require object persistence to achieve it's "true use", and I can't seem to find an article to somehow create a counterpart/holder of that java object in pl/sql to handle it. Maybe on the newer versions of Oracle this is now possible. Hope I've explained it clearly. (sorry for my english)

Regards,
Rhani
Re: Instances of Java classes lifespan in Oracle [message #329898 is a reply to message #329772] Fri, 27 June 2008 00:13 Go to previous messageGo to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
In fact you did, friend Razz

Thanks for the reply. Hope they've bundled this functionality in Oracle 11g.

regards,
Didier

[Updated on: Fri, 27 June 2008 00:17]

Report message to a moderator

Re: Instances of Java classes lifespan in Oracle [message #329966 is a reply to message #329716] Fri, 27 June 2008 02:46 Go to previous messageGo to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
...just one thing though, knowing that instances are not possible with 10g, can I at least envisage to implement persistence via object serialization?

regards,
Didier

Re: Instances of Java classes lifespan in Oracle [message #329998 is a reply to message #329716] Fri, 27 June 2008 04:40 Go to previous messageGo to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Sorry if I seem to be talking to myself but I think I coined something here. I'm considering using object serialisation and oracle Directories to implement persistence of java objects through different method calls. In your enlightened opinion, do you believe it's worth digging?


regards,
Didier
Re: Instances of Java classes lifespan in Oracle [message #330037 is a reply to message #329998] Fri, 27 June 2008 07:23 Go to previous message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
hi,

Yeah! i think it can! hmmmmm that's worth trying =) If the speed and integrity of your application won't be affected by the delay in going thru read/writes of java objects i think it will somehow solved it =)

Regards,
Rhani
Previous Topic: Keeping list of values in a separate application definition
Next Topic: loading xml file into table
Goto Forum:
  


Current Time: Tue Nov 05 13:30:09 CST 2024