Using a sql trigger to start a java program

I want 2 create a trigger on an update to a table in SQL Server, that will start a java program, is this possible?
and if so, how do I do this...?
thanks

tried something similar but not exactly, should work though. in the update trigger, in databases such as 8i onwards, use a java stored procedure to code an RMI client that calls the server. implement the server as Activatable and it should start up.

Similar Messages

  • Starting a java program on System boot/startup

    Hi,
    I am trying to find out how to start a java program on system startup which basically spawns a Thread which in turn does some processing.
    Came across windows specific options which help one make it as a service.Making a .bat for windows and .sh for linux could be a option but not sure where to put these in respective OS or whether it is a good option.
    If someone has tried out similar thing please let me know the details for the same.
    Regards
    Raj

    [codes]
    in command prompt
    type edit startupor somename.bat
    then type
    cd C:\Program Files\Java\jdk1.5.0_01\bin
    javac data1.java
    java data1
    and save
    [codes]
    copy startup.bat file
    and click on start-->programs--> startup(rigthclick and open)
    then paste that file into that folder...
    now you ll get that file opened whenever system boots.
    reply if this was usefull;)

  • How to start a java program as a start-up service in Linux?

    i sucessfully started a java program by adding a script to /etc/init.d,
    but in the script, i have to type the full path of the java laucher, the environment variables are not loaded on startup, what should be done to avoid the full path in the script? Any one has a similiar experience or got a solution to share?

    I'm replying to myself .... ;-) ahah
    All we need for this purpose is JavaService, at link
    http://www.alexandriasc.com/software/JavaService/index.html

  • How do you start a java program with more RAM alloaction

    Hi
    can anyone please tell me how to start a java program to start with lots of RAM (RAM size is sent as a parameter), I have seen it somewhere and now I cant remember it. I have a server application to run this way.
    thanks and rgds
    sunil

    see the tooldocs of java: http://java.sun.com/j2se/1.4/docs/tooldocs/tools.html

  • ASP code to start a Java program (with parameters)

    Hi! All,
    I am trying to write some ASP code which should start a java program. Does anybody know a simple way to do this? Am new to ASP
    Thanks

    It doesn't have anything to do with java.
    Basically you need to make a system call which will start an external application. The external application can be anything including something like "java MyClass".
    So either find an ASP forum/board/newsgroup to ask how to do a system call or read some docs on it.

  • Start a java program from an FMB then read and write some variables

    Hello,
    I am trying to see whether the following setup works:
    item A, B, D and Button Z are on a Forms Canvas.
    User clicks on Button Z. This will launch a java program (Myprog class).
    Myprog main will read values in item A and B, run some calculation and then will return it back to our forms module and then will be displayed in item D.
    I have read about PL/SQL wrapper but the way I am looking at my setup is that my Forms module will be just the GUI interface.
    Any ideas ?

    main thing: a JAVA class that will take some inputs and will output some results and messages.
    Prob: I do not want to use swing or any other GUI builder to make a nice GUI for my JAVA class.
    What I want: I know how to use Forms. As such, I just want to put together a quick interface (mymodule.fmb) that when executed will allow the user to click on a button to start the java process and then see the results and error messages.
    Why I don't want to go through SWING: my main prob is to get the java class executed ( which is fine right now thru command line) by other users thru a GUI interface. I do not have time to go thru SWING.
    From the paper I mentioned, I think the PJC is the way to go. Can you please confirm ?
    Thanks.

  • How to start a java program on another machine from one on my machine.

    During the next few weeks, I will be designing a grid computing system for a research project I am working on. The grid will be written entirely in java using java 2 SE. The question I have is, is there a way for the main program to remotely start the other programs on the other machines? I am very familiar with most networking concepts, but java is not my primary language so I was having trouble tracking down this feature if java even has it. Any suggestions you have would be greatly appreciated.
    thanks

    The administrators of each machine have agreed to install my java programs so that I may run my software. Worst case scenario I can have them manually start my program on each machine. The grid is to be the backbone of a very large simulation software to simulate around 18 million ISO shipping containers and the boats and ports they are on. The simulation will be used to test several security system designs. Because of the large scale of the problem, the solution has been decided to be a distributed system so that we can spread the load over a large number of systems. I understand the whole start a service on the other machines concept. I am looking for a way to start an already installed java program with as little human intervention as possible. The service idea will work. What I was looking for more specifically was a way to start the java virtual machine and run my code without having to leave a program running on their machine because like i said earlier they are personal machines. anyways if it is not do able I understand. Like I said, java is a second language and I don't yet know its limits or restraints.

  • Starting a java program on a ordinary windows computer (without JDK)

    I have made an ordinary java program which reads from a specified text file, changes it a bit and then creates a new file with the new text. This works good when I use a computer with an JDK installed, but I must be able to run this program on a Windows 2000 computer (without any "extras" installed, only the programs that are included in Windows 2000). The reason for this is that I'm not allowed to install programs on this computer. Can anyone help me?

    You neither need to
    1- have a JRE installed on the computer (Java Runtime Environment)
    The Java Virtual Machine to convert the compiled byte code into the necessary instructions for the computer it is running on... W/O it...can't run it.
    2- create a native executable...there are packages etc for which this is true. If you can install NOTHING on the computer... you would either
    A- Find one of the packages that creates .exe files from java or class files
    B- Bundle the JRE with it... it doesn't need to be 'installed' persay-- unpack the directories and create a batch file that calls <path-to-java>/java <path-to-program>myclass
    C- Write it in C or C++
    That is not an inclusive list of possibilities... Java's portability comes with the price-tag of needing something that can run it... once you have that something (and the JRE is fairly ubiquitous, or at least, easy to get if not present generally) ... you can run the program.
    ~Dave

  • Using DB2's import/export utilities in Java program

    DB2 database has build in utility called export, throgh which we can export the output of a Query directly onto a Lotus 123 file. But I beleive that , to invoke such DB2 utilities throgh a Java Program, we need to have APIs.
    My question is ,are such APIs available ?
    If so, what are the APIs necessary for calling this EXPORT and IMPORT utilities of DB2 ?

    Well, If you have to use Runtime.exec() and provide these as command lines, then the best option is to write a shell script( my Java application is on AIX platform) and then call the shell script through exec().
    But Shell scripts don't run well with Runtime.exec() right ?
    B'Cause, I tried it but the application did'nt throw up any exception. No message was flashed either. The process was just hanging.....so do you know a better method to actually run a shell script through a Java program ?

  • How to use the google search from inside a java program

    Hi guys
    How can i use google search in my java program?
    What will be the type of the reply i get back from google?
    Thanks in advance
    [http://javamilestone.blogspot.com/|http://javamilestone.blogspot.com/]

    Hi,
    You have here some examples about how to make search on google from a Java application.
    The type of reply is JSON
    Here some documentation about it:
    [http://code.google.com/apis/ajaxsearch/documentation/#fonje|http://code.google.com/apis/ajaxsearch/documentation/#fonje]
    And here some snippets:
    [http://code.google.com/apis/ajaxsearch/documentation/#fonje_snippets|http://code.google.com/apis/ajaxsearch/documentation/#fonje_snippets]
    Regards,
    David.

  • SOLVED: How To Use LDAP over SSL (no certs) from java program

    Trying to connect to OID from Java program (using Grocery Store demo as a test). Want to use SSL with no server certificate. OID is configured, and ldapsearch -U 1 works.
    Tried using URL with ldaps, or adding SECURITY_PROTOCOL,"ssl". In both case the error is 'simple bind failed'.
    Samples on OTN say this should be possible, but then only have code for the non-ssl connection.
    Posting from others with this same question don't seem to have been answered.
    Message was edited by:
    user590350
    I have found that using ConnectionUtil.getSSLDirCtx() from Oracle will make a no-authentication SSL connection. An example in the sample code would be useful.

    Even with Java APIs, There is a way to talk through SSL without bothering about certificates. It's just that you will have to write some code and make some changes in settings.
    Read following to get further information on the same.
    http://kiranthakkar.blogspot.com/2007/04/dummny-certificate-authentication.html
    I don't know or I won't comment whether it's the right approach or not but it's definitely a work around.
    Thanking You
    Kiran Thakkar

  • Starting a java program from a button

    Hi,
    How can i start another java application (which is saparated from the orginal application) by pressing a button in the main application?
    what should the action be?
    tia,

    TheOtherClass.main(theArgs);Though you might want to create a new thread for that call first.

  • Query using the SQL 'go' command  on a JAVA code

    Hi,
    I am trying to create a new database on MS SQL and at the same time verify whether the data base exist already and then add a new table. The query statement works well on the query windows on MS SQL, but when the query is place using a JAVA code it gives the following error:
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'go'.
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'go'.
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Source)
         at DataBaseCreator.main(DataBaseCreator.java:30)
    I have to add that if I only query: "CREATE DATABASE NameOfDatabase" the new data base is created without a problem using JAVA, but when I try to use the following query, I got the error message.
    "USE Master "
                        + "IF EXISTS (SELECT * FROM SysDatabases WHERE NAME='DatesTemps') "
                        + " DROP DATABASE DatesTemps"
                        + " go "
                        + " CREATE DATABASE DatesTemps22 "
                        + " go"
                        + " USE DatesTemps "
                        + " CREATE TABLE Fable ( "
                        + " FableID INT NOT NULL CONSTRAINT FablePK PRIMARY KEY NONCLUSTERED, "
                        + " Title VARCHAR(50) NOT NULL, "
                        + " Moral VARCHAR(100) NOT NULL, "
                        + " FableText VARCHAR(1536) NOT NULL, "
                        + " BlobType CHAR(3) NULL DEFAULT 'doc', "
                        + " Blob IMAGE NULL DEFAULT NULL )"
    If it is useful my complete code is the following, I appreciate in advance your comments.
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.*;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    public class DataBaseCreator {
         public static void main (String[] args)
              Connection Time =null;
              Statement stmt = null;
              String data = "jdbc:odbc:DataBaseCreation";
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Time= DriverManager.getConnection(data,"","");
                   stmt = Time.createStatement();
                   //String query;
                   //java.sql.Timestamp ts1 = new java.sql.Timestamp(((3*60)+58)*60*1000);
              // System.out.println(ts1 + " This is a Time Stamp");
              ResultSet rec = stmt.executeQuery(
                        "USE Master "
                        + "IF EXISTS (SELECT * FROM SysDatabases WHERE NAME='DatesTemps') "
                        + " DROP DATABASE DatesTemps"
                        + " go "
                        + " CREATE DATABASE DatesTemps22 "
                        + " go"
                        + " USE DatesTemps "
                        + " CREATE TABLE Fable ( "
                        + " FableID INT NOT NULL CONSTRAINT FablePK PRIMARY KEY NONCLUSTERED, "
                        + " Title VARCHAR(50) NOT NULL, "
                        + " Moral VARCHAR(100) NOT NULL, "
                        + " FableText VARCHAR(1536) NOT NULL, "
                        + " BlobType CHAR(3) NULL DEFAULT 'doc', "
                        + " Blob IMAGE NULL DEFAULT NULL )"
              catch( Exception e )
                        System.err.println( e );
                        e.printStackTrace();
              finally
                        try
                             stmt.close();
                             Time.close();
              catch( Exception e )
                        System.err.println( e );
    }

    Ok, first of all thanks for your answer, now what I want to do is the following:
    1) I need to input ((retrieve) every minute some data (Date and Temperature), that I will get from and external device, this is not part of this code.
    2) I want to store that data (Date and Temp) on a data base, here where I need the command to create the data base and to verify whether that data base already exists. In case it has already been created then create new table(s) on it. If it doesn't exist then create and then create new tables.
    3) Each Day (at yyyy mm dd 00:00:00:000 will create a new table, and the name of this table will be yyyymmdd.
    4) Then every minute the java code will retrieve the data and add it to the table in the data base.
    5) That will be a close loop that will be running until the user interrupt it.
    I haven't make the communication code yet, in order to test my code I was thinking to retrieve the data from another data base. This would be just to verify that the JAVA sequence is able to retrieve the data every minute and create new data base and tables.
    For the record I am able to send the queries and retrieve information from SQL running the code in eclipse, that will cover your first observation.
    I am quite new in the forum I am sorry I didn't get the use of code tags.
    Sorry again as I said I am quite new on this, what's a DDL statement.
    Thanks.

  • Using oracle.sql.BLOB data type in Java Class to pass in a Blob

    All,
    I'm trying to pass in a BLOB from PL/SQL to a Java Class, but the BLOB isn't passed correctly.
    When I check the length of the BLOB in PL/SQL its different from the length of the BLOB in java.
    I'm using DB 11g and the ojdbc5.jar file in my java classes.
    The java function uses the oracle.sql.BLOB type to get the parameter.
    The java class is loaded into the DB and called via a PL/SQL function.
    Kind regards,
    Nathalie

    The question is indeed a little ambigious defined ;o)
    When I pass the BLOB to the java method and invoke BLOB.getBytes() and then get the length of the BLOB in java the length of the BLOB is bigger than in PL/SQL.
    When I use the method 'getBinaryStream' and write this to a buffer, the code works.
    I will log a tar regarding the getBytes()-method to ask for more detailed information regarding the methods provided using the JDBC Drivers.
    Kind regards,
    Nathalie

  • Is there a way to start a JAVA program from the dock?

    Hello,
    I wrote some JAVA applications and I would like to put them in -
    - and start them from - the dock.
    These applications were built into .jar files.
    I can start them from Finder which tells me that there is some .jar starter utility.
    ;JOOP!

    The Dock is for Applications, Documents, and Folders (which can take several forms). There are some other odd animals that can stay in the Dock, but they were never truly implemented (recent items is one). If you "wrap" the .jar file inside some package that behaves as an application, you can have it stay in the Dock just as any other Application.
    A .jar file is not an application, it's a java archive. It is a collection of classes, metadata, etc. which the Java runtime interprets and executes. The Application which runs it shows up in the Dock as the coffee cup, but that is just the runtime engine, not the .jar.
    The .jar is like any other document, such as a a word processing document. Just like any document, it can be double-clicked and the handling application will be called to open it. Double-clicking that word processing document causes the word processing application to open the document and interpret its contents. Double-clicking the .jar file causes the java runtime engine to open the .jar file and interpret its contents. Instead of presenting it as paragraphs of text, it displays it as the application it represents.

