Examples of execute()

Examples of org.springframework.jdbc.core.simple.SimpleJdbcCall.execute()


    SimpleJdbcCall sproc = new SimpleJdbcCall(mockDataSource).withProcedureName(NO_SUCH_PROC);
    try {
      fail("Shouldn't succeed in running stored procedure which doesn't exist");
    } catch (BadSqlGrammarException ex) {
      // OK
View Full Code Here

Examples of org.springframework.jdbc.core.simple.SimpleJdbcInsert.execute()

          MapSqlParameterSource fcParams = new MapSqlParameterSource();
          fcParams.addValue("Run_runId", run.getId())
                  .addValue("containers_containerId", containerId);

          try {
          catch(DuplicateKeyException dke) {
            log.warn("This Run/SequencerPartitionContainer combination already exists - not inserting: " + dke.getMessage());
View Full Code Here

Examples of org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.execute()

        throw new IllegalStateException(String.format("Failed to execute SQL scripts for test context %s: "
            + "supply at least a DataSource or PlatformTransactionManager.", testContext));

      // Execute scripts directly against the DataSource
    else {
      DataSource dataSourceFromTxMgr = getDataSourceFromTransactionManager(transactionManager);

      // Ensure user configured an appropriate DataSource/TransactionManager pair.
View Full Code Here

Examples of org.springframework.jdbc.object.StoredProcedure.execute()

  private Map<String,Object> executeSpNative(String spName, SqlParameter[] sqlParameters, Map<String,Object> params){
      StoredProcedure sp = new InnerStoreProcedure(spName, sqlParameters);
      return sp.execute(params);
    public Map<String,Object> executeSP(String spName) {
        return executeSpNative(spName, null, new HashMap<String, Object>());
View Full Code Here

Examples of org.springframework.jms.core.JmsTemplate.execute()

        final JmsTemplate jmsTemplate = JMSFactory.createJmsTemplate(jmsConfig, null);

        Thread t = new Thread() {
            public void run() {
                Destination destination = (Destination)jmsTemplate.execute(new SessionCallback() {
                    public Object doInJms(Session session) throws JMSException {
                        DestinationResolver resolv = jmsTemplate.getDestinationResolver();
                        return resolv.resolveDestinationName(session, jmsConfig.getTargetDestination(),
View Full Code Here

Examples of org.springframework.jms.core.JmsTemplate102.execute()


    JmsTransactionManager tm = new JmsTransactionManager102(cf, false);
    TransactionStatus ts = tm.getTransaction(new DefaultTransactionDefinition());
    JmsTemplate jt = new JmsTemplate102(cf, false);
    jt.execute(new SessionCallback() {
      public Object doInJms(Session sess) {
        assertTrue(sess == session);
        return null;
View Full Code Here

Examples of org.springframework.jndi.JndiTemplate.execute()

    protected void initializePortalContext() throws NamingException {
        final JndiTemplate jndiTemplate = this.getJndiTemplate();

        // Create a subcontext for portal-wide services, initialize services
        // Start any portal services configured in services.xml
        jndiTemplate.execute(new CreateSubContextCallback("services"));

        // Create a subcontext for user specific bindings
        jndiTemplate.execute(new CreateSubContextCallback("users"));

        // Create a subcontext for session listings
View Full Code Here

Examples of org.springframework.orm.hibernate3.HibernateTemplate.execute()

  public long staccaNumeroArticolo() throws ImpossibileGenerareNumeroArticoloException {
    HibernateTemplate hibernateTemplate = getHibernateTemplate();
    Long execute = 0l;
    try {
      execute = (Long) hibernateTemplate.execute(new HibernateCallback() {
        public Object doInHibernate(Session session) {
          BigDecimal nextVal = (BigDecimal) session.createSQLQuery("select SQ_ARTICOLI.NEXTVAL from DUAL")
          return nextVal.longValue();
View Full Code Here

Examples of org.springframework.retry.support.RetryTemplate.execute()

        .<Class<? extends Throwable>, Boolean> singletonMap(Exception.class, true)));


    try {
      retryTemplate.execute(callback, retryState);
      // The first failed attempt we expect to retry...
      fail("Expected RuntimeException");
    catch (RuntimeException e) {
      assertEquals(null, e.getMessage());
View Full Code Here

Examples of org.springframework.richclient.application.setup.SetupWizard.execute()

    public void onPreStartup() {
        if (appSettings.getShowStartupWizard()
                && getApplication().getApplicationContext().containsBean("setupWizard")) {
            SetupWizard setupWizard = (SetupWizard) getApplication().
                    getApplicationContext().getBean("setupWizard", SetupWizard.class);
            try {
            } catch (IOException ex) {
                logger.error("Can't save state.", ex);
View Full Code Here
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.