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 7407933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:49:04+00:00 2026-05-29T05:49:04+00:00

I have an application which should run only on standard JVM – no application

  • 0

I have an application which should run only on standard JVM – no application servers like JBoss or Tomcat. Is it possible to run it with Spring (I need spring-jdbc) configured normally through applicationContext.xml? I havent’t found any tutorial.

SOLUTION

First part is from the answers below and the second part is (in my case) adding this into pom.xml.

<build>
    <plugins>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <mainClass>package.MainClass</mainClass>
                    </manifest>
                </archive>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
        </plugin>
    </plugins>
</build>
  • 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-29T05:49:04+00:00Added an answer on May 29, 2026 at 5:49 am

    Yes – all you need is JVM to launch java main class that makes use of Spring FW.

    here is the example of context.xml and a code that uses it to initialize Spring JDBC:

    <!-- DATASOURCE used for object stores -->
    <bean id="dataSourceForObjects" class="org.apache.commons.dbcp.BasicDataSource"
        destroy-method="close">
        <property name="driverClassName" value="com.${job.repository.db.type}.jdbc.Driver" />
        <property name="url" value="jdbc:${job.repository.db.type}://${db.host}:${job.repository.db.port}/${db.schema}" />
        <property name="username" value="${db.user}" />  <!-- your user id. e.g. root-->
        <property name="password" value="${db.password}" /> <!-- your password-->
        <property name="maxIdle" value="10" />
        <property name="maxActive" value="100" />
        <property name="maxWait" value="10000" />
        <property name="validationQuery" value="select 1" />
        <property name="testOnBorrow" value="false" />
        <property name="testWhileIdle" value="true" />
        <property name="timeBetweenEvictionRunsMillis" value="1200000" />
        <property name="minEvictableIdleTimeMillis" value="1800000" />
        <property name="numTestsPerEvictionRun" value="5" />
        <property name="defaultAutoCommit" value="true" />
    </bean>
        <bean id="objectStoreDao" class="com.pursway.core.dao.objectStore.ObjectStoreJdbcImpl">
        <property name="dataSource" ref="dataSourceForObjects"/>
    </bean>
    

    here is the java code example:

    ...
    ApplicationContext context = new FileSystemXmlApplicationContext(ExecutionController.BASIC_CONFIG_FILES);
    jobExplorer = (JobExplorer)context.getBean("jobExplorer");
    workFlowDao = (WorkFlowDao)context.getBean("workFlowDao");
    ....
    

    Good luck !

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

Sidebar

Related Questions

I have an application which really should be installed, but does work fine when
I have an assembly which should not be used by any application other than
I have an application which get copied and run on client machines. The program
I have a facebook app which run only through a fan page. Go to
I would like to write a standalone Erlang application which could be run just
I have application which needs to use a dll (also written by me) which
I have an application which extracts data from an XML file using XPath. If
We have an application which needs to use Direct3D. Specifically, it needs at least
I have an application which behaves as a slideshow for all pictures in a
I have an application which is a portal application and I want to allow

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.