Maybe you are looking for

  • Syntax for retrieving data from a task container

    Hello Workflow Fans ! I have a Task with the following configuration: BASIC DATA - Object Method : Object Category: BOR Object Type Object Type: ZBusObj1 Method: 022_Data_Upd CONTAINER : I have added a second BOR Object in the container called ZBusOb

  • Firefox is not rendering/displaying websites correctly.

    Started today, never had problems with any site I visited until now. Every webpage I vist will not load/render/display correctly. I have not done anything to firefox in ages and have had no problem like this before.

  • Crash Report 'Segmentation Fault / Missing Bundles ?

    All of a sudden I can't open any of my logic files no matter how new or old they are ? Process:         Logic Pro [540] Path:            /Applications/Logic Pro.app/Contents/MacOS/Logic Pro Identifier:      com.apple.logic.pro Version:         9.1.3

  • Product Ownership Assessment Survey - Have your say!

    Hi all The User Design and Research Team is calling for your feedback on our products and we are listening hard. Please just take a few minutes to check out this article with details.  Thank you in advance! Community Advocate Program Manager English

  • Using Oracle Seed Folders

    I am using Discoverer 11g in an APPS Mode EUL. I am trying to create a worksheet based on the Oracle Supplied Folder "GL ACTUAL BALANCES" which refers to the Oracle View "APPS.GLFG_ACTUAL_BALANCES". When I use this folder, I do not get any rows retur