jpos : getting error o.j.t.p.QueryHost.prepare:97 'mux.S2M-E02-MPGS-AUTORESPONDER' is not connected - jpos

No idea why am I getting this error : getting error
o.j.t.p.QueryHost.prepare:97 'mux.S2M-E02-MPGS-AUTORESPONDER' is not
connected
my jpos server xml file is as below
<server class="org.jpos.q2.iso.QServer" logger="Q2" name="mpgs-server-7276" realm="mpgs-server-7276">
<attr name="port" type="java.lang.Integer">7276</attr>
<channel class="org.jpos.iso.channel.NACChannel"
packager="org.jpos.iso.packager.GenericPackager"
type="server"
logger="Q2"
header="6000000000"
>
<property name="packager-config" value="cfg/packager/CISascii.xml" debug="True" />
<property name="timeout" value="180000"/>
</channel>
<request-listener class="org.jpos.iso.IncomingListener" logger="Q2" realm="incoming-request-listener">
<property name="queue" value="S2M_E02_MPGSTXNMGR" />
<property name="ctx.DESTINATION" value="S2M-E02-MPGS-AUTORESPONDER" />
</request-listener>
</server>
my txn manager as below
<?xml version='1.0'?>
<txnmgr class="org.jpos.transaction.TransactionManager" logger="Q2">
<property name="queue" value="S2M_E02_MPGSTXNMGR"/>
<property name="sessions" value="2"/>
<property name="max-sessions" value="128"/>
<property name="debug" value="true"/>
<participant class="org.jpos.transaction.participant.QueryHost"/>
<participant class="org.jpos.transaction.participant.SendResponse"/>
</txnmgr>
my mux as below
<?xml version="1.0" ?>
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="S2M-E02-MPGS-AUTORESPONDER">
<in>mpgsrsc-s2me02-receive</in>
<out>mpgsrsc-s2me02-send</out>
<ready>mpgs-S2M-E02-channel</ready>
</mux>
my channel as below
<?xml version="1.0" ?>
<channel-adaptor name='mpgs-S2M-E02-channel' class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
<channel class="org.jpos.iso.channel.NACChannel"
packager="org.jpos.iso.packager.GenericPackager"
logger="Q2"
header="6000000000"
>
<property name="packager-config" value="cfg/packager/AS280501.xml" debug="True" />
<property name="host" value="127.0.0.1" />
<property name="port" value="6269" />
<property name="timeout" value="180000"/>
</channel>
<in>mpgsrsc-s2me02-send</in>
<out>mpgsrsc-s2me02-receive</out>
<reconnect-delay>10000</reconnect-delay>
</channel-adaptor>
I send the below transaction to channel
<log realm="org.jpos.transaction.TransactionManager" at="2020-05-07T01:51:54.931" lifespan="12014ms">
<abort>
txnmgr-1:idle:1
<context>
TIMESTAMP: Thu May 07 01:51:42 AEST 2020
SOURCE: org.jpos.iso.channel.NACChannel#277ca244
REQUEST:
<isomsg direction="incoming">
<!-- org.jpos.iso.packager.GenericPackager[cfg/packager/CISascii.xml] -->
<header>6000000000</header>
<field id="0" value="0200"/>
<field id="2" value="5000100100700010"/>
<field id="3" value="000000"/>
<field id="4" value="900000005000"/>
<field id="7" value="0507015142"/>
<field id="11" value="015142"/>
<field id="12" value="015142"/>
<field id="13" value="0507"/>
<field id="14" value="2005"/>
<field id="18" value="7399"/>
<field id="22" value="812"/>
<field id="25" value="15"/>
<field id="32" value="599950"/>
<field id="33" value="004601"/>
<field id="37" value="070520015142"/>
<field id="41" value="UTIS2I25"/>
<field id="42" value="000000EUREKAAIR"/>
<field id="48" value="543432303730313033323132343332386A48796E2B3759466931455541524541414141764E5565364876383D39323033313233363130353030303031" type="binary"/>
<field id="49" value="356"/>
<field id="61" value="1025100006600356"/>
<field id="120" value="9049 9252 AirTicketNo0123OrderInf001234567890123456789012349360 940800000000"/>
</isomsg>
DESTINATION: S2M-E02-MPGS-AUTORESPONDER
RESULT:
<result>
<fail>
[HOST_UNREACHABLE] o.j.t.p.QueryHost.prepare:97 'mux.S2M-E02-MPGS-AUTORESPONDER' is not connected
</fail>
</result>
I can see 6269 port is connected on the server , but it is still complaining about HOST unreachable
<log realm="channel/127.0.0.1:6269" at="2020-05-07T02:00:33.102">
<connect>
Try 0 127.0.0.1:6269
</connect>
</log>
much appreciate if you help to solve this issue or any guidance what should i be checking
thanks in advance
note : the question is full of code , but i don't have any choice more than that to explain what's happening in this scenario.

