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
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
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.
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.
> Is it possible to call java from Sybase trigger ?
It might be possible, but I'm not sure it's a good idea.
%
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
> 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.
(And there is my reply that I thought was there but wasn't)
> 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.
%
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