Subject | Re: Java trigger & SP future.... |
---|---|
Author | Roman Rokytskyy |
Post date | 2003-04-28T14:19:28Z |
Hi,
a) make your Java code accessible from C/C++, good source of
information would be
http://java.sun.com/docs/books/tutorial/native1.1/invoking/index.html
b) create a UDF(s) that will call you C/C++ wrapper of you Java code.
Alternative:
a) try using gcc for Java to compile Java into native code
(http://gcc.gnu.org/java/)
there are some good examples showing that it makes sense (for example,
Jim Starkey, original architect of InterBase/Firebird, had embedded
JVM in his new Netfrastructure engine). But this seems to be rather
complex task.
events. Unfortunatelly they are not yet available in JayBird.
If you are not afraid implementing this part of the API and would like
to contribute it to JayBird, we will try to help you and review your
code before adding it to the CVS. If you plan to contribute code on
regular basis, you will get write access.
Another solution for your problem would be to define a set of "events"
in the database and store information about them in some table.
Polling new "events" from that table should be fast enough (I think it
will be faster than invoking JVM).
Best regards,
Roman Rokytskyy
> where can I get some information about using UDF to call java codeI do not think that anybody have done this before. But the idea is simple:
> via JNI.
a) make your Java code accessible from C/C++, good source of
information would be
http://java.sun.com/docs/books/tutorial/native1.1/invoking/index.html
b) create a UDF(s) that will call you C/C++ wrapper of you Java code.
Alternative:
a) try using gcc for Java to compile Java into native code
(http://gcc.gnu.org/java/)
> I'm using Jaybird. I would improve my system's perfomance.I have no experience in embedding JVM into native applications, but
there are some good examples showing that it makes sense (for example,
Jim Starkey, original architect of InterBase/Firebird, had embedded
JVM in his new Netfrastructure engine). But this seems to be rather
complex task.
> Now I make a poll in orden to know whether something has happened inYes, correct way of solving your problem would be using Firebird
> my db.
>
> Another question related: is there any way to use Firebird Database
> Events with Jaybird. It could be other possible solution for my
> problem.
events. Unfortunatelly they are not yet available in JayBird.
If you are not afraid implementing this part of the API and would like
to contribute it to JayBird, we will try to help you and review your
code before adding it to the CVS. If you plan to contribute code on
regular basis, you will get write access.
Another solution for your problem would be to define a set of "events"
in the database and store information about them in some table.
Polling new "events" from that table should be fast enough (I think it
will be faster than invoking JVM).
Best regards,
Roman Rokytskyy