You have your ready key wrong in your mux, the ready key exported by a channel adaptor is it's name with a .ready suffix appended.
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="S2M-E02-MPGS-AUTORESPONDER">
<in>mpgsrsc-s2me02-receive</in>
<out>mpgsrsc-s2me02-send</out>
<ready>mpgs-S2M-E02-channel.ready</ready>
</mux>
As the ready is pointing to a key never updated by anyone, the mux always thinks the destination is not connected and its isConnected method rteturns false

Related

java.sql.SQLSyntaxErrorException: ORA-02289: sequence does not exist

In this method I am getting error java.sql.SQLSyntaxErrorException: ORA-02289: sequence does not exist I have gone through posts and I m not getting any Idea to fix it
public void saveOrUpdateProcessRun(ProcessRun argProcessRun) {
LOGGER.info(METHOD_START);
getHibernateTemplate().saveOrUpdate(argProcessRun);
LOGGER.info(METHOD_END);
}
This is Mapping I have XML Based Configurations Generator class is not Working(PROC_RUN_ID_SEQ)
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.uhg.esbdb.common.beans">
<class name="ProcessRun" table="PROC_RUN">
<id name="processRunID" type="integer" column="PROC_RUN_ID">
<generator class="sequence">
<param name="sequence">PROC_RUN_ID_SEQ</param>
</generator>
</id>
<property name="processID" type="integer" column="PROC_ID" />
<property name="processRunStartDatetime" type="timestamp"
column="PROC_RUN_STRT_DTTM" />
<property name="processRunEndDatetime" type="timestamp"
column="PROC_RUN_END_DTTM" />
<property name="processRunStatusCode" type="integer" column="PROC_RUN_STS_CD" />
<property name="createdByID" type="string" column="CRE_BY_ID" />
<property name="createdDatetime" type="timestamp" column="CRE_DTTM" />
<property name="modifiedByID" type="string" column="MOD_BY_ID" />
<property name="modifiedDatetime" type="timestamp" column="MOD_DTTM" />
</class>
<class name="FileLoad" table="FL_LOAD">
<id name="fileLoadID" type="integer" column="FL_LOAD_ID">
<generator class="sequence">
<param name="sequence">FL_LOAD_ID_SEQ</param>
</generator>
</id>
<property name="dataFileName" type="string" column="DATA_FL_NM" />
<property name="dataFileSizeByteNumber" type="integer"
column="DATA_FL_SZ_BYTE_NBR" />
<property name="fileLoadStatusCode" type="integer" column="FL_LOAD_STS_CD" />
<property name="loadStartDatetime" type="timestamp" column="LOAD_STRT_DTM" />
<property name="loadEndDatetime" type="timestamp" column="LOAD_END_DTM" />
<property name="createdByID" type="string" column="CRE_BY_ID" />
<property name="createdDatetime" type="timestamp" column="CRE_DTTM" />
<property name="modifiedByID" type="string" column="MOD_BY_ID" />
<property name="modifiedDatetime" type="timestamp" column="MOD_DTTM" />
<many-to-one name="processRun" class="ProcessRun" column="PROC_RUN_ID" />
</class>
<class name="ControlTotal" table="CTL_TOT">
<composite-id name="id" class="ControlTotalID">
<key-many-to-one name="fileLoad" class="FileLoad"
column="FL_LOAD_ID" />
<key-property name="controlTotalTypeCode" type="integer"
column="CTL_TOT_TYP_CD" />
</composite-id>
<property name="controlTotal" type="string" column="CTL_TOT" />
<property name="createdByID" type="string" column="CRE_BY_ID" />
<property name="createdDatetime" type="timestamp" column="CRE_DTTM" />
<property name="modifiedByID" type="string" column="MOD_BY_ID" />
<property name="modifiedDatetime" type="timestamp" column="MOD_DTTM" />
</class>
<!-- Added for loading wfg transaction ids from BE017 and BNKACH feeds to the EDB table EDBREF.WFG_ACH_PAYMENTS-->
<class name="WfgTransactionIdBean" table="EDBREF.WFG_ACH_PAYMENTS">
<id name="traceNumber" type="string" column="TRACE_NUMBER"></id>
<property name="sourceSystem" type="string" column="SOURCE_SYSTEM" />
<property name="transactionDate" type="timestamp" column="TRANSACTION_DATE" />
<property name="processed" type="string" column="PROCESSED" />
</class>
</hibernate-mapping>
Instead of PROC_RUN_ID_SEQ I am getting-> DEBUG main SQL logStatement:92 - select hibernate_sequence.nextval from dual
The causes can be different:
The name of the sequence you have mapped in your pojo is different
You have no permission to use sequence
You have no defined a sequence on your database
Solutions
Fix the sequence name on your pojo
Grant the sequence for your database user
Add the sequence on your database
EDIT AFTER UPDATED QUESTION
Try as follow:
<id name="propName" type="long" unsaved-value="null">
<column name="columnName" not-null="true" unique="true"
index="pkName" />
<generator
class="org.hibernate.id.enhanced.SequenceStyleGenerator">
<param name="optimizer">none</param>
<param name="increment_size">1</param>
<param name="sequence_name">PROC_RUN_ID_SEQ</param>
</generator>
</id>

