Package com.sun.appserv.connectors.internal.api

Examples of com.sun.appserv.connectors.internal.api.ConnectorRuntimeException


            // Conventional cluster with master broker.
            if ("jdbc".equals(as.getExtensionByType(JmsAvailability.class).getMessageStoreType()))
              loadDBProperties(as.getExtensionByType(JmsAvailability.class), ClusterMode.CONVENTIONAL_WITH_MASTER_BROKER);
          }
        } catch (Exception e) {
            ConnectorRuntimeException crex = new ConnectorRuntimeException(e.getMessage());
            throw (ConnectorRuntimeException)crex.initCause(e);
        }
    }
View Full Code Here


                        mthds.invoke(this.resourceadapter_,
                                        new Object[]{dbProps});
                    }
            }
        } catch (Exception e) {
            ConnectorRuntimeException crex = new ConnectorRuntimeException(
                            e.getMessage());
            throw (ConnectorRuntimeException)crex.initCause(e);
        }
    }
View Full Code Here

            } else {
                logFine("Instance not Clustered and hence not setting " +
                        "groupname");
            }
        } catch (Exception e) {
            ConnectorRuntimeException crex = new ConnectorRuntimeException(e.getMessage());
            throw (ConnectorRuntimeException)crex.initCause(e);
        }
    }
View Full Code Here

            String descriptorJNDIName = ConnectorAdminServiceUtils.getReservePrefixedJNDINameForDescriptor(super.getModuleName());
            //GlassfishNamingManager nm = connectorRuntime.getNamingManager();
            nm.publishObject(descriptorJNDIName, super.getDescriptor(), true);
        //com.sun.enterprise.Switch.getSwitch().getNamingManager().        publishObject( descriptorJNDIName, super.getDescriptor(), true);
    } catch (javax.naming.NamingException ne) {
        ConnectorRuntimeException cre = new ConnectorRuntimeException (ne.getMessage());
        throw (ConnectorRuntimeException) cre.initCause(ne);
    }
    }
View Full Code Here

        //handling of MDB 1.3 runtime deployment descriptor
        //if no RA-mid is specified, assume it is a 1.3 DD
        if (jndiName == null || "".equals(jndiName)) { //something's wrong in DD
            _logger.log(Level.SEVERE, "Missing Destination JNDI Name");
        String msg = sm.getString("ajra.error_in_dd");
            throw new ConnectorRuntimeException(msg);
        }

        String resourceAdapterMid = ConnectorRuntime.DEFAULT_JMS_ADAPTER;

        descriptor_.setResourceAdapterMid(resourceAdapterMid);
View Full Code Here

            res = (AdminObjectResource)
                    ResourcesUtil.createInstance().getResource(logicalDest, appName, moduleName, AdminObjectResource.class);
            //AdminObjectResource res = (AdminObjectResource)   allResources.getAdminObjectResourceByJndiName(logicalDest);
        if (res == null) {
            String msg = sm.getString("ajra.err_getting_dest", logicalDest );
        throw new ConnectorRuntimeException(msg);
        }

        ep = res.getProperty(PHYSICAL_DESTINATION); //getElementPropertyByName(PHYSICAL_DESTINATION);
        } catch(Exception ce) {
        String msg = sm.getString("ajra.err_getting_dest", logicalDest);
        ConnectorRuntimeException cre = new ConnectorRuntimeException( msg );
        cre.initCause( ce );
            throw cre;
        }

        if (ep == null) {
            String msg = sm.getString("ajra.cannot_find_phy_dest", null);
            throw new ConnectorRuntimeException(msg);
        }

        return ep.getValue();
    }
