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

  • SEARCH
  • Home
  • 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 4605610
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:27:17+00:00 2026-05-22T00:27:17+00:00

Can anyone provide complete example of Stored Procedure call with Spring framework. Thanks, Raj

  • 0

Can anyone provide complete example of Stored Procedure call with Spring framework.

Thanks,
Raj

  • 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-22T00:27:18+00:00Added an answer on May 22, 2026 at 12:27 am

    Using the Spring stored procedure framework:

    jdbc-config.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:util="http://www.springframework.org/schema/util"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
    
        <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiName" value="java:comp/env/orcl/DB"/>
        </bean>
    
        <bean id="storedProc" class="com.DatabaseStoredProc">
            <property name="dataSource" ref="dataSource" />
            <property name="sql" value="aStoredProc" />
            <property name="parameters">
                <list>
                    <bean class="org.springframework.jdbc.core.SqlParameter">
                        <constructor-arg index="0" value="p_id1" />
                        <constructor-arg index="1">
                            <util:constant static-field="java.sql.Types.VARCHAR" />
                        </constructor-arg>
                    </bean>
                    <bean class="org.springframework.jdbc.core.SqlParameter">
                        <constructor-arg index="0" value="p_id2" />
                        <constructor-arg index="1">
                            <util:constant static-field="java.sql.Types.VARCHAR" />
                        </constructor-arg>
                    </bean>
                </list>
            </property>
        </bean>
    
    
    </beans>
    

    DatabaseStoredProcedure class

    import java.util.Map;
    import org.springframework.jdbc.object.StoredProcedure;
    
    public class DatabaseStoredProc extends StoredProcedure {
    
        public Map<String, Object> execute(Map inputs){
            Map out=super.execute(inputs);
            return null;
        }
    
        // Method to map data to inputs Map:
    
    public boolean businessRules(Object obj, Map inputs){
        SomeObject otd = (SomeObject) obj;
        inputs.put("p_id1", otd.getId1());
        inputs.put("p_id2", otd.getId2() );
    
        return true;
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone provide a clear explanation / example of what these functions do, and
Can anyone provide me with a hello world example for a major mode in
Can anyone provide me an example of how to use WM_CLOSE to close a
Can anyone provide some real examples as to how best to keep script files
Can anyone provide some pseudo code for a roulette selection function? How would I
Can anyone provide me with a link to good article about using Firebird.NET with
Can anyone provide some links to good information on setting up Silverlight 2.0 to
Can anyone provide details on what the three of these mean? System::ContainerStartTime System::CreationDate System::StartTime
Can anyone provide some information on how to run an integration services package, on
Can anyone provide a function to sanitize input for a UniData query? Or provide

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.