Examples of KieRemoteServicesRuntimeException


Examples of org.kie.remote.services.exception.KieRemoteServicesRuntimeException

            connection.start();
        } catch (JMSException jmse) {
            // Unable to create connection/session, so no need to try send the message (4.) either
            String errMsg = "Unable to open new session to send response messages";
            logger.error(errMsg, jmse);
            throw new KieRemoteServicesRuntimeException(errMsg, jmse);
        }
    }
View Full Code Here

Examples of org.kie.remote.services.exception.KieRemoteServicesRuntimeException

                session = null;
            }
        } catch (JMSException jmse) {
            String errMsg = "Unable to close " + (connection == null ? "session" : "connection");
            logger.error(errMsg, jmse);
            throw new KieRemoteServicesRuntimeException(errMsg, jmse);
        }
    }
View Full Code Here

Examples of org.kie.remote.services.exception.KieRemoteServicesRuntimeException

        JaxbCommandsResponse jaxbResponse = null;
        try {
            msgCorrId = message.getJMSCorrelationID();
        } catch (JMSException jmse) {
            String errMsg = "Unable to retrieve JMS correlation id from message! " + ID_NECESSARY;
            throw new KieRemoteServicesRuntimeException(errMsg, jmse);
        }

        // 0. get serialization info
        int serializationType = -1;
        try {
            if (!message.propertyExists(SERIALIZATION_TYPE_PROPERTY_NAME)) {
                // default is JAXB
                serializationType = JMS_SERIALIZATION_TYPE;
            } else {
                serializationType = message.getIntProperty(SERIALIZATION_TYPE_PROPERTY_NAME);
            }
        } catch (JMSException jmse) {
            String errMsg = "Unable to get properties from message " + msgCorrId + ".";
            throw new KieRemoteServicesRuntimeException(errMsg, jmse);
        }

        SerializationProvider serializationProvider;
        switch (serializationType) {
        case JMS_SERIALIZATION_TYPE:
View Full Code Here

Examples of org.kie.remote.services.exception.KieRemoteServicesRuntimeException

            case JMS_SERIALIZATION_TYPE:
                msgStrContent = ((TextMessage) message).getText();
                cmdMsg = (JaxbCommandsRequest) serializationProvider.deserialize(msgStrContent);
                break;
            default:
                throw new KieRemoteServicesRuntimeException("Unknown serialization type when deserializing message " + msgId + ":" + serializationType);
            }
        } catch (JMSException jmse) {
            String errMsg = "Unable to read information from message " + msgId + ".";
            throw new KieRemoteServicesRuntimeException(errMsg, jmse);
        } catch (Exception e) {
            String errMsg = "Unable to serialize String to " + JaxbCommandsRequest.class.getSimpleName() + " [msg id: " + msgId + "].";
            throw new KieRemoteServicesInternalError(errMsg, e);
        }
        return cmdMsg;
View Full Code Here

Examples of org.kie.remote.services.exception.KieRemoteServicesRuntimeException

            }
            serializationProvider = ServerJaxbSerializationProvider.newInstance(dynamicJaxbContext);
        } catch (JMSException jmse) {
            throw new KieRemoteServicesInternalError("Unable to check or read JMS message for property.", jmse);
        } catch (SerializationException se) {
            throw new KieRemoteServicesRuntimeException("Unable to load classes needed for JAXB deserialization.", se);
        }
        return serializationProvider;
    }
View Full Code Here

Examples of org.kie.remote.services.exception.KieRemoteServicesRuntimeException

            switch (serializationType) {
            case JMS_SERIALIZATION_TYPE:
                msgStr = (String) serializationProvider.serialize(jaxbResponse);
                break;
            default:
                throw new KieRemoteServicesRuntimeException("Unknown serialization type when deserializing message " + msgId + ":" + serializationType);
            }
            textMsg = session.createTextMessage(msgStr);
            textMsg.setIntProperty(SERIALIZATION_TYPE_PROPERTY_NAME, serializationType);
        } catch (JMSException jmse) {
            String errMsg = "Unable to create response message or write to it [msg id: " + msgId + "].";
            throw new KieRemoteServicesRuntimeException(errMsg, jmse);
        } catch (Exception e) {
            String errMsg = "Unable to serialize " + jaxbResponse.getClass().getSimpleName() + " to a String.";
            throw new KieRemoteServicesInternalError(errMsg, e);
        }
        return textMsg;
View Full Code Here
TOP
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.