Downloaded image not viewable by using WSO2 EI file connector

I am downloading image to local folder by using WSO2 EI File Connector, Image getting downloaded successfully but it is not viewable. Anyone please help me?
getting image URL(eg. https://carsales.pxcrush.net/dealerweb/car/cil/cc5754691391091045492.jpg) from Database.
getting base64 content from imageURL
then inserting those content into local folder using file connector.
Note: Bae64 comes from API which is not included here. base64 content is correct only, because i can get exact image from this base64 by using base64 to Image converter
Added below in axis2.xml file.
<messageFormatter contentType="application/octet-stream" class="org.apache.axis2.format.BinaryFormatter"/>
<messageBuilder contentType="application/octet-stream" class="org.apache.axis2.format.BinaryBuilder"/>
Code Snippet:
<sequence name="DownloadImageFileSequnce" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<log level="custom">
<property name="===DownloadImageFileSequnce" value="called=="/>
</log>
<property value="D:\Test\CarSalesStockImages" name="PATH"/>
<property expression="get-property('StockNo')" name="FOLDERNAME"/>
<property expression="get-property('eachImageName')" name="FILENAME"/>
<property expression="get-property('image_val')" name="CONTENT"/>
<!-- <property name="messageType" value="application/octet-stream" scope="axis2"/> -->
<property expression="fn:concat('file://',$ctx:PATH,'/',$ctx:FOLDERNAME,'/',$ctx:FILENAME)" name="source"/>
<log level="custom">
<!-- <property name="===CONTENT===" expression="get-property('CONTENT')"/> -->
<property name="===PATH===" expression="get-property('PATH')"/>
<property name="===FOLDERNAME===" expression="get-property('FOLDERNAME')"/>
<property name="===FILENAME===" expression="get-property('FILENAME')"/>
<property name="===source===" expression="get-property('source')"/>
</log>
<fileconnector.isFileExist>
<source>{$ctx:source}</source>
</fileconnector.isFileExist>
<property expression="json-eval($.fileExist)" name="exists" type="BOOLEAN"/>
<filter xpath="$ctx:exists">
<then>
<fileconnector.append>
<destination>{$ctx:source}</destination>
<inputContent>{$ctx:CONTENT}</inputContent>
</fileconnector.append>
<payloadFactory media-type="json">
<format>{"status":"File updated"}</format>
<args/>
</payloadFactory>
<log level="custom">
<property name="==Response==" expression="json-eval($.)"/>
</log>
</then>
<else>
<fileconnector.create>
<source>{$ctx:source}</source>
<inputContent>{$ctx:CONTENT}</inputContent>
</fileconnector.create>
<payloadFactory media-type="json">
<format>{"status":"File created"}</format>
<args/>
</payloadFactory>
<log level="custom">
<property name="==Response==" expression="json-eval($.)"/>
</log>
</else>
</filter>
</sequence>
I have found solution by using vfs instead of wso2 file connector.
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="DownloadImageFileSequnce" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<log level="custom">
<property name="===DownloadImageFileSequnce" value="called=="/>
</log>
<property name="PATH" scope="default" type="STRING" value="D:\Test\CarSalesStockImages"/>
<property expression="get-property('StockNo')" name="FOLDERNAME" scope="default" type="STRING"/>
<property expression="get-property('eachImageName')" name="FILENAME" scope="default" type="STRING"/>
<property expression="get-property('image_val')" name="CONTENT" scope="default" type="STRING"/>
<payloadFactory media-type="xml">
<format>
<ns:binary xmlns:ns="http://ws.apache.org/commons/ns/payload">$1</ns:binary>
</format>
<args>
<arg evaluator="xml" expression="$ctx:CONTENT"/>
</args>
</payloadFactory>
<script language="js"><![CDATA[var binaryNode =
mc.getEnvelope().getBody().getFirstElement().getFirstOMChild();
binaryNode.setBinary(true);]]></script>
<!-- <property expression="concat($ctx:PATH,'/',$ctx:FOLDERNAME,'/',$ctx:FILENAME)" name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/> -->
<property expression="concat('vfs:file:///',$ctx:PATH,'/',$ctx:FOLDERNAME,'/',$ctx:FILENAME)" name="localpath"/>
<header name="To" expression="get-property('localpath')"/>
<log level="custom">
<property expression="$ctx:localpath" name="==ReplyFileName==="/>
</log>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<property action="remove" name="REST_URL_POSTFIX" scope="axis2"/>
<property name="messageType" scope="axis2" type="STRING" value="application/octet-stream"/>
<call/>
<payloadFactory media-type="json">
<format>
{
"status": "success",
"statusMessage" : "Image downloaded"
}
</format>
<args/>
</payloadFactory>
<log level="custom">
<property expression="json-eval($.)" name="Response"/>
</log>
</sequence>

unable to get endpoint from a property in wso2 esb 5.0.0

I am trying to send a message to JMS queue, the queue name is dynamic and it will be fetched from DB.
Along with the queue name, connection factory details, initial context factory, provider url are concatenated and saved in a property (endpt) in wso2 esb.
I want to use the final concatenated string (endpt) in send mediator as endpoint, i have given endpoint type as XPATH and called the variable using $ctx:endpt (endpt is the property where i have final formed URL), and it is not working.
<?xml version="1.0" encoding="UTF-8"?>
<property
expression="fn:concat('jms://', $ctx:queueName, '?
transport.jms.ConnectionFactoryJNDIName=', $ctx:connectionFactory,'&java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory&java.naming.provider.url=', 't3://localhost:7003,localhost:7004', '&transport.jms.DestinationType=queue')"
name="endpt" scope="default" type="STRING"
xmlns="http://ws.apache.org/ns/synapse"
xmlns:ns="http://org.apache.synapse/xsd"/>
EDIT 1: Code below is the complete sequence being called from a proxy service,
I need to send $body to the endpoint defined in To header. The same worked when i define a endpt in send mediator in the insequence of proxy service, but when i call the above sequence (using sequence mediator) from the proxy service, null message is sent to JMS queue.
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="sendtoconsumer" xmlns="http://ws.apache.org/ns/synapse">
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<property expression="//*[name() = 'CONSUMER_REFERENCE']/text()"
name="topic" scope="default" type="STRING"
xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="fn:substring-before($ctx:topic,'//')"
name="topicval" scope="default" type="STRING"
xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns="http://org.apache.synapse/xsd"/>
<property
expression="fn:substring-before(fn:substring-after($ctx:topic,'//'),'#')"
name="queueName" scope="default" type="STRING"
xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="fn:substring-after($ctx:topic,'#')"
name="connectionFactory" scope="default" type="STRING"
xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns="http://org.apache.synapse/xsd"/>
<log level="custom">
<property expression="$ctx:pubRequest" name="body" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="$ctx:topic" name="topic" xmlns:ns="http://org.apache.synapse/xsd"/>
<property expression="$ctx:topicval" name="topicval" xmlns:ns="http://org.apache.synapse/xsd"/>
</log>
<switch source="get-property('topicval')" xmlns:ns="http://org.apache.synapse/xsd">
<case regex="mq:"/>
<case regex="java:">
<property
expression="fn:concat('jms://', $ctx:queueName, '?transport.jms.ConnectionFactoryJNDIName=', $ctx:connectionFactory,'&java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory&java.naming.provider.url=', 't3://localhost:7003,localhost:7004', '&transport.jms.DestinationType=queue')"
name="endpt" scope="default" type="STRING"/>
<log level="custom">
<property expression="$ctx:endpt" name="sendvalue"/>
</log>
<header expression="get-property('endpt')" name="To"/>
<send>
<endpoint>
<default/>
</endpoint>
</send>
</case>
<case regex="http:"/>
<default>
<log level="custom">
<property expression="$ctx:topic" name="poda"/>
</log>
</default>
</switch>
</sequence>
The Xpath Endpoint is a key-expression - i.e., points to a resource - either in the registry, or in the local Endpoints.
What you actually need is a default endpoint and a header "To" with the endpoint value:
<header name="To" expression="get-property('endpt')"/>
<send>
<endpoint>
<default/>
</endpoint>
</send>

WSO2- Error Using Clone Mediator to send message to an endpoint

I am working on WSO2 proxy service that invokes a lot of other DSS services. My requirement is to send the response of one of the DSS service on to a jms queue and at the same time continue with the exsiting flow in the proxy service i.e. continue invoking and processing the other DSS services.
I need to get the response of Simple Product Service (sequence key -if4_simpleProduct) and send it back on to the queue, but after that continue with logic that is placed in the proxy service and sequence. I tried using CLONE Mediator for the same. But my prxy service flow stops after coming in to the CLONE Meditaor flow. Below is the snippet for proxy service and sequence.
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="SPE_Payload"
transports="jms" startOnLoad="true" trace="enable">
<description />
<target>
<inSequence>
<transaction action="new" />
<xslt key="StepToCommon" />
<log level="full" />
<enrich>
<source type="body" clone="true" />
<target type="property" property="MSG_PAYLOAD" />
</enrich>
<sequence key="if4_simpleProduct" />
<filter xpath="boolean (//product/simpleProduct/altPrdCodes/pn_apc_id/text())">
<enrich>
<source clone="true" xpath="//product/simpleProduct/altPrdCodes" />
<target type="property" property="ALT_PRDS" />
</enrich>
<sequence key="if4_alternateProducts" />
</filter>
....
.....
<transaction action="commit" />
</inSequence>
</target>
<parameter name="transport.jms.ContentType">application/xml</parameter>
<parameter name="transport.jms.Destination">test</parameter>
</proxy>
Given below is the code of for sequence while calling Simple Product Service
<sequence xmlns="http://ws.apache.org/ns/synapse" name="if4_simpleProduct"
onError="myErrorHandlerSeq">
<payloadFactory>
<format>
<p:O_SimpleProduct xmlns:p="http://ws.wso2.org/dataservice">
<p:PC_STEP_SKU_ID>$1</p:PC_STEP_SKU_ID>
</p:O_SimpleProduct>
</format>
<args>
<arg xmlns:m="http://wso2.org/services/product" evaluator="xml"
expression="//product/simpleProduct/step_id/text()" />
</args>
</payloadFactory>
<header name="Action" value="urn:O_SimpleProduct" />
<callout serviceURL="local://localhost/services/productEnrichment"
action="urn:O_SimpleProduct" useServerConfig="true">
<source xmlns:ns="http://org.apache.synapse/xsd" xpath="$body/child::*[fn:position()=1]" />
<target xmlns:ns="http://org.apache.synapse/xsd" xpath="$body/child::*[fn:position()=1]" />
</callout>
<clone sequential="false">
<property name="RESPONSE" value="true" />
<header name="To" action="remove" />
<target>
<endpoint>
<address
uri="jms:/step.IF04Output?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue" />
</endpoint>
</target>
<target>
<filter xmlns:ns="http://org.apache.synapse/xsd" xmlns:ds="http://wso2.org/services/product"
source="//ds:result/ds:set/ds:PC_STATUS/text()" regex="0">
<then>
<log level="custom">
<property name="STATUS"
value="************DONE INSERTING SIMPLE ATTRIBUTES***************" />
</log>
</then>
<else>
<log level="full" category="ERROR">
<property name="STATUS"
value="************ERROR OCCURED WHILE INSERTING SIMPLE ATTRIBUTES. ROLLBACKING THE TRANSACTION***************" />
<property name="PC_RP_ID" expression="get-property('GEN_RP_ID')" />
</log>
<transaction action="rollback" />
<drop />
</else>
</filter>
<property xmlns:ds="http://wso2.org/services/product" name="GEN_RP_ID"
expression="//ds:result/ds:set/ds:PC_RP_ID/text()" />
<enrich>
<source type="property" clone="true" property="MSG_PAYLOAD" />
<target type="body" />
</enrich>
</target>
</clone>
</sequence>
I am struggling with the issue since last two days. tried sing Clone meditior in several places. but it does not work. Could you please provide your suggestions soon as I have a demo to go tomorrow and I need to sort it out :(
Cheers,
Aanchal
I think this is the part you are struggling;
<callout serviceURL="local://localhost/services/productEnrichment"
action="urn:O_SimpleProduct" useServerConfig="true">
<source xmlns:ns="http://org.apache.synapse/xsd" xpath="$body/child::*[fn:position()=1]" />
<target xmlns:ns="http://org.apache.synapse/xsd" xpath="$body/child::*[fn:position()=1]" />
</callout>
<clone sequential="false">
<property name="RESPONSE" value="true" />
<header name="To" action="remove" />
<target>
<endpoint>
<address
uri="jms:/step.IF04Output?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue" />
</endpoint>
</target>
Since your requirement is get response form one of the DS service and send that to queue..I think it fails because you are removing "To" header..Use callout mediator inside clone mediator's one of the "Target" configuration after sending to JMS queue drop the message there..In the other target, define your rest of the logic..

NHibernate sluggish performance in FindAll(criteria) query

I have a very simple mapping file (se below) and a simple class.
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Domain"
namespace="Domain" default-access="field.camelcase-underscore"
default-lazy="true">
<class name="PricePropStateView" table="V_PRICE_PROP_STATES">
<id name="PriceId" column="PRICE_ID" type="long" />
<property name="DetailId" column="DETAILS_ID" type="long" />
<property name="Moe" column="MOE" type="string" />
<property name="PropId" column="PROP_ID" type="long" />
<property name="PoQteId" column="PO_QTE_ID" type="string" />
<property name="PoLineItemId" column="LINE_ITEM_ID" type="string" />
<property name="PropState" column="PROP_STATE" type="string" />
</class>
</hibernate-mapping>
The class represents a data set returned by a View in Oracle. The performance is very slow. When executed in Toad for Oracle, the result set is returned in less than a second. When using
DetachedCriteria criteria =
DetachedCriteria.For<PricePropStateView>()
.Add(Restrictions.Eq("PoQteId", aQuoteName));
return FindAll(criteria).ToList();
It is very slow...almost 29 seconds. Any ideas> Thanks

Resources