call java from sybase trigger

Is it possible to call java from Sybase trigger ? If so can you please supply example or URL to one ? Alternative solution is to call shell script from sybase trigger (as app is based on Solaris).

Regards

Michal

[230 byte] By [michal.stachurskia] at [2007-11-27 10:29:48]
# 1

Normal java require a VM.

Thus to call it a VM must exist in the database.

Oracle has a VM. Whether Sybase has one would require research on your part.

If there is no VM then some other mechanism would be needed, such as scripting. That would actually be an application. Note doing this is a trigger is going to be relatively expensive in terms of what it will do to database performance.

jschella at 2007-7-28 17:59:35 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2

Thank you for your reply. I know that Sybase comes with its own VM which make me more optimistic. If someone knows more details on how to achieve what I want to do, please reply to me post.

stachurskima at 2007-7-28 17:59:35 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

> Is it possible to call java from Sybase trigger ?

It might be possible, but I'm not sure it's a good idea.

%

duffymoa at 2007-7-28 17:59:35 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4

Thank for your opinion, but what idea is better ? pooling a table every 30 sec. ?. I need to implment real-time system which process each trade from table once it appears there.

Cheers

stachurskima at 2007-7-28 17:59:35 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5

> Thank for your opinion, but what idea is better ?

> pooling a table every 30 sec. ?. I need to implment

> real-time system which process each trade from table

> once it appears there.

>

job/task queue.

- Entries are put into a table.

- That table is polled and new entries are processed.

- Once process entries are either removed or marked as completed.

jschella at 2007-7-28 17:59:35 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6

(And there is my reply that I thought was there but wasn't)

jschella at 2007-7-28 17:59:35 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 7

> Thank for your opinion, but what idea is better ?

Doing things in the middle tier, where Java lives.

Ever heard of event-based trading systems?

> pooling a table every 30 sec. ?. I need to implment

> real-time system which process each trade from table

> once it appears there.

Sounds like you have it backwards - you're trying to drive Java from the database.

I think it'd be better to write that event-based system in Java and leave the database just for persistence.

GigaSpaces and their ilk are being used this way for highly transactional trading systems. Maybe you could see how they're doing it.

%

duffymoa at 2007-7-28 17:59:35 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 8

here is all the information that you need about Sybase Adaptive server Enterprise and Java:

http://infocenter.sybase.com/help/index.jsp?toc=/com.sybase.help.ase_15.0/toc.xml

rulerma at 2007-7-28 17:59:35 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...