Package javax.resource.spi

Examples of javax.resource.spi.ResourceAdapterInternalException


      return ((XASession) session).getXAResource();
    }
    catch (JMSException exc) {
        if (out != null)
            out.print("Could not get XA resource: " + exc);
      throw new ResourceAdapterInternalException("Could not get XA resource: "
                                                 + exc);
    }
  }
View Full Code Here


    start();
  }
   
  public synchronized void start() throws ResourceAdapterInternalException {
    if (started)
      throw new ResourceAdapterInternalException("Adapter already started.");
    if (stopped)
      throw new ResourceAdapterInternalException("Adapter has been stopped.");

    if (workManager == null) {
      throw new ResourceAdapterInternalException("WorkManager has not been set.");
    }

    // set HA mode if needed
    AdminModule.setHa(isHa);

    if (logger.isLoggable(BasicLevel.INFO))
      logger.log(BasicLevel.INFO, "JORAM adapter starting deployment...");

    // Collocated mode: starting the JORAM server.
    if (collocated) {
      if (logger.isLoggable(BasicLevel.INFO))
        logger.log(BasicLevel.INFO, " - Collocated JORAM server is starting...");

      // TODO (AF): Setting system properties forbids the launching of multiples
      // servers in an OSGi platform.
      if (persistentPlatform) {
        System.setProperty("Transaction", "fr.dyade.aaa.util.NTransaction");
        System.setProperty("NTNoLockFile", "true");
      } else {
        System.setProperty("Transaction", "fr.dyade.aaa.util.NullTransaction");
        System.setProperty("NbMaxAgents", "" + Integer.MAX_VALUE);
      }

      if (platformConfigDir != null) {
        System.setProperty(AgentServer.CFG_DIR_PROPERTY, platformConfigDir);
        System.setProperty(Debug.DEBUG_DIR_PROPERTY, platformConfigDir);
      }

      try {
        AgentServer.init(serverId, serverName, null, clusterId);
        AgentServer.start();
        if (logger.isLoggable(BasicLevel.INFO))
          logger.log(BasicLevel.INFO, "JoramAdapter - Collocated JORAM server has successfully started.");
      } catch (Exception exc) {
        AgentServer.stop();
        AgentServer.reset(true);

        throw new ResourceAdapterInternalException("Could not start collocated JORAM instance: " + exc);
      }
    }

    // Starting an admin session...
    try {
View Full Code Here

        try {
            JOnASDeployer deployer = new JOnASDeployer();
            deployer.setEmbedded(this.embedded);
            deployerManager.register(deployer);
        } catch (DeployerException e) {
            throw new ResourceAdapterInternalException("Cannot register the JOnAS deployer", e);
        }


        // Update configuration
        String jBase = System.getProperty("jonas.base");
        if (jBase == null) {
            throw new ResourceAdapterInternalException("No JONAS_BASE found, cannot continue.");
        }
        File workDir = new File(jBase + File.separator + Embedded.DEFAULT_DEPLOY_DIRECTORY);
        workDir.mkdir();

        // Add deploy directory
View Full Code Here

      Exception ex = null;
      if (e instanceof Exception)
         ex = (Exception) e;
      else
         ex = new ResourceAdapterInternalException("Unexpected error", e);
      ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, ex);
      Collection copy = null;
      synchronized(listeners)
      {
         copy = new ArrayList(listeners);
View Full Code Here

      Exception ex = null;
      if (e instanceof Exception)
         ex = (Exception) e;
      else
         ex = new ResourceAdapterInternalException("Unexpected error", e);
      ConnectionEvent ce = new ConnectionEvent(this, ConnectionEvent.CONNECTION_ERROR_OCCURRED, ex);
      Collection copy = null;
      synchronized (cels)
      {
         copy = new ArrayList(cels);
View Full Code Here

         sched = sf.getScheduler();
         sched.start();
      }
      catch (SchedulerException e)
      {
         throw new ResourceAdapterInternalException(e);
      }
      finally
      {
         holder.remove();
         try
View Full Code Here

      {
         mgr.scheduleWork(newMsgsWorker);
      }
      catch (WorkException e)
      {
         throw new ResourceAdapterInternalException(e);
      }
   }
View Full Code Here

                    return Thread.currentThread().getContextClassLoader();
                }
            });
            Class.forName(driver, true, classLoader);
        } catch (ClassNotFoundException cnf) {
            throw new ResourceAdapterInternalException("JDBC Driver class \"" + driver + "\" not found by class loader", ErrorCode.JDBC_0002);
        }
    }
View Full Code Here

            assertNotNull("bootstrapContext.getWorkManager() is null", bootstrapContext.getWorkManager());
            assertNotNull("bootstrapContext.getXATerminator() is null", bootstrapContext.getXATerminator());
            try {
                assertNotNull("bootstrapContext.createTimer() is null", bootstrapContext.createTimer());
            } catch (UnavailableException e) {
                throw new ResourceAdapterInternalException("bootstrapContext.createTimer() threw an exception", e);
            }
        }
View Full Code Here

                } else if (brokerXmlConfig.toLowerCase().startsWith("xbean:")) {
                    setBrokerXmlConfig(ActiveMQFactory.getBrokerMetaFile() + brokerXmlConfig);
                }

            } catch (URISyntaxException e) {
                throw new ResourceAdapterInternalException("Invalid BrokerXmlConfig", e);
            }
        }

        ActiveMQFactory.setThreadProperties(properties);
View Full Code Here

TOP

Related Classes of javax.resource.spi.ResourceAdapterInternalException

Copyright © 2018 www.massapicom. 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.