Problem Using Temporary Queue
I send an object message to a queue with the JMSReplyTo set to a temporay queue the
client uses to sit and listen for a response. When the MDB tries to do a lookup
on the temporary queue to send a response, it gives me the following error:
javax.naming.NameNotFoundException: Unable to resolve eDailiesJMSServer.TemporaryQueue56
Resolved: '' Unresolved:'eDailiesJMSServer' ; remaining name 'TemporaryQueue56'
<<no stack trace available>>
I checked in the WebLogic console while the client was still listening for a response
and it shows a temporay queue up and running called eDailiesJMSServer.TemporaryQueue56
Is there something else I should do to resolve the JNDI name? I used the following
code in the MDB to get the temporary queue name:
(Queue)msg.getJMSReplyTo()).getQueueName()
Any ideas?
You already have a reference to the Queue from msg.getJMSReplyTo(). There
should be no need to look it up again.
I don't think you are supposed to be able to look up a temporary queue in
this fashion anyway.
Bob
"Chuck Kiefriter" <[email protected]> wrote in message
news:3d209522$[email protected]..
>
> I send an object message to a queue with the JMSReplyTo set to a temporay
queue the
> client uses to sit and listen for a response. When the MDB tries to do a
lookup
> on the temporary queue to send a response, it gives me the following
error:
>
> javax.naming.NameNotFoundException: Unable to resolve
eDailiesJMSServer.TemporaryQueue56
> Resolved: '' Unresolved:'eDailiesJMSServer' ; remaining name
'TemporaryQueue56'
> <<no stack trace available>>
>
> I checked in the WebLogic console while the client was still listening for
a response
> and it shows a temporay queue up and running called
eDailiesJMSServer.TemporaryQueue56
>
> Is there something else I should do to resolve the JNDI name? I used the
following
> code in the MDB to get the temporary queue name:
>
> (Queue)msg.getJMSReplyTo()).getQueueName()
>
> Any ideas?
>
Similar Messages
-
Hi,
I've setup a template for temporary queues in the weblogic console (8.1SP4). However, I'm getting an exception when trying to destroy the queue after use. This doesn't happen with other JMS providers, so is there something special to Weblogic about temp queues? Is there a specific option that needs to be set in the template?
Queue: MyJMSServer.TemporaryQueue1390
weblogic.jms.common.JMSException: Destination is in use
at
weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at
weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:137)
at
weblogic.jms.dispatcher.DispatcherImpl_814_WLStub.dispatchSyncFuture(Unknown
Source)
at
weblogic.jms.dispatcher.DispatcherWrapperState.dispatchSync(DispatcherWrapperState.java:3
45)
at
weblogic.jms.client.JMSConnection.destroyTemporaryDestination(JMSConnection.java:1089)
at
weblogic.jms.common.DestinationImpl.delete(DestinationImpl.java:455)
at
com.trs.cv.fmk.fcms.common.impl.TimeoutQueueRequestor.request(TimeoutQueueRequestor.java:
203)
at
com.trs.cv.fmk.fcms.cas.client.impl.CasCnsIntegration.request(CasCnsIntegration.java:203)
Thanks,
NasrinIf there are still application receivers on the temporary destination, the call will fail. (As specified in the JMS javadoc.) Perhaps this is the reason for the exception? In which case the application needs to close its receivers first.
-
Example of using Temporary Queue
**Plz tell how temporary queue can be created and used by sender and receiver to communicate with each other.
**Will it will be feasible if single queue is used by clients with ID attached with each message.
Thanx**Plz tell how temporary queue can be created and
used by sender and receiver to communicate with each
other.Have a look at:
http://java.sun.com/j2ee/1.4/docs/api/javax/jms/QueueSession.html#createTemporaryQueue() -
How to bind Temporary Queue to Context in FioranoMQ
I have two JMS clients sending messages to each other via FioranoMQ.
And one client creates a temporary queue, for example
Temporary Queue auction1Queue = qSession.createTemporaryQueue();
My question is how to bind this auction1Queue to Context? so that the client on the side can lookup
I don't use the usual way of set/getJMSReplyTo() to message because it will change the logic of my program.
With SonicMQ, I just simply bind it like this
jndi.bind("auction1", auction1Queue);
then the other side just need to jndi.lookup("auction1")
and with ActiveMQ it is even simpler
Both side just need to lookup for the same name like that
jndi.lookup("dynamicQueues/auction1");
http://activemq.apache.org/jndi-support.html
But FioranoMQ does not support both of the above operations.
I don't really know how to do the same thing with FioranoMQ.
Hope that somebody can help me.
Thank you very much
Edited by: dannytrinh1 on Apr 16, 2009 5:53 AMHow to look up for temporary queue by using temporary queue name using JNDI context. I am getting lookup faild error" for temporary queue. While trying to bind this temporary queue name to jndi , it is throwing an exception as: notsupported exception. I am using ActiveMQ 5.2.
See below sample code...
tq = session.createTemporaryQueue();
jndiContext.bind("queue.MyTempQueue",tq); -
What port numbers are used when creating temporary queues
Using the following code as an example, what port(s) are used when creating temporary queues? Is it a range of ports? Is it random? And is it configurable? If you have any insight on this, please let me know. Thanks.
QueueConnection con = connectionFactory.createQueueConnection();
QueueSession session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
TemporaryQueue replyQueue = session.createTemporaryQueue();The only ports I know about are the defaults ports:
JMS 7676
IIOP 3700
Are these the only ports that are used, even for temporary queues? -
Hi,
I cannot create a receiver for the temporary queue. It throws "Invalid Destination"
exception. I disassembled the session class and the reason is the session class casts the
temporary query to Query and it throws null pointer exception as the temporary queue does not extend this
interface. The code I used is written as I had read in Sun's JMS tutorial, why it does not work?
Context ctx = new InitialContext();
QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("jms/QueueConnectionFactory");
QueueConnection connection = factory.createQueueConnection();
QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue tempQueue = session.createTemporaryQueue();
QueueReceiver receiver = session.createReceiver(reportQueue); <-- this is the place where the exception is thrown
receiver.setMessageListener(new ReportQueueListener());
connection.start();
Exception:
javax.jms.InvalidDestinationException: Invalid queue
at com.evermind.server.jms.EvermindQueueSession.createReceiver(EvermindQueueSession.java:145)
at com.evermind.server.jms.EvermindQueueSession.createReceiver(EvermindQueueSession.java:134)
Thanks, Zbynek
P.S. I found similar questions in this forum but no answer ???You already have a reference to the Queue from msg.getJMSReplyTo(). There
should be no need to look it up again.
I don't think you are supposed to be able to look up a temporary queue in
this fashion anyway.
Bob
"Chuck Kiefriter" <[email protected]> wrote in message
news:3d209522$[email protected]..
>
> I send an object message to a queue with the JMSReplyTo set to a temporay
queue the
> client uses to sit and listen for a response. When the MDB tries to do a
lookup
> on the temporary queue to send a response, it gives me the following
error:
>
> javax.naming.NameNotFoundException: Unable to resolve
eDailiesJMSServer.TemporaryQueue56
> Resolved: '' Unresolved:'eDailiesJMSServer' ; remaining name
'TemporaryQueue56'
> <<no stack trace available>>
>
> I checked in the WebLogic console while the client was still listening for
a response
> and it shows a temporay queue up and running called
eDailiesJMSServer.TemporaryQueue56
>
> Is there something else I should do to resolve the JNDI name? I used the
following
> code in the MDB to get the temporary queue name:
>
> (Queue)msg.getJMSReplyTo()).getQueueName()
>
> Any ideas?
>
-
After update the Premiere CC 2014 and Encoder CC 2014, I couldn't export the movie use the Queue function?
There always had a unknown error stop the process. (Compile error?)You need to fix that first.
Export and preview in the Media Encoder and watch when it stops.
There you need to fix the timeline.
Start a new project to see if you can use AME. -
Temporary queue - what am I doing wrong?
I have two different apps - one server and many clients, both are working with OpenMQ 4.2 on SP1 Vista x86.
Conception is:
1. Server has an one permanent queue to whom clients send auth requests.
2. Each time client prepares authorization request it creates temporary queue, where response from server should arrive - one queue per each client.
3. Name of this temporary queue is attached to authorization request.
But it doesn't work =((((((((
Piece of code on client dedicated to temp queue:
dataQueue = session.createTemporaryQueue();
dataQueueName = dataQueue.getQueueName();then DataQueueName is being sent to server as simple String message (something like temporary_destination://queue/***.***.***.***/61253/1 )property where it tries to use this queue:
// processing received message...
dataQueue = new com.sun.messaging.Queue(receivedString);But it doesn't work, Connection not created exception occurs.
What am I doing wrong?
Thanks to everybody for your future answers.thanks for your answer!
I've tried to work with autocreated queues as you wrote and it works, great =)
but I have a problem when adopting your example
Queue tmp = m.getJMSReplyTo();
there is type mismatch here, tmp is an +com.sun.messaging.Queue+ object, but method +getJMSReplyTo()+ returns +javax.jms.Destination+ =(
Edited by: GlebHappy on 17.11.2008 0:11 -
When Broker Restarts None of the Temporary Queues Are Created
Somehow when the broker restarts none of the temporary queues are getting recreated. The queues were created successfully the 1st time and the applications were happily exchanging messages. Things just fall apart when the broker restarts.
I'm able to reproduce this problem consistently by doing the following:
1. Start imqbrokerd (mq start)
2. Start client application
3. Shutdown imbrokerd (mq stop)
4. Start imqbrokerd (mq start)
After the producers in the client application have reconnected the following messages are displayed in the console. I'm only able to get the client app to work again is if I restart the client apps.
[02/Mar/2009:23:01:01 CST] attempting to set Message Bytes Limit to 10485760K for destination temporary_destination://queue/192.168.20.14/49823/1 [Queue]
[02/Mar/2009:23:01:01 CST] attempting to set Message Size Limit to 10240K for destination temporary_destination://queue/192.168.20.14/49823/1 [Queue]
[02/Mar/2009:23:01:01 CST] [B1065]: Accepting: [email protected]:57123->jms:37646. Count: service=9 broker=9
[02/Mar/2009:23:01:01 CST] [B2083]: Unable to create destination temporary_destination://queue/192.168.20.14/49823/1 [Queue], autocreation is forbidden
Do you guys have any idea on what's going on? Does anybody know of an existing workaround?
Environment:
- OpenMQ 4.3
- CentOS 5.2
- Sun JDK 1.6_05
- Spring 2.5.5
- Camel 1.3.0
I also looked at the code and found only one location where the error message is used. I still need to figure our how I can get the conditional expression to evaluate to false.
share/java/com/sun/messaging/jmq/jmsserver/core/Destination.java
1395 if (!DestType.isAdmin(type) && !canAutoCreate(DestType.isQueue(type),type) && !BrokerMonitor.isInternal(destination)) {
1396 throw new BrokerException(
1397 Globals.getBrokerResources().getKString(
1398 BrokerResources.W_DST_NO_AUTOCREATE,
1399 getName()),
1400 BrokerResources.W_DST_NO_AUTOCREATE,
1401 (Throwable) null,
1402 Status.FORBIDDEN);
-bash-3.2$ /tmp/openmq-4.3/mq/bin/imqcmd query bkr -t q -n MYQUEUE -u admin
Password: admin
Querying the broker specified by:
Host Primary Port
localhost 7676
Version 4.3
Instance Name imqbroker
Broker ID
Primary Port 7676
Broker is Embedded false
Instance Configuration/Data Root Directory /tmp/openmq-4.3-data/var/mq
Current Number of Messages in System 202
Current Total Message Bytes in System 317483
Current Number of Messages in Dead Message Queue 201
Current Total Message Bytes in Dead Message Queue 316444
Log Dead Messages true
Truncate Message Body in Dead Message Queue false
Max Number of Messages in System unlimited (-1)
Max Total Message Bytes in System unlimited (-1)
Max Message Size 70m
Auto Create Queues true
Auto Create Topics true
Auto Created Queue Max Number of Active Consumers unlimited (-1)
Auto Created Queue Max Number of Backup Consumers 0
Cluster ID
Cluster is Highly Available false
Cluster Broker List (active) mq://192.168.1.123:7676/
Cluster Broker List (configured)
Cluster Master Broker
Cluster URL
Log Level DEBUG
Log Rollover Interval (seconds) 604800
Log Rollover Size (bytes) 268435456
Successfully queried the broker.
I also tried versions 4.4 and 4.2 and received the same behavior :(The application is inside an app server but we're not using a resource adapter as we're using Spring and Camel to hide the JMS details. Spring (JMSComponent) manages the connection directly. (We current don't have any JMS connection pooling as well.)
<bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
<property name="connectionFactory" ref="jmsConnectionFactory" />
</bean>
<bean id="jmsConnectionFactory" class="com.norvax.framework.jms.OpenMQConnectionFactory">
<property name="openmqBrokerConfiguration">
<props>
<prop key="imqBrokerHostName">$remoting{openmq.hostName}</prop>
<prop key="imqBrokerHostPort">$remoting{openmq.hostPort}</prop>
<prop key="imqReconnect">true</prop>
</props>
</property>
</bean>
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="jmsConnectionFactory" />
</bean>
I'm going to write a very basic producer using Spring without using Camel and see if I'll get the same behavior. I'd like to see if the way Camel uses JMS is what's making OpenMQ broker to deny creation of temporary queues.
Thanks,
Jeff -
Cannot receive message on temporary queue
I am executing the following code in a web application.
It is sending a message to a JMS queue. The MDB
listening to that queue processes the message
and posts a reply to the temporary queue specified in
the JMS Reply to field. The queue browser code below
shows that the message is in the queue, but the receive
times out and returns null. My question is why can't the
receiver get the message?
Am I missing something?
Thanks in advance,
-Doug.
=====WEBAPP SIDE===========
QueueConnection connection = null;
QueueSession session = null;
QueueSender sender = null;
QueueReceiver receiver = null;
Queue respQueue = null;
try
connection = QUEUE_CON_FACTORY.createQueueConnection();
connection.start();
session = connection.createQueueSession(false, Session.CLIENT_ACKNOWLEDGE);
TextMessage textMessage = session.createTextMessage();
textMessage.setText(xmlInput);
if (wait)
respQueue = session.createTemporaryQueue();
textMessage.setJMSReplyTo(respQueue);
receiver = session.createReceiver(respQueue);
sender = session.createSender(INPUT_QUEUE);
sender.send(textMessage);
if (wait)
QueueBrowser qB = session.createBrowser(respQueue);
Enumeration enum = qB.getEnumeration();
while (enum.hasMoreElements())
Message msg = (Message) enum.nextElement();
LOG.debug("msg = " + msg);
return ((TextMessage) receiver.receive(10000)).getText();
return DEFAULT_RESPONSE;
=======MDB side============
QueueConnection queueConnection = QUEUE_CON_FACTORY.createQueueConnection();
queueConnection.start();
QueueSession queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
TextMessage textMsg = queueSession.createTextMessage();
textMsg.setText(buffer.toString());
QueueSender queueSender = queueSession.createSender((Queue)getReplyDestination());
queueSender.send(textMsg);
queueSender.close();
QueueBrowser qB = queueSession.createBrowser((Queue)bpelCtx.getReplyDestination());
Enumeration enum = qB.getEnumeration();
while (enum.hasMoreElements())
Message msg = (Message) enum.nextElement();
LOG.debug("msg = " + msg);
queueSession.close();
queueConnection.close();
==== LOG ====
[DEBUG] 2006-01-16 14:51:17,780 MDB - msg = TextMessage[ID:N<192225.1137444677780.0>, <unique-id-response xmlns
="htt...]
[DEBUG] 2006-01-16 14:51:27,374 WEBAPP -
msg = TextMessage[ID:N<192225.1137444677780.0>, <unique-id-response xmlns="htt..
.]At first glance, this looks like a standard design to me. Does the same problem occur when there are no browsers?
Tom
(Performance note: It is quite CPU-intensive to continually create and close connections/temporary destinations/sessions/consumers/producers. Cache and/or pool them for re-use when possible. Use a cached anonymous producer on the MDB for sending replies [pass null for the dest when creating it, and specify the dest as a send parameter].) -
MDBs responding via Temporary Queue
Hello,
I've been attempting to get this working in test code, but i seem to be missing something. I want a message producer to send a message to an administered queue, have the message processed by a Message Driven Bean, and have the bean post a response back to a temporary queue that was setup in the original producer. All over the net i find statements that this can be done and is reasonably normal, but i have not found a single code snippet to this effect, nor can i apparently get it to work on my own. I am using JMS with J2EE 1.3 on websphere 5.0.
Within the message producer, i create the temporary queue and pass it in the JMSReplyTo field.
<code>
TemporaryQueue tempq = queueSession.createTemporaryQueue();
message.setText("Temporary Queue Test Message");
message.setJMSReplyTo(tempq);
queueSender.send(message);
</code>
The MDB sees the message and onMessage is called normally. From within the MDB code, i have the temporary queue object (i print out the name of the queue in the message ReplyTo field with toString() to confirm) and i have the MDB context from getMessageDrivenContext() supplied by javax.ejb. Unfortunately, javax.ejb.MessageDrivenContext is not the same or similar to javax.naming.Context.
To send a message, i need the send() method from the QueueSender interface, which is generated from the QueueSession interface, which is generated from the QueueConnection interface, which is generated from a QueueConnectionFactory, and is ultimately reliant upon javax.naming.Context. So, i have the (temporary) queue object, but see no method to put a message on it for consumption by the creator of the temporary queue. (messages on temporary queues can only be consumed by the creator of said queue. if no other producer can use it, too, perhaps i am missing the point on temporary queues)
I can easily get the MDB to fire off messages to other administered queues. How do i get it to respond with a message on a temporary queue?
Could somebody please enlighten me?
thanks,
camThanks Andreas, your answer sent me off on new trails to read, but something is still missing. I hope that you (or anybody else) is able to see what i do not.
Your code was J2EE 1.4 (beta), but Websphere 5.0 still uses J2EE 1.3.1. I was able to translate most of your code back to the older form but some doesn't fit, which may be part of my problem (as shown below).
I have connection factories and queues already setup on the server. they work fine as far as all other non-temporary queue usage is concerned.
Using your code, here's some of the problems i have crossed while trying to sort this out
public void onMessage(Message inMessage)
Destination dest = (Destination) ctx.lookup("jms/t0");
MessageProducer producer = session.createProducer(dest);
producer.send(msg);
}My first question is how are you looking up a temporary (i.e. dynamically created) queue with some hard-coded string ("jms/t0")? I assume that your string was meant to be arbitrary but it must still represent the destination, which is the temporary queue that doesn't have a hardcodable name (AFAIK). I have tried using the name inMessage.getJMSReplyTo().toString(), which in my case gives me "queue://WAS_localhost_server1/AMQ.10000009?persistence=1", but this only throws a NamingException (not found) when trying to do a lookup() on it.
If you already had the Destination object from inMessage.getJMSReplyTo().toString(), why would you bother to go through a String lookup just to get the object again? (for use in the createProducer() call)
To get past the above naming exception, i commented out the Destination getting line and used the object from the getJMSReplyTo() message method. In 1.3.1, the equivalent Producer line looks like:
QueueSender producer = session.createSender(replyTo);which is pretty much like what i already had. Unfortunately, an error is reported that it is unable to open the specified queue. (J2CA0056I: The Connection Manager received a fatal connection error from the Resource Adaptor for resource JMS$MyMDBConnectionFactory$JMSManagedConnection@580144656. The exception which was received is MQJMS2008: failed to open MQ queue)
I double checked to make sure both the creator of the temporary queue and the MDB were both using the same administered Connection Factory. They are. I don't know if it's relevant.
Any further ideas?
Thanks,
cam -
Temporary Queue - Multithreaded Consumption?
I would like to create a single temporary queue, and then have multiple message listeners to process messages from it in parallel (i.e. using multiple JMS threads)
Is this doable? Are there any gotchas?
Will the following work?
Tks
Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
javax.jms.Queue tq = session.createTemporaryQueue(); then
In loop:
for ( int i = 0 ; i < numListeners ; i++ ) {
// Session comes with new thread
Session ses = connection.createSession(...);
MessageConsumer con = session.createConsumer(tq );
// listener for that thread
con.setMessageListener(new MyMessageListener());I still am having problems creating a consumer. The following test code gets a Naming Exception looking up the temporary queue. If I use the tempQueue object itself, it fails because the object belongs to a different connection.
Note: this code is being invoked by a ServletContextListener.
protected void doTest() throws Exception {
Context ctx = new InitialContext();
queueConnectionFactory = (QueueConnectionFactory) ctx.lookup("jms/queueConnectionFactory");
sendCon = queueConnectionFactory.createQueueConnection();
sendCon.start();
sendSession = sendCon.createSession(false, Session.AUTO_ACKNOWLEDGE);
Queue tempQueue = sendSession.createTemporaryQueue();
tempQueueName = tempQueue.getQueueName();
logger.info("Temp Q Name:"+tempQueueName);
producer = sendSession.createProducer(tempQueue);
rcvCon = queueConnectionFactory.createQueueConnection();
Session rcvSes = rcvCon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
logger.info("Looking up queue:"+tempQueueName);
Queue dest = (Queue)ctx.lookup(tempQueueName); // <<<<<FAILS - NAMING EXCEPTION
MessageConsumer consumer = rcvSes.createConsumer(dest)
rcvCon.start();
consumer.setMessageListener(new MyMessageListener(me, "Test"));
TextMessage msg = sendSession.createTextMessage("Test message");
producer.send(msg);
}Looking up queue:temporary_destination://queue/138.113.193.36/52744/1
javax.naming.NameNotFoundException
at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:268)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:191)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:111)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:398)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at TesterThreadUsingTempQueue.doTest(TesterThreadUsingTempQueue.java:112) -
MDB replying to temporary queue
Hi,
I'm having problems getting an MDB to reply to a temporary queue set by an EJB. It seems to be getting the correct temporary queue, but the EJB that is meant to receive the reply times out, and then gives a null pointer exception, which I assume means no text in the reply message.
here's the relevant code from both the EJB and MDB:
EJB:-
QueueSession queueSession = null;
QueueSender queueSender = null;
TemporaryQueue tq = null;
QueueReceiver queueReceiver = null;
TextMessage message = null;
try
queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queueSender = queueSession.createSender(queue);
tq = queueSession.createTemporaryQueue();
queueReceiver = queueSession.createReceiver(tq);
message = queueSession.createTextMessage();
message.setText("Message from EJB to MDB");
message.setJMSReplyTo(tq);
System.out.println("Temp queue = " + tq.toString());
queueSender.send(message);
Message response = queueReceiver.receive(20000);
TextMessage responseText = (TextMessage)response;
System.out.println("EJB: Message received: " + responseText.getText());
MDB:-
public void onMessage(Message inMessage)
TextMessage msg = null;
QueueConnection queueConnection = null;
QueueSession queueSession = null;
QueueSender queueSender = null;
TextMessage replyMsg = null;
try
if (inMessage instanceof TextMessage)
msg = (TextMessage) inMessage;
System.out.println("MESSAGE BEAN: Message received: " + msg.getText());
queueConnection = queueConnectionFactory.createQueueConnection();
queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
System.out.println("Temp Queue = " + msg.getJMSReplyTo().toString());
queueSender = queueSession.createSender((Queue)msg.getJMSReplyTo());
replyMsg = queueSession.createTextMessage();
replyMsg.setText("From MDB: Right back at ya");
System.out.println("Sending Reply Message");
queueSender.send(replyMsg);
Any ideas?
Thanks.Yes, I kind of figured there was no message to be found on the temporary reply queue.
I was wondering why this is, both beans have a toString() method that displays the same queue name, so they're using the same temporary queue, and the MDB definitely replies to the EJB. So I'm still not sure why the EJB doesn't find a message.
The MDB sends its reply long before the EJB times out on its receive. The only reason I put in the value 20000 ms was that with a blocking receive the EJB would wait indefinitely.
Still stuck,
thanks. -
Problem with temporary table refresh
Hi,
I running a process before validation on a page to populate a temporary table when I click a button.
On the following page I've built a shuttle on the temporary table. Not the most elegant solution, but the shuttle LOV box wouldn't process the oracle text commands in the SQL.
I'm not getting any error, but I have an unusual problem
It takes two passes for the data to be replaced. i.e I enter 'ABCD' in the filter and it returns data with 'ABCD'
If I return to the page and change the filter to 'EFGH' I still get 'ABCD'. I return to the page and click the button again and I get 'EFGH' results
I've checked the data in the temporay table and that is updating in line with the problem.
I've looked at the debug and that seems fine (i.e I can see the changed filter value), I've tried moving the truncate to a different process, that didn't help.
I've run it in SQL developer and it seems to work fine.
I've included the code below, but I can't see a problem with it.
Can anybody help?
begin
EXECUTE IMMEDIATE('TRUNCATE TABLE temp_cat');
commit;
if length(:P26_ADD_FILTER) > 0 then
insert into temp_cat (core_cat_id, core_cat_code, core_cat_desc)
select core_cat_id,core_cat_code,core_cat_desc from core_cat where CONTAINS (core_cat_desc, '
<query>
<textquery lang="ENGLISH" grammar="CONTEXT">&P26_ADD_FILTER.
<progression>
<seq><rewrite>transform((TOKENS, "{", "}", " "))</rewrite></seq>
<seq><rewrite>transform((TOKENS, "{", "}", " ; "))</rewrite></seq>
<seq><rewrite>transform((TOKENS, "{", "}", "AND"))</rewrite></seq>
<seq><rewrite>transform((TOKENS, "{", "}", "ACCUM"))</rewrite></seq>
</progression>
</textquery>
<score datatype="INTEGER" algorithm="COUNT"/>
</query>')>0 and core_cat_id not in (select pipe_project_cat.core_cat_id from pipe_project_cat where txtpamref = :p26_pamref);
else
insert into temp_cat (core_cat_id, core_cat_code, core_cat_desc)
select core_cat_id,core_cat_code,core_cat_desc from core_cat where
core_cat_id not in (select pipe_project_cat.core_cat_id from pipe_project_cat where txtpamref = :p26_pamref);
end if;
end;Hi,
Apex does not work well with temporary tables as you cannot guarantee which session from the pool will be used to serve each page.
In your case, it looks like the second page is using temporary data from the wrong session.
Have you considered using Apex Collections instead?
Luis -
Problem using existsnode from view
I am having a problem using existsnode from a view. I am currently using 10.2.0.3
example
CREATE OR REPLACE VIEW XML_PERSON_ASSOCIATION
(PERSON)
AS
select
xmlelement("Person",
xmlforest(
extractvalue(value(p),'/Person/PersonID') "PersonID",
extractvalue(value(p),'/Person/Prefix') "Prefix",
extractvalue(value(p),'/Person/FirstName') "FirstName",
extractvalue(value(p),'/Person/MiddleName') "MiddleName",
extractvalue(value(p),'/Person/LastName') "LastName",
extractvalue(value(p),'/Person/Suffix') "Suffix",
extractvalue(value(p),'/Person/PreferredName') "PreferredName",
extractvalue(value(p),'/Person/Gender') "Gender",
extractvalue(value(p),'/Person/PrimaryLanguage') "PrimaryLanguage",
extractvalue(value(p),'/Person/RecordStatus') "RecordStatus",
extractvalue(value(p),'/Person/ImportedDate') "ImportedDate",
(select
xmlagg(
xmlelement("Association",
xmlforest(
extractvalue(value(oa),'/OrganizationPersonAssoc/Name') "Name",
extractvalue(value(ot),'/OrganizationType/OrganizationID') "OrganizationID",
extractvalue(value(ot),'/OrganizationType/Type') "OrganizationType",
extractvalue(value(a),'/Association/Role') "Role",
extractvalue(value(a),'/Association/RecordStatus') "RecordStatus",
extractvalue(value(oa),'/OrganizationPersonAssoc/ImportedDate') "ImportedDate"
xmlelement("PersonTypes",
extract(value(per),'/Person/PersonTypes/PersonType')
xmlelement("Addresses",
extract(value(a),'/Association/Addresses/Address')
xmlelement("ContactMechanisms",
extract(value(a),'/Association/ContactMechanisms/ContactMechanism')
from org_person_assoc oa,
table(xmlsequence(extract(value(oa),'/OrganizationPersonAssoc/OrganizationTypes/OrganizationType'))) ot,
table(xmlsequence(extract(value(ot),'/OrganizationType/Associations/Association'))) a,
table(xmlsequence(extract(value(a),'/Association/Persons/Person'))) per
where extractvalue(value(per),'/Person/PersonID') = extractvalue(value(p),'/Person/PersonID')
) "Associations"
) person
from person p
/When I run the following statment
select person
from xml_person_association o
where existsnode(person,'/Person/Associations/Association[OrganizationID=30097]')=1;
I get no records returned. Now if I used the extract function and use the same path that's in the existsnode clause I get a record returned.
select extract(person,'/Person/Associations/Association')
from xml_person_association o
where existsnode(person,'/Person/Associations/Association[OrganizationID=30097]')=1;
<Association>
<Name>TEST DATA</Name>
<OrganizationID>30097</OrganizationID>
</Association>
If I run the same style of existsnode statment against a table directly instead of a view I am not required to use an extract caluse that has the same path that is used in the existsnode clause.
Thanks for the help.
Message was edited by:
mdrakeTesting in 11g I get
SQL>
SQL>
SQL> set echo on
SQL> spool testcase.log
SQL> --
SQL> connect sys/ as sysdba
Enter password:
Connected.
SQL> set define on
SQL> set timing on
SQL> --
SQL> define USERNAME = XDBTEST
SQL> --
SQL> def PASSWORD = XDBTEST
SQL> --
SQL> def USER_TABLESPACE = USERS
SQL> --
SQL> def TEMP_TABLESPACE = TEMP
SQL> --
SQL> drop user &USERNAME cascade
2 /
old 1: drop user &USERNAME cascade
new 1: drop user XDBTEST cascade
User dropped.
Elapsed: 00:00:09.42
SQL> grant connect, resource to &USERNAME identified by &PASSWORD
2 /
old 1: grant connect, resource to &USERNAME identified by &PASSWORD
new 1: grant connect, resource to XDBTEST identified by XDBTEST
Grant succeeded.
Elapsed: 00:00:00.03
SQL> grant create any directory, drop any directory to &USERNAME
2 /
old 1: grant create any directory, drop any directory to &USERNAME
new 1: grant create any directory, drop any directory to XDBTEST
Grant succeeded.
Elapsed: 00:00:00.00
SQL> grant alter session, create view to &USERNAME
2 /
old 1: grant alter session, create view to &USERNAME
new 1: grant alter session, create view to XDBTEST
Grant succeeded.
Elapsed: 00:00:00.00
SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
2 /
old 1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
new 1: alter user XDBTEST default tablespace USERS temporary tablespace TEMP
User altered.
Elapsed: 00:00:00.00
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> alter session set events ='19027 trace name context forever, level 0x800'
2 /
Session altered.
Elapsed: 00:00:00.00
SQL> var xmlText1 clob
SQL> var xmlText2 clob
SQL> var xmlSchema clob
SQL> var schemaURL varchar2(256)
SQL> --
SQL> begin
2 :schemaURL := 'mcs.xsd';
3 :xmlSchema :=
4 '<!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) by Shaun (PPD Inc) --> <s:schema xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xdb=
"http://xmlns.oracle.com/xdb" elementFormDefault="qualified" xdb:storeVarrayAsTable="true">
5 <s:element name="Organization" type="Organization" xdb:defaultTable="ORG"/>
6 <s:element name="Person" type="Person" xdb:defaultTable="PERSON"/>
7 <s:element name="OrganizationPersonAssoc" type="Organization" xdb:defaultTable="ORG_PERSON_ASSOC"/>
8 <s:complexType name="Organization" xdb:SQLType="Organization">
9 <s:sequence minOccurs="0">
10 <s:element name="Name" type="s:string" nillable="true"/>
11 <s:element name="LongName" type="s:string" nillable="true"/>
12 <s:element name="Description" type="s:string" nillable="true"/>
13 <s:element name="FWANumber" type="s:string" nillable="true"/>
14 <s:element name="GUID" type="s:string" nillable="true"/>
15 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
16 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
17 <s:element name="RecordStatus" type="s:string" nillable="true"/>
18 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
19 <s:element name="OrganizationTypes" type="ArrayOfOrganizationType" minOccurs="0"/>
20 <s:element name="OrganizationSynonyms" type="ArrayOfOrganizationSynonym"/>
21 <s:element name="ImportedDate" type="s:date"/>
22 </s:sequence>
23 </s:complexType>
24 <s:complexType name="ArrayOfOrganizationType" xdb:SQLType="ArrayOfOrganizationType">
25 <s:sequence minOccurs="0">
26 <s:element name="OrganizationType" type="OrganizationType" minOccurs="0" maxOccurs="unbounded"/>
27 </s:sequence>
28 </s:complexType>
29 <s:complexType name="OrganizationType" xdb:SQLType="OrganizationType">
30 <s:sequence minOccurs="0">
31 <s:element name="OrganizationID" type="s:string"/>
32 <s:element name="Type" type="s:string" nillable="true"/>
33 <s:element name="QCDoneStatus" type="s:string" nillable="true"/>
34 <s:element name="QCDoneStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
35 <s:element name="SiteEstablishmentStatus" type="s:string" nillable="true"/>
36 <s:element name="SiteEstablishmentStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
37 <s:element name="IPFNumber" type="s:int"/>
38 <s:element name="DUNSNumber" type="s:int"/>
39 <s:element name="GUID" type="s:string" nillable="true"/>
40 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
41 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
42 <s:element name="RecordStatus" type="s:string" nillable="true"/>
43 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
44 <s:element name="LegacyCodes" type="ArrayOfLegacyCode" minOccurs="0"/>
45 <s:element name="Addresses" type="ArrayOfAddress" minOccurs="0"/>
46 <s:element name="ContactMechanisms" type="ArrayOfContactMechanism" minOccurs="0"/>
47 <s:element name="Associations" type="ArrayOfAssociation" minOccurs="0"/>
48 </s:sequence>
49 </s:complexType>
50 <s:complexType name="ArrayOfLegacyCode" xdb:SQLType="ArrayOfLegacyCode">
51 <s:sequence minOccurs="0">
52 <s:element name="LegacyCode" type="LegacyCode" minOccurs="0" maxOccurs="unbounded"/>
53 </s:sequence>
54 </s:complexType>
55 <s:complexType name="LegacyCode" xdb:SQLType="LegacyCode">
56 <s:sequence minOccurs="0">
57 <s:element name="Code" type="s:string" nillable="true"/>
58 <s:element name="NetworkID" type="s:string"/>
59 <s:element name="GUID" type="s:string" nillable="true"/>
60 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
61 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
62 <s:element name="RecordStatus" type="s:string" nillable="true"/>
63 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
64 </s:sequence>
65 </s:complexType>
66 <s:complexType name="ArrayOfAddress" xdb:SQLType="ArrayOfAddress">
67 <s:sequence minOccurs="0">
68 <s:element name="Address" type="Address" minOccurs="0" maxOccurs="unbounded"/>
69 </s:sequence>
70 </s:complexType>
71 <s:complexType name="Address" xdb:SQLType="Address">
72 <s:sequence minOccurs="0">
73 <s:element name="StreetName1" type="s:string" nillable="true"/>
74 <s:element name="StreetName2" type="s:string" nillable="true"/>
75 <s:element name="StreetName3" type="s:string" nillable="true"/>
76 <s:element name="StreetName4" type="s:string" nillable="true"/>
77 <s:element name="CityName" type="s:string" nillable="true"/>
78 <s:element name="CityGUID" type="s:string" nillable="true"/>
79 <s:element name="CityCreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
80 <s:element name="CityLastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
81 <s:element name="CityRecordStatus" type="s:string" nillable="true"/>
82 <s:element name="CityRecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
83 <s:element name="StateName" type="s:string" nillable="true"/>
84 <s:element name="StateGUID" type="s:string" nillable="true"/>
85 <s:element name="StateCreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
86 <s:element name="StateLastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
87 <s:element name="StateRecordStatus" type="s:string" nillable="true"/>
88 <s:element name="StateRecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
89 <s:element name="CountryName" type="s:string" nillable="true"/>
90 <s:element name="CountryCode" type="s:string" nillable="true"/>
91 <s:element name="CountryGUID" type="s:string" nillable="true"/>
92 <s:element name="CountryCreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
93 <s:element name="CountryLastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
94 <s:element name="CountryRecordStatus" type="s:string" nillable="true"/>
95 <s:element name="CountryRecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
96 <s:element name="ZipPostalCode" type="s:string" nillable="true"/>
97 <s:element name="GUID" type="s:string" nillable="true"/>
98 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
99 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
100 <s:element name="RecordStatus" type="s:string" nillable="true"/>
101 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
102 <s:element name="Type" type="s:string" nillable="true"/>
103 <s:element name="TypeOtherSpecify" type="s:string" nillable="true"/>
104 <s:element name="InternalOffice" type="s:string" nillable="true"/>
105 <s:element name="MailStopCode" type="s:string" nillable="true"/>
106 <s:element name="PreferredFlag" type="s:string" nillable="true"/>
107 <s:element name="ActiveFromDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
108 <s:element name="QCDoneStatus" type="s:string" nillable="true"/>
109 <s:element name="QCDoneStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
110 </s:sequence>
111 </s:complexType>
112 <s:complexType name="ArrayOfContactMechanism" xdb:SQLType="ArrayOfContactMechanism">
113 <s:sequence minOccurs="0">
114 <s:element name="ContactMechanism" type="ContactMechanism" minOccurs="0" maxOccurs="unbounded"/>
115 </s:sequence>
116 </s:complexType>
117 <s:complexType name="ContactMechanism" xdb:SQLType="ContactMechanism">
118 <s:sequence minOccurs="0">
119 <s:element name="ContactType" type="s:string" nillable="true"/>
120 <s:element name="ContactTypeOtherSpecify" type="s:string" nillable="true"/>
121 <s:element name="ContactValue" type="s:string" nillable="true"/>
122 <s:element name="ContactAreaCode" type="s:string" nillable="true"/>
123 <s:element name="ContactCountryCallingCode" type="s:int"/>
124 <s:element name="ContactTollFreeFlag" type="s:string" nillable="true"/>
125 <s:element name="ContactGUID" type="s:string" nillable="true"/>
126 <s:element name="ContactCreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
127 <s:element name="ContactLastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
128 <s:element name="ContactRecordStatus" type="s:string" nillable="true"/>
129 <s:element name="ContactRecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
130 <s:element name="Role" type="s:string" nillable="true"/>
131 <s:element name="PhoneExtension" type="s:string" nillable="true"/>
132 <s:element name="QCDoneStatus" type="s:string" nillable="true"/>
133 <s:element name="QCDoneStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
134 <s:element name="ActiveFromDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
135 <s:element name="GUID" type="s:string" nillable="true"/>
136 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
137 <s:element name="ModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
138 <s:element name="PreferredFlag" type="s:string" nillable="true"/>
139 <s:element name="RecordStatus" type="s:string" nillable="true"/>
140 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
141 </s:sequence>
142 </s:complexType>
143 <s:complexType name="ArrayOfAssociation" xdb:SQLType="ArrayOfAssociation">
144 <s:sequence minOccurs="0">
145 <s:element name="Association" type="Association" minOccurs="0" maxOccurs="unbounded"/>
146 </s:sequence>
147 </s:complexType>
148 <s:complexType name="Association" xdb:SQLType="Association">
149 <s:sequence minOccurs="0">
150 <s:element name="Role" type="s:string" nillable="true"/>
151 <s:element name="GUID" type="s:string" nillable="true"/>
152 <s:element name="QCDoneStatus" type="s:string" nillable="true"/>
153 <s:element name="QCDoneStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
154 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
155 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
156 <s:element name="RecordStatus" type="s:string" nillable="true"/>
157 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
158 <s:element name="Addresses" type="ArrayOfAddress" minOccurs="0"/>
159 <s:element name="ContactMechanisms" type="ArrayOfContactMechanism" minOccurs="0"/>
160 <s:element name="Persons" type="ArrayOfPerson" minOccurs="0"/>
161 </s:sequence>
162 </s:complexType>
163 <s:complexType name="ArrayOfPerson" xdb:SQLType="ArrayOfPerson">
164 <s:sequence minOccurs="0">
165 <s:element name="Person" type="Person" minOccurs="0" maxOccurs="unbounded"/>
166 </s:sequence>
167 </s:complexType>
168 <s:complexType name="Person" xdb:SQLType="Person">
169 <s:sequence minOccurs="0">
170 <s:element name="PersonID" type="s:int"/>
171 <s:element name="Prefix" type="s:string" nillable="true"/>
172 <s:element name="FirstName" type="s:string" nillable="true"/>
173 <s:element name="MiddleName" type="s:string" nillable="true"/>
174 <s:element name="LastName" type="s:string" nillable="true"/>
175 <s:element name="Suffix" type="s:string" nillable="true"/>
176 <s:element name="PreferredName" type="s:string" nillable="true"/>
177 <s:element name="Gender" type="s:string" nillable="true"/>
178 <s:element name="PrimaryLanguage" type="s:string" nillable="true"/>
179 <s:element name="GUID" type="s:string" nillable="true"/>
180 <s:element name="RecordStatus" type="s:string" nillable="true"/>
181 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
182 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
183 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
184 <s:element name="QCDoneStatus" type="s:string" nillable="true"/>
185 <s:element name="QCDoneStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
186 <s:element name="PersonDegrees" type="ArrayOfPersonDegree" minOccurs="0"/>
187 <s:element name="PersonSpecialties" type="ArrayOfPersonSpecialty" minOccurs="0"/>
188 <s:element name="PersonTypes" type="ArrayOfPersonType" minOccurs="0"/>
189 <s:element name="Addresses" type="ArrayOfAddress" minOccurs="0"/>
190 <s:element name="ContactMechanisms" type="ArrayOfContactMechanism" minOccurs="0"/>
191 <s:element name="ImportedDate" type="s:date"/>
192 </s:sequence>
193 </s:complexType>
194 <s:complexType name="ArrayOfPersonDegree" xdb:SQLType="ArrayOfPersonDegree">
195 <s:sequence minOccurs="0">
196 <s:element name="PersonDegree" type="PersonDegree" minOccurs="0" maxOccurs="unbounded"/>
197 </s:sequence>
198 </s:complexType>
199 <s:complexType name="PersonDegree" xdb:SQLType="PersonDegree">
200 <s:sequence minOccurs="0">
201 <s:element name="Code" type="s:string" nillable="true"/>
202 <s:element name="Major" type="s:string" nillable="true"/>
203 <s:element name="ListingOrder" type="s:int"/>
204 <s:element name="GUID" type="s:string" nillable="true"/>
205 <s:element name="RecordStatus" type="s:string" nillable="true"/>
206 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
207 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
208 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
209 </s:sequence>
210 </s:complexType>
211 <s:complexType name="ArrayOfPersonSpecialty" xdb:SQLType="ArrayOfPersonSpecialty">
212 <s:sequence minOccurs="0">
213 <s:element name="PersonSpecialty" type="PersonSpecialty" minOccurs="0" maxOccurs="unbounded"/>
214 </s:sequence>
215 </s:complexType>
216 <s:complexType name="PersonSpecialty" xdb:SQLType="PersonSpecialty">
217 <s:sequence minOccurs="0">
218 <s:element name="Name" type="s:string" nillable="true"/>
219 <s:element name="GUID" type="s:string" nillable="true"/>
220 <s:element name="RecordStatus" type="s:string" nillable="true"/>
221 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
222 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
223 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
224 </s:sequence>
225 </s:complexType>
226 <s:complexType name="ArrayOfPersonType" xdb:SQLType="ArrayOfPersonType">
227 <s:sequence minOccurs="0">
228 <s:element name="PersonType" type="PersonType" minOccurs="0" maxOccurs="unbounded"/>
229 </s:sequence>
230 </s:complexType>
231 <s:complexType name="PersonType" xdb:SQLType="PersonType">
232 <s:sequence minOccurs="0">
233 <s:element name="Type" type="s:string" nillable="true"/>
234 <s:element name="GUID" type="s:string" nillable="true"/>
235 <s:element name="RecordStatus" type="s:string" nillable="true"/>
236 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
237 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
238 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
239 <s:element name="QCDoneStatus" type="s:string" nillable="true"/>
240 <s:element name="QCDoneStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
241 </s:sequence>
242 </s:complexType>
243 <s:complexType name="ArrayOfOrganizationSynonym" xdb:SQLType="ArrayOfOrganizationSynonym">
244 <s:sequence minOccurs="0">
245 <s:element name="OrganizationSynonym" type="OrganizationSynonym" minOccurs="0" maxOccurs="unbounded"/>
246 </s:sequence>
247 </s:complexType>
248 <s:complexType name="OrganizationSynonym" xdb:SQLType="OrganizationSynonym">
249 <s:sequence minOccurs="0">
250 <s:element name="Name" type="s:string" nillable="true"/>
251 <s:element name="GUID" type="s:string" nillable="true"/>
252 <s:element name="CreatedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
253 <s:element name="LastModifiedDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
254 <s:element name="RecordStatus" type="s:string" nillable="true"/>
255 <s:element name="RecordStatusDate" type="s:dateTime" xdb:SQLType="TIMESTAMP(6) WITH TIME ZONE"/>
256 </s:sequence>
257 </s:complexType>
258 </s:schema>';
259 :xmltext1 :=
260 '<?xml version="1.0" encoding="WINDOWS-1252"?> <Person xsi:noNamespaceSchemaLocation="mcs.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns
:xsi="http://www.w3.org/2001/XMLSchema-instance">
261 <PersonID>100448</PersonID>
262 <Prefix/>
263 <FirstName>John</FirstName>
264 <MiddleName/>
265 <LastName>Doe</LastName>
266 <Suffix/>
267 <PreferredName/>
268 <Gender/>
269 <PrimaryLanguage xsi:nil="true"/>
270 <GUID>ffff-ffff-ffff</GUID>
271 <RecordStatus>Active</RecordStatus>
272 <RecordStatusDate>2007-04-29T00:11:50.750000-04:00</RecordStatusDate>
273 <CreatedDate>2006-06-13T00:57:21.090000-04:00</CreatedDate>
274 <LastModifiedDate>2007-04-29T00:11:50.770000-04:00</LastModifiedDate>
275 <QCDoneStatus>Yes</QCDoneStatus>
276 <QCDoneStatusDate>2006-06-13T00:57:22.977000-04:00</QCDoneStatusDate>
277 <PersonDegrees>
278 <PersonDegree>
279 <Code>B.S.</Code>
280 <Major xsi:nil="true"/>
281 <ListingOrder>1</ListingOrder>
282 <GUID>d01bbcfd-9d48-47bf-818d-9957b907a664</GUID>
283 <RecordStatus>Active</RecordStatus>
284 <RecordStatusDate>2006-10-05T10:48:04.430000-04:00</RecordStatusDate>
285 <CreatedDate>2006-10-05T10:48:06.520000-04:00</CreatedDate>
286 <LastModifiedDate>2006-10-05T10:48:06.520000-04:00</LastModifiedDate>
287 </PersonDegree>
288 </PersonDegrees>
289 <PersonSpecialties/>
290 <PersonTypes>
291 <PersonType>
292 <Type>Resource Personnel</Type>
293 <GUID>3049ddcd-3590-4fd9-a534-e2cea5b82c09</GUID>
294 <RecordStatus>Active</RecordStatus>
295 <RecordStatusDate>2006-06-13T00:57:22.977000-04:00</RecordStatusDate>
296 <CreatedDate>2006-06-13T00:57:21.090000-04:00</CreatedDate>
297 <LastModifiedDate>2007-04-29T00:11:50.817000-04:00</LastModifiedDate>
298 <QCDoneStatus>Yes</QCDoneStatus>
299 <QCDoneStatusDate>2006-06-13T00:57:22.977000-04:00</QCDoneStatusDate>
300 </PersonType>
301 </PersonTypes>
302 <Addresses/>
303 <ContactMechanisms/>
304 <ImportedDate>2007-04-30</ImportedDate>
305 </Person>';
306 :xmltext2 :=
307 '<?xml version="1.0" encoding="WINDOWS-1252"?> <OrganizationPersonAssoc xsi:noNamespaceSchemaLocation="mcs.xsd" xmlns:xsd="http://www.w3.org/2001
/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
308 <Name>Org Name Office</Name>
309 <LongName>Long Name</LongName>
310 <Description xsi:nil="true"/>
311 <FWANumber xsi:nil="true"/>
312 <GUID>dddd-dddd</GUID>
313 <CreatedDate>2006-05-18T18:59:01.500000-04:00</CreatedDate>
314 <LastModifiedDate>2006-05-18T18:59:01.500000-04:00</LastModifiedDate>
315 <RecordStatus>Active</RecordStatus>
316 <RecordStatusDate>2006-05-18T18:59:01.500000-04:00</RecordStatusDate>
317 <OrganizationTypes>
318 <OrganizationType>
319 <OrganizationID>30097</OrganizationID>
320 <Type>Agency</Type>
321 <QCDoneStatus>Yes</QCDoneStatus>
322 <QCDoneStatusDate>2006-05-18T18:59:01.513000-04:00</QCDoneStatusDate>
323 <SiteEstablishmentStatus xsi:nil="true"/>
324 <SiteEstablishmentStatusDate>0001-01-01T00:00:00.000000-05:00</SiteEstablishmentStatusDate>
325 <IPFNumber>0</IPFNumber>
326 <DUNSNumber>0</DUNSNumber>
327 <GUID>cfe9e9e0-68a3-45c9-81c0-74848523133b</GUID>
328 <CreatedDate>2006-05-18T18:59:01.513000-04:00</CreatedDate>
329 <LastModifiedDate>2006-05-18T18:59:01.513000-04:00</LastModifiedDate>
330 <RecordStatus>Active</RecordStatus>
331 <RecordStatusDate>2006-05-18T18:59:01.513000-04:00</RecordStatusDate>
332 <Associations>
333 <Association>
334 <Role>Employee</Role>
335 <GUID>9a9a9a-ababab</GUID>
336 <QCDoneStatus>Yes</QCDoneStatus>
337 <QCDoneStatusDate>2006-06-13T01:29:09.030000-04:00</QCDoneStatusDate>
338 <CreatedDate>2006-06-13T01:29:09.030000-04:00</CreatedDate>
339 <LastModifiedDate>2006-07-25T15:27:23.783000-04:00</LastModifiedDate>
340 <RecordStatus>Active</RecordStatus>
341 <RecordStatusDate>2006-06-13T01:29:09.030000-04:00</RecordStatusDate>
342 <Addresses>
343 <Address>
344 <StreetName1>123 Front St.</StreetName1>
345 <StreetName2 xsi:nil="true"/>
346 <StreetName3 xsi:nil="true"/>
347 <StreetName4 xsi:nil="true"/>
348 <CityName>City</CityName>
349 <CityGUID>234234</CityGUID>
350 <CityCreatedDate>2006-05-08T20:06:45.143000-04:00</CityCreatedDate>
351 <CityLastModifiedDate>2006-05-08T20:06:45.143000-04:00</CityLastModifiedDate>
352 <CityRecordStatus>Active</CityRecordStatus>
353 <CityRecordStatusDate>2006-05-08T20:06:45.143000-04:00</CityRecordStatusDate>
354 <StateName>New York</StateName>
355 <StateGUID>9fd469e1-4d4a-4f38-9def-50038e5ecca2</StateGUID>
356 <StateCreatedDate>2006-04-22T16:09:35.830000-04:00</StateCreatedDate>
357 <StateLastModifiedDate>2006-04-22T16:09:35.830000-04:00</StateLastModifiedDate>
358 <StateRecordStatus>Active</StateRecordStatus>
359 <StateRecordStatusDate>2006-04-22T16:09:35.830000-04:00</StateRecordStatusDate>
360 <CountryName>United States</CountryName>
361 <CountryCode>USA</CountryCode>
362 <CountryGUID>532d35dd-3a49-408a-a416-20c41e9c7997</CountryGUID>
363 <CountryCreatedDate>2006-04-22T15:30:47.000000-04:00</CountryCreatedDate>
364 <CountryLastModifiedDate>2006-04-22T15:30:47.000000-04:00</CountryLastModifiedDate>
365 <CountryRecordStatus>Active</CountryRecordStatus>
366 <CountryRecordStatusDate>2006-04-22T15:30:47.000000-04:00</CountryRecordStatusDate>
367 <ZipPostalCode>12345</ZipPostalCode>
368 <GUID>b2414fa9-7375-4d26-8d76-89a6915d6751</GUID>
369 <CreatedDate>2006-06-13T01:29:09.030000-04:00</CreatedDate>
370 <LastModifiedDate>2006-07-29T23:45:17.670000-04:00</LastModifiedDate>
371 <RecordStatus>Active</RecordStatus>
372 <RecordStatusDate>2006-06-13T01:29:09.030000-04:00</RecordStatusDate>
373 <Type>Office</Type>
374 <TypeOtherSpecify/>
375 <InternalOffice></InternalOffice>
376 <MailStopCode/>
377 <PreferredFlag>Yes</PreferredFlag>
378 <ActiveFromDate>2006-06-13T01:29:09.000000-04:00</ActiveFromDate>
379 <QCDoneStatus>Yes</QCDoneStatus>
380 <QCDoneStatusDate>2006-06-13T01:29:09.030000-04:00</QCDoneStatusDate>
381 </Address>
382 </Addresses>
383 <ContactMechanisms>
384 <ContactMechanism>
385 <ContactType>Phone</ContactType>
386 <ContactTypeOtherSpecify xsi:nil="true"/>
387 <ContactValue>555-5555</ContactValue>
388 <ContactAreaCode>555</ContactAreaCode>
389 <ContactCountryCallingCode>1</ContactCountryCallingCode>
390 <ContactTollFreeFlag xsi:nil="true"/>
391 <ContactGUID>123</ContactGUID>
392 <ContactCreatedDate>2006-06-13T01:29:09.047000-04:00</ContactCreatedDate>
393 <ContactLastModifiedDate>2007-02-23T16:36:10.260000-05:00</ContactLastModifiedDate>
394 <ContactRecordStatus>Active</ContactRecordStatus>
395 <ContactRecordStatusDate>2006-06-13T01:29:09.047000-04:00</ContactRecordStatusDate>
396 <Role>Business</Role>
397 <PhoneExtension/>
398 <QCDoneStatus>Yes</QCDoneStatus>
399 <QCDoneStatusDate>2006-06-13T01:29:09.047000-04:00</QCDoneStatusDate>
400 <ActiveFromDate>2006-06-13T01:29:09.000000-04:00</ActiveFromDate>
401 <GUID>321</GUID>
402 <CreatedDate>2006-06-13T01:29:09.047000-04:00</CreatedDate>
403 <ModifiedDate>2006-07-29T23:53:03.323000-04:00</ModifiedDate>
404 <PreferredFlag>Yes</PreferredFlag>
405 <RecordStatus>Inactive</RecordStatus>
406 <RecordStatusDate>2006-07-29T23:53:03.393000-04:00</RecordStatusDate>
407 </ContactMechanism>
408 <ContactMechanism>
409 <ContactType>Email</ContactType>
410 <ContactTypeOtherSpecify xsi:nil="true"/>
411 <ContactValue>[email protected]</ContactValue>
412 <ContactAreaCode xsi:nil="true"/>
413 <ContactCountryCallingCode>0</ContactCountryCallingCode>
414 <ContactTollFreeFlag xsi:nil="true"/>
415 <ContactGUID>ddd</ContactGUID>
416 <ContactCreatedDate>2006-06-13T01:29:09.047000-04:00</ContactCreatedDate>
417 <ContactLastModifiedDate>2006-06-13T01:29:09.047000-04:00</ContactLastModifiedDate>
418 <ContactRecordStatus>Active</ContactRecordStatus>
419 <ContactRecordStatusDate>2006-06-13T01:29:09.047000-04:00</ContactRecordStatusDate>
420 <Role>Business</Role>
421 <PhoneExtension xsi:nil="true"/>
422 <QCDoneStatus>Yes</QCDoneStatus>
423 <QCDoneStatusDate>2006-06-13T01:29:09.063000-04:00</QCDoneStatusDate>
424 <ActiveFromDate>2006-06-13T01:29:09.063000-04:00</ActiveFromDate>
425 <GUID>111</GUID>
426 <CreatedDate>2006-06-13T01:29:09.063000-04:00</CreatedDate>
427 <ModifiedDate>2006-06-13T01:29:09.063000-04:00</ModifiedDate>
428 <PreferredFlag>Yes</PreferredFlag>
429 <RecordStatus>Active</RecordStatus>
430 <RecordStatusDate>2006-06-13T01:29:09.063000-04:00</RecordStatusDate>
431 </ContactMechanism>
432 </ContactMechanisms>
433 <Persons>
434 <Person>
435 <PersonID>100448</PersonID>
436 <Prefix/>
437 <FirstName>John</FirstName>
438 <MiddleName/>
439 <LastName>Doe</LastName>
440 <Suffix/>
441 <PreferredName/>
442 <Gender/>
443 <PrimaryLanguage xsi:nil="true"/>
444 <GUID>123</GUID>
445 <RecordStatus>Active</RecordStatus>
446 <RecordStatusDate>2007-04-29T00:11:50.750000-04:00</RecordStatusDate>
447 <CreatedDate>2006-06-13T00:57:21.090000-04:00</CreatedDate>
448 <LastModifiedDate>2007-04-29T00:11:50.770000-04:00</LastModifiedDate>
449 <QCDoneStatus>Yes</QCDoneStatus>
450 <QCDoneStatusDate>2006-06-13T00:57:22.977000-04:00</QCDoneStatusDate>
451 <PersonTypes>
452 <PersonType>
453 <Type>Resource Personnel</Type>
454 <GUID>3049ddcd-3590-4fd9-a534-e2cea5b82c09</GUID>
455 <RecordStatus>Active</RecordStatus>
456 <RecordStatusDate>2006-06-13T00:57:22.977000-04:00</RecordStatusDate>
457 <CreatedDate>2006-06-13T00:57:21.090000-04:00</CreatedDate>
458 <LastModifiedDate>2007-04-29T00:11:50.817000-04:00</LastModifiedDate>
459 <QCDoneStatus>Yes</QCDoneStatus>
460 <QCDoneStatusDate>2006-06-13T00:57:22.977000-04:00</QCDoneStatusDate>
461 </PersonType>
462 </PersonTypes>
463 </Person>
464 </Persons>
465 </Association>
466 </Associations>
467 </OrganizationType>
468 </OrganizationTypes>
469 <ImportedDate>2007-04-30</ImportedDate>
470 </OrganizationPersonAssoc>
471 ';
472 end;
473 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> begin
2 dbms_xmlschema.registerSchema
3 (
4 schemaURL => :schemaURL
5 ,schemaDoc => :xmlSchema
6 ,local => TRUE
7 ,genBean => false
8 ,genTypes => TRUE
9 ,genTables => TRUE
10 ,enableHierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
11 );
12 end;
13 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:03.67
SQL> insert into Person values ( xmltype (:xmltext1))
2 /
1 row created.
Elapsed: 00:00:00.07
SQL> insert into org_person_assoc values ( xmltype (:xmltext2))
2 /
1 row created.
Elapsed: 00:00:00.03
SQL> commit
2 /
Commit complete.
Elapsed: 00:00:00.00
SQL> CREATE OR REPLACE VIEW XML_PERSON_ASSOCIATION
2 (PERSON)
3 AS
4 select
5 xmlelement("Person",
6 xmlforest(
7 extractvalue(value(p),'/Person/PersonID') "PersonID",
8 extractvalue(value(p),'/Person/Prefix') "Prefix",
9 extractvalue(value(p),'/Person/FirstName') "FirstName",
10 extractvalue(value(p),'/Person/MiddleName') "MiddleName",
11 extractvalue(value(p),'/Person/LastName') "LastName",
12 extractvalue(value(p),'/Person/Suffix') "Suffix",
13 extractvalue(value(p),'/Person/PreferredName') "PreferredName",
14 extractvalue(value(p),'/Person/Gender') "Gender",
15 extractvalue(value(p),'/Person/PrimaryLanguage') "PrimaryLanguage",
16 extractvalue(value(p),'/Person/RecordStatus') "RecordStatus",
17 extractvalue(value(p),'/Person/ImportedDate') "ImportedDate",
18 (select
19 xmlagg(
20 xmlelement("Association",
21 xmlforest(
22 extractvalue(value(oa),'/OrganizationPersonAssoc/Name') "Name",
23 extractvalue(value(ot),'/OrganizationType/OrganizationID') "OrganizationID",
24 extractvalue(value(ot),'/OrganizationType/Type') "OrganizationType",
25 extractvalue(value(a),'/Association/Role') "Role",
26 extractvalue(value(a),'/Association/RecordStatus') "RecordStatus",
27 extractvalue(value(oa),'/OrganizationPersonAssoc/ImportedDate') "ImportedDate"
28 ),
29 xmlelement("PersonTypes",
30 extract(value(per),'/Person/PersonTypes/PersonType')
31 ),
32 xmlelement("Addresses",
33 extract(value(a),'/Association/Addresses/Address')
34 ),
35 xmlelement("ContactMechanisms",
36 extract(value(a),'/Association/ContactMechanisms/ContactMechanism')
37 )
38 )
39 )
40 from org_person_assoc oa,
41 table(xmlsequence(extract(value(oa),'/OrganizationPersonAssoc/OrganizationTypes/OrganizationType'))) ot,
42 table(xmlsequence(extract(value(ot),'/OrganizationType/Associations/Association'))) a,
43 table(xmlsequence(extract(value(a),'/Association/Persons/Person'))) per
44 where extractvalue(value(per),'/Person/PersonID') = extractvalue(value(p),'/Person/PersonID')
45 ) "Associations"
46 )
47 ) person
48 from person p
49 /
View created.
Elapsed: 00:00:00.06
SQL> set autotrace on explain
SQL> --
SQL> set long 10000 pages 0 lines 150
SQL> --
SQL> select person
2 from xml_person_association o
3 where existsnode(person,'/Person/Associations/Association[OrganizationID=30097]')=1
4 /
<Person><PersonID>100448</PersonID><FirstName>John</FirstName><LastName>Doe</LastName><RecordStatus>Active</RecordStatus><ImportedDate>2007-04-30</Imp
ortedDate><Associations><Association><Name>Org Name Office</Name><OrganizationID>30097</OrganizationID><OrganizationType>Agency</OrganizationType><Rol
e>Employee</Role><RecordStatus>Active</RecordStatus><ImportedDate>2007-04-30</ImportedDate><PersonTypes><PersonType>
<Type>Resource Personnel</Type>
<GUID>3049ddcd-3590-4fd9-a534-e2cea5b82c09</GUID>
<RecordStatus>Active</RecordStatus>
<RecordStatusDate>2006-06-13T00:57:22.977000-04:00</RecordStatusDate>
<CreatedDate>2006-06-13T00:57:21.090000-04:00</CreatedDate>
<LastModifiedDate>2007-04-29T00:11:50.817000-04:00</LastModifiedDate>
<QCDoneStatus>Yes</QCDoneStatus>
<QCDoneStatusDate>2006-06-13T00:57:22.977000-04:00</QCDoneStatusDate>
</PersonType>
</PersonTypes><Addresses><Address>
<StreetName1>123 Front St.</StreetName1>
<StreetName2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<StreetName3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<StreetName4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<CityName>City</CityName>
<CityGUID>234234</CityGUID>
<CityCreatedDate>2006-05-08T20:06:45.143000-04:00</CityCreatedDate>
<CityLastModifiedDate>2006-05-08T20:06:45.143000-04:00</CityLastModifiedDate>
<CityRecordStatus>Active</CityRecordStatus>
<CityRecordStatusDate>2006-05-08T20:06:45.143000-04:00</CityRecordStatusDate>
<StateName>New York</StateName>
<StateGUID>9fd469e1-4d4a-4f38-9def-50038e5ecca2</StateGUID>
<StateCreatedDate>2006-04-22T16:09:35.830000-04:00</StateCreatedDate>
<StateLastModifiedDate>2006-04-22T16:09:35.830000-04:00</StateLastModifiedDate>
<StateRecordStatus>Active</StateRecordStatus>
<StateRecordStatusDate>2006-04-22T16:09:35.830000-04:00</StateRecordStatusDate>
<CountryName>United States</CountryName>
<CountryCode>USA</CountryCode>
<CountryGUID>532d35dd-3a49-408a-a416-20c41e9c7997</CountryGUID>
<CountryCreatedDate>2006-04-22T15:30:47.000000-04:00</CountryCreatedDate>
<CountryLastModifiedDate>2006-04-22T15:30:47.000000-04:00</CountryLastModifiedDate>
<CountryRecordStatus>Active</CountryRecordStatus>
<CountryRecordStatusDate>2006-04-22T15:30:47.000000-04:00</CountryRecordStatusDate>
<ZipPostalCode>12345</ZipPostalCode>
<GUID>b2414fa9-7375-4d26-8d76-89a6915d6751</GUID>
<CreatedDate>2006-06-13T01:29:09.030000-04:00</CreatedDate>
<LastModifiedDate>2006-07-29T23:45:17.670000-04:00</LastModifiedDate>
<RecordStatus>Active</RecordStatus>
<RecordStatusDate>2006-06-13T01:29:09.030000-04:00</RecordStatusDate>
<Type>Office</Type>
<TypeOtherSpecify/>
<InternalOffice/>
<MailStopCode/>
<PreferredFlag>Yes</PreferredFlag>
<ActiveFromDate>2006-06-13T01:29:09.000000-04:00</ActiveFromDate>
<QCDoneStatus>Yes</QCDoneStatus>
<QCDoneStatusDate>2006-06-13T01:29:09.030000-04:00</QCDoneStatusDate>
</Address>
</Addresses><ContactMechanisms><ContactMechanism>
<ContactType>Phone</ContactType>
<ContactTypeOtherSpecify xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<ContactValue>555-5555</ContactValue>
<ContactAreaCode>555</ContactAreaCode>
<ContactCountryCallingCode>1</ContactCountryCallingCode>
<ContactTollFreeFlag xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<ContactGUID>123</ContactGUID>
<ContactCreatedDate>2006-06-13T01:29:09.047000-04:00</ContactCreatedDate>
<ContactLastModifiedDate>2007-02-23T16:36:10.260000-05:00</ContactLastModifiedDate>
<ContactRecordStatus>Active</ContactRecordStatus>
<ContactRecordStatusDate>2006-06-13T01:29:09.047000-04:00</ContactRecordStatusDate>
<Role>Business</Role>
<PhoneExtension/>
<QCDoneStatus>Yes</QCDoneStatus>
<QCDoneStatusDate>2006-06-13T01:29:09.047000-04:00</QCDoneStatusDate>
<ActiveFromDate>2006-06-13T01:29:09.000000-04:00</ActiveFromDate>
<GUID>321</GUID>
<CreatedDate>2006-06-13T01:29:09.047000-04:00</CreatedDate>
<ModifiedDate>2006-07-29T23:53:03.323000-04:00</ModifiedDate>
<PreferredFlag>Yes</PreferredFlag>
<RecordStatus>Inactive</RecordStatus>
<RecordStatusDate>2006-07-29T23:53:03.393000-04:00</RecordStatusDate>
</ContactMechanism>
<ContactMechanism>
<ContactType>Email</ContactType>
<ContactTypeOtherSpecify xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<ContactValue>[email protected]</ContactValue>
<ContactAreaCode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<ContactCountryCallingCode>0</ContactCountryCallingCode>
<ContactTollFreeFlag xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<ContactGUID>ddd</ContactGUID>
<ContactCreatedDate>2006-06-13T01:29:09.047000-04:00</ContactCreatedDate>
<ContactLastModifiedDate>2006-06-13T01:29:09.047000-04:00</ContactLastModifiedDate>
<ContactRecordStatus>Active</ContactRecordStatus>
<ContactRecordStatusDate>2006-06-13T01:29:09.047000-04:00</ContactRecordStatusDate>
<Role>Business</Role>
<PhoneExtension xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<QCDoneStatus>Yes</QCDoneStatus>
<QCDoneStatusDate>2006-06-13T01:29:09.063000-04:00</QCDoneStatusDate>
<ActiveFromDate>2006-06-13T01:29:09.063000-04:00</ActiveFromDate>
<GUID>111</GUID>
<CreatedDate>2006-06-13T01:29:09.063000-04:00</CreatedDate>
<ModifiedDate>2006-06-13T01:29:09.063000-04:00</ModifiedDate>
<PreferredFlag>Yes</PreferredFlag>
<RecordStatus>Active</RecordStatus>
<RecordStatusDate>2006-06-13T01:29:09.063000-04:00</RecordStatusDate>
</ContactMechanism>
</ContactMechanisms></Association></Associations></Person>
Elapsed: 00:00:00.42
Execution Plan
Plan hash value: 95656148
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 18040 | 9 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 10096 | | |
| 2 | TABLE ACCESS BY INDEX ROWID | SYS_NT32zHSpCZQ9ynComtqqKsrw== | 1 | 10096 | 2 (0)| 00:00:01 |
|* 3 | INDEX RANGE SCAN | SYS_C009300 | 1 | | 2 (0)| 00:00:01 |
| 4 | SORT AGGREGATE | | 1 | 48284 | | |
| 5 | TABLE ACCESS BY INDEX ROWID | SYS_NTjbkXqKq3S96fbEOM3Qs5Gg== | 1 | 48284 | 2 (0)| 00:00:01 |
|* 6 | INDEX RANGE SCAN | SYS_C009296 | 1 | | 2 (0)| 00:00:01 |
| 7 | SORT AGGREGATE | | 1 | 28187 | | |
| 8 | TABLE ACCESS BY INDEX ROWID| SYS_NTm2nBfKKNSGm6hs2e1Z0w/A== | 1 | 28187 | 2 (0)| 00:00:01 |
|* 9 | INDEX RANGE SCAN | SYS_C009297 | 1 | | 2 (0)| 00:00:01 |
| 10 | SORT AGGREGATE | | 1 | 13910 | | |
| 11 | NESTED LOOPS | | 1 | 13910 | 6 (0)| 00:00:01 |
| 12 | NESTED LOOPS | | 1 | 8131 | 5 (0)| 00:00:01 |
| 13 | NESTED LOOPS | | 1 | 4097 | 4 (0)| 00:00:01 |
|* 14 | TABLE ACCESS FULL | SYS_NT7Erd/G5iSPWX9w20Z5cNRg== | 1 | 43 | 3 (0)| 00:00:01 |
|* 15 | TABLE ACCESS BY INDEX ROWID | SYS_NTQWY/m3uES5GM7AByRclr8A== | 1 | 4054 | 1 (0)| 00:00:01 |
|* 16 | INDEX UNIQUE SCAN | SYS_C009310 | 1 | | 0 (0)| 00:00:01 |
|* 17 | TABLE ACCESS BY INDEX ROWID | SYS_NTTiDHMvB7RbSEfNxho66yQg== | 1 | 4034 | 1 (0)| 00:00:01 |
|* 18 | INDEX UNIQUE SCAN | SYS_C009314 | 1 | | 0 (0)| 00:00:01 |
| 19 | TABLE ACCESS BY INDEX ROWID | ORG_PERSON_ASSOC | 1 | 5779 | 1 (0)| 00:00:01 |
|* 20 | INDEX UNIQUE SCAN | SYS_C009320 | 1 | | 0 (0)| 00:00:01 |
|* 21 | FILTER | | | | | |
| 22 | TABLE ACCESS FULL | PERSON | 1 | 18040 | 3 (0)| 00:00:01 |
| 23 | NESTED LOOPS | | | | | |
| 24 | NESTED LOOPS | | 1 | 5893 | 6 (0)| 00:00:01 |
| 25 | NESTED LOOPS | | 1 | 2125 | 5 (0)| 00:00:01 |
| 26 | NESTED LOOPS | | 1 | 93 | 4 (0)| 00:00:01 |
|* 27 | TABLE ACCESS FULL | SYS_NT7Erd/G5iSPWX9w20Z5cNRg== | 1 | 43 | 3 (0)| 00:00:01 |
|* 28 | TABLE ACCESS BY INDEX ROWID| SYS_NTQWY/m3uES5GM7AByRclr8A== | 1 | 50 | 1 (0)| 00:00:01 |
|* 29 | INDEX UNIQUE SCAN | SYS_C009310 | 1 | | 0 (0)| 00:00:01 |
|* 30 | TABLE ACCESS BY INDEX ROWID | SYS_NTTiDHMvB7RbSEfNxho66yQg== | 1 | 2032 | 1 (0)| 00:00:01 |
|* 31 | INDEX UNIQUE SCAN | SYS_C009314 | 1 | | 0 (0)| 00:00:01 |
|* 32 | INDEX UNIQUE SCAN | SYS_C009320 | 1 | | 0 (0)| 00:00:01 |
| 33 | TABLE ACCESS BY INDEX ROWID | ORG_PERSON_ASSOC | 1 | 3768 | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
3 - access("NESTED_TABLE_ID"=:B1)
6 - access("NESTED_TABLE_ID"=:B1)
9 - access("NESTED_TABLE_ID"=:B1)
14 - filter("SYS_NC_TYPEID$" IS NOT NULL AND "PersonID"=:B1)
15 - filter("SYS_NC_TYPEID$" IS NOT NULL)
16 - access("NESTED_TABLE_ID"="SYS_ALIAS_1"."SYS_NC0002700028$")
17 - filter("SYS_NC_TYPEID$" IS NOT NULL)
18 - access("NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0003700038$")
20 - access("NESTED_TABLE_ID"="OA"."SYS_NC0002100022$")
21 - filter( EXISTS (SELECT 0 FROM "XDBTEST"."SYS_NT7Erd/G5iSPWX9w20Z5cNRg=="
"SYS_ALIAS_1","XDBTEST"."SYS_NTQWY/m3uES5GM7AByRclr8A=="
"SYS_ALIAS_3","XDBTEST"."SYS_NTTiDHMvB7RbSEfNxho66yQg==" "SYS_ALIAS_0","XDBTEST"."ORG_PERSON_ASSOC" "OA"
WHERE "SYS_ALIAS_0"."NESTED_TABLE_ID"="OA"."SYS_NC0002100022$" AND
"SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0003700038$" AND "SYS_ALIAS_0"."SYS_NC_TYPEID$" IS
NOT NULL AND TO_NUMBER("SYS_ALIAS_0"."OrganizationID")=30097 AND
"SYS_ALIAS_4"."NESTED_TABLE_ID"="SYS_ALIAS_1"."SYS_NC0002700028$" AND "SYS_ALIAS_1"."SYS_NC_TYPEID$" IS
NOT NULL AND "SYS_ALIAS_4"."SYS_NC_TYPEID$" IS NOT NULL AND "SYS_ALIAS_4"."PersonID"=:B1))
27 - filter("SYS_ALIAS_4"."SYS_NC_TYPEID$" IS NOT NULL AND "SYS_ALIAS_4"."PersonID"=:B1)
28 - filter("SYS_ALIAS_1"."SYS_NC_TYPEID$" IS NOT NULL)
29 - access("SYS_ALIAS_4"."NESTED_TABLE_ID"="SYS_ALIAS_1"."SYS_NC0002700028$")
30 - filter("SYS_ALIAS_0"."SYS_NC_TYPEID$" IS NOT NULL AND
TO_NUMBER("SYS_ALIAS_0"."OrganizationID")=30097)
31 - access("SYS_ALIAS_1"."NESTED_TABLE_ID"="SYS_ALIAS_0"."SYS_NC0003700038$")
32 - access("SYS_ALIAS_0"."NESTED_TABLE_ID"="OA"."SYS_NC0002100022$")
Note
- dynamic sampling used for this statement
SQL> select extract(person,'/Person/Associations/Association')
2 from xml_person_association o
3 where existsnode(person,'/Person/Associations/Association[OrganizationID=30097]')=1
4 /
<Association><Name>Org Name Office</Name><OrganizationID>30097</OrganizationID><OrganizationType>Agency</OrganizationType><Role>Employee</Role><Record
Status>Active</RecordStatus><ImportedDate>2007-04-30</ImportedDate><PersonTypes><PersonType><Type>Resource Personnel</Type><GUID>3049ddcd-3590-4fd9-a5
34-e2cea5b82c09</GUID><RecordStatus>Active</RecordStatus><RecordStatusDate>2006-06-13T00:57:22.977000-04:00</RecordStatusDate><CreatedDate>2006-06-13T
00:
Maybe you are looking for
-
Hello all, I have been trying to upload a URL in my java application but I am always getting URL not reachable error message generating from a thrown exception. I know this may be easy but I am not able to find any solution for this is there a way to
-
I've come across some confusion in terms of exporting the proper 4:3 format for viewing on TV. Why does it label the format 'NTSC' when really it is not 4:3 and in fact stretches your video to fit that ratio? It ends up bringing the video down to 640
-
JPA: How to initialise an entity for a self-referencing table?
I am working on a project that requires a self-referencing table: mysql> show create table attributes\G *************************** 1. row *************************** Table: attributes Create Table: CREATE TABLE `attributes` ( `id` int(11) N
-
Can files on external drive return to 'Places'?
Sorry for the confusing title! Basically, I have the external with a file I've added to 'Places' for quick access. When I disconnect the drive, the shortcut vanishes (This makes sense as it's no longer accessible). However, when I reconnect the drive
-
I don't know what service to pick...
I've been round and round the Skype site and can't find any way to ask simple per-sales questions so I'm hoping some of you guys can help, please. I run a small consultancy and want to have a landline number that we can answer whilst I'm in the offic