• First of all, executing a java program from a trigger is a bad idea, because transactions must be short. Second, I'd guess the java program connects to database and performs some checks and updates, which is also a bad idea as it creates another transaction with its own locks. Third, java programs have its own problems, if not coded carefully.

    It would be better if trigger performed all necessary checks. 😎