Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5842783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:03:48+00:00 2026-05-22T12:03:48+00:00

I have a oracle database table. When a row is inserted then I want

  • 0

I have a oracle database table. When a row is inserted then I want to create a trigger. Till now the problem is ok,but after creating trigger I want to call weblogic application server code(means I want to set this information(new database row) in a java class which is loaded on other weblogic application server.)
Any help is appreciated. I have spent hours looking for tutorials on Google. However I cannot seem to find anything that holds the hand. Can you recommend a tutorial, or set of tutorials or examples that cover this.

Like Java class is :

import java.util.Random;

public class Person
{

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

}

Where id and name are columns of db table. I want a java object on weblogic application server holding the new values of row which is inserted in db.


EDIT:

Thanks for your reply….

data to be defined :-A machine on which oracle 11g is installed and weblogic application server is installed on other machine.There is static hashmap hm on weblogic server which is readed by some other application on weblogic server.Value of this hashmap is object of Person class(as described above)

Now my requirement is whenever a new row is added in database table,then it set the values of this row in person class(by firing oracle trigger) and store this object in hashmap value field(Treat one column of db table as hashmap key).

For eg id and name are columns of db.whenever a new row(id=1, name=xyz) is inserted in this table then put this values in hashmap hm as
{hm.put(“1”,object of person class)}

name field will be set in object of person class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:03:49+00:00Added an answer on May 22, 2026 at 12:03 pm

    There are probably several ways to do what you want, but to have Oracle return a java object is probably the most convoluted of them all. The simplest solution would be to have the weblogic application that makes the call to insert the record into the database then create the Person class object and put it into the hashmap. If the application doesn’t control the id (e.g. the id is created from a sequence on the database, you can insert the record through a function and have the function return the id to the web application:

    CREATE SEQUENCE person_id_seq START WITH 1;
    
    CREATE FUNCTION insert_person ( p_name IN VARCHAR2 )
        RETURN NUMBER
    IS
        retval NUMBER := -1;
    BEGIN
        INSERT INTO person ( id, name )
        VALUES ( person_id_seq.NEXTVAL, p_name )
        RETURNING id INTO retval;
    
        RETURN retval;
    END insert_person;
    

    Additionally, I’m not sure if you fully understand what Oracle triggers do. Triggers are usually used to either do logic/data validation before an insert/update/delete or to do some post-insert/update/delete action (e.g. create a record in an audit/history table of changes made, update other records). While Oracle does support triggers written in Java, I’ve never used them nor am I sure how the trigger would communicate with your weblogic application.

    If you must return a java object from Oracle to your weblogic application, you can declare an Oracle object type and have your insert function/procedure return that, or you can return a ref cursor with the data elements. Depending upon how you return the Oracle object type, you might need to have a Java class defined to which the Oracle OJDBC drivers can map the pl/sql object.

    Do a web search on SQLData or ORAData. A great reference book is R.A. Menon’s Expert Oracle JDBC Programming : http://www.amazon.com/Expert-Oracle-JDBC-Programming-Menon/dp/159059407X

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Oracle database table that I want to apply a unique constraint
I have a oracle database with a table tha contains user. I want to
I have a table (Oracle database) that looks like: CREATE TABLE example ( idEx
We have a Oracle 9i database and OrderDetails table which has a column to
we have a table in an Oracle Database which contains a column with the
I have a table in an Oracle Database that has, among others, a DATE
I have created a table on an Oracle 10g database with this structure :
I have a table, users, in an Oracle 9.2.0.6 database. Two of the fields
Let's say I have an Oracle database table of 40MM 9-digit ZIP codes which
I have the following table in an Oracle database: InvoiceNumber InvoiceDate InvoiceCorrelative ------------- -----------

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.