View Full Code Here

            String moduleName = ConnectorsUtil.getModuleName(descriptor_);
            ConnectorResource res = (ConnectorResource)
                    ResourcesUtil.createInstance().getResource(cfName, appName, moduleName, ConnectorResource.class);
        if (res == null) {
            String msg = sm.getString("ajra.mdb_cf_not_created", cfName);
        throw new ConnectorRuntimeException(msg);
        }

        ConnectorConnectionPool ccp = (ConnectorConnectionPool)
             ResourcesUtil.createInstance().getResource(res.getPoolName(), appName, moduleName, ConnectorConnectionPool.class);
            //rbeans.getResourceByName(ConnectorConnectionPool.class, res.getPoolName());

        ep = ccp.getProperty();
        } catch(Exception ce) {
        String msg = sm.getString("ajra.mdb_cf_not_created", cfName);
        ConnectorRuntimeException cre = new ConnectorRuntimeException( msg );
        cre.initCause( ce );
            throw cre;
        }

        if (ep == null) {
        String msg = sm.getString("ajra.cannot_find_phy_dest");
            throw new ConnectorRuntimeException( msg );
        }

    for (int i=0; i < ep.size(); i++) {
        Property prop = ep.get(i);
        String name = prop.getName();
View Full Code Here

                   });

                   return new MQJMXConnectorInfo[]{mqjmxForServer};
               } catch (Exception e) {
                   //e.printStackTrace();
                   ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
                   cre.initCause(e);
                   throw cre;
               }
           }
View Full Code Here

                                   ActiveJmsResourceAdapter.getBrokerInstanceName(jmsService) ,
                                   jmsService.getType(), jmxServiceURL, jmxConnectorEnv);
                   return mqInfo;
               } catch (Exception e) {
                   e.printStackTrace();
                   ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
                   cre.initCause(e);
                   throw cre;
               }
           }
View Full Code Here

                     }
                     java.util.Map<String,JmsHost> hostMap =  list.getResolvedLocalJmsHostsInMyCluster(true);

                     if ( hostMap.size() == 0 ) {
                         String msg = localStrings.getLocalString("mqjmx.no_jms_hosts", "No JMS Hosts Configured");
                         throw new ConnectorRuntimeException(msg);

                     }


                     for (JmsHost host : hostMap.values()) {
                         list.addMQUrl(host);
                     }
                 }

              String connectionUrl = list.toString();
              String adminUserName = null;
              String adminPassword = null;
              JmsHost jmsHost = list.getDefaultJmsHost(jmsService);
              if (jmsHost != null){// && jmsHost.isEnabled()) {
                  adminUserName = jmsHost.getAdminUserName();
                  adminPassword = JmsRaUtil.getUnAliasedPwd(jmsHost.getAdminPassword());
              } else {
                  if (logger.isLoggable(Level.FINE)) {
                      logger.log(Level.FINE, " _getMQJMXConnectorInfo, using default jms admin user and password ");
                  }
              }
               raInstance = getConfiguredRA(mqRAClassName, connectionUrl,
                                           adminUserName, adminPassword);
             } catch (Exception e) {
                 e.printStackTrace();
                 ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
                 cre.initCause(e);
                 throw cre;
             }

             try {
                 String jmxServiceURL = null, jmxServiceURLList = null;
                 Map<String, ?> jmxConnectorEnv = null;
                 Method[] methds = raInstance.getClass().getMethods();
                 for (int i = 0; i < methds.length; i++) {
                     Method m = methds[i];
                     if (m.getName().equalsIgnoreCase("get" + JMXSERVICEURLLIST)){
                         jmxServiceURLList = (String)m.invoke(raInstance, new Object[]{});
                         if (jmxServiceURLList != null && !jmxServiceURLList.trim().equals("")){
                             jmxServiceURL = getFirstJMXServiceURL(jmxServiceURLList);
                         }
                     } else if (m.getName().equalsIgnoreCase("get" + JMXCONNECTORENV)){
                         jmxConnectorEnv = (Map<String,?>)m.invoke(raInstance, new Object[]{});
                     }
                 }
                 MQJMXConnectorInfo mqInfo = new MQJMXConnectorInfo(target,
                                 ActiveJmsResourceAdapter.getBrokerInstanceName(jmsService) ,
                                 jmsService.getType(), jmxServiceURL, jmxConnectorEnv);
                 return mqInfo;
             } catch (Exception e) {
                 e.printStackTrace();
                 ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage());
                 cre.initCause(e);
                 throw cre;
             }
         }
View Full Code Here

TOP

Related Classes of com.sun.appserv.connectors.internal.api.ConnectorRuntimeException

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.