Synchronous writes using FileAdapter
Hi all,
I'm new to this SOA and BPEL stuff so I'm probably missing something obvious.
I'm writing out a file using a File adapter. This works fine.
The problem is when calling the invoke it invokes the FileAdapter as an async process. After the file is written there is a second(non soa/bpel) background process that is run to do some other processing on the file. However, with it being asynchronous we run into a situation where the second process can begin processing a file without it being completely written out yet.
How do we go about preventing this situation or at the very least is there a way to make the file adapter invoke synchronous?
Thanks!
there is a way to activate the processing of a file using a trigger file;
you should create the trigger file only after completion of the creation of the main file
consumption of the main file is activated by the trigger file
hope it helps
Similar Messages
-
Differenet BPEL instances write to same file using FileAdapter
Hi,
I want to write a file through BPEL using FileAdapter, But i dont want that whenever a new instance of BPEL is generated the new file is created.
I want all instances to write to the same 1 single file. Is it possible?
How can this be done?
Looking forward for your answer.
ThanksSee : http://www.customware.net/repository/display/FUSION/File+Adapter+-+Appending
-
How to read Filename using FileAdapter
I am trying to write some xml files using FileAdapter of SOA11g. For that I have created synchronous BPEL process.
My xyz.jca file looks something like this:
<endpoint-interaction portType="Write_ptt" operation="Write">
<interaction-spec className="oracle.tip.adapter.file.outbound.FileInteractionSpec">
<property name="PhysicalDirectory" value="/mnt/vol_ora_SOADEV1_apps_01/DevCsvFiles/Inventory"/>
<property name="Append" value="false"/>
<property name="FileNamingConvention" value="FileTemp%SEQ%.txt"/>
<property name="NumberMessages" value="1"/>
</interaction-spec>
</endpoint-interaction>
Now the problem is I want to know the filename which is just being written by this Adapter. I want to use that filename later in my code.
I tried using filename property in invove activity, but I am unable to read filename after its written to disk.Got right way to do it. Create one variable eg varFileName, assign some value eg. "Filenamexyz.ext" and refer to that variable (set properties of invoke activity jca.file.filename as varFileName and type 'Input')in Invoke activity invoking read adapter .
-
Im looking for help to find out what is correct way to determine when process doing synchronous writes to files.
As much as I understand synchronous writes happens when you open file with O_SYNC and O_DSYNC and perform write call.
I have created small C test with O_SYNC:
write_sync.c
int main()
srand ( time(NULL) );
char *filename = "test.txt";
char buf[4];
sprintf(buf,"%d",rand());
int ftest=access("test.txt",F_OK);
int fd = open (filename, O_WRONLY | O_CREAT |O_SYNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH );
write(fd, buf, sizeof(buf));
close(fd);
Dtrace show this on io:
dtrace -n 'io:::start / execname == "write_sync"/ {printf("%s %d %d %s",execname,args[0]->b_flags,args[0]->b_bufsize,args[2]->fi_pathname);}'
dtrace: description 'io:::start ' matched 6 probes
CPU ID FUNCTION:NAME
11 3381 bdev_strategy:start write_sync 524561 1024 /export/home/user/test.txt
11 3381 bdev_strategy:start write_sync 257 0 <none>
11 3381 bdev_strategy:start write_sync 257 0 <none>
11 3381 bdev_strategy:start write_sync 16777489 0 /export/home/user/test.txt
11 3381 bdev_strategy:start write_sync 16777489 0 /export/home/user/test.txt
11 3381 bdev_strategy:start write_sync 257 0 <none>
11 3381 bdev_strategy:start write_sync 257 0 <none>
11 3381 bdev_strategy:start write_sync 257 0 <none>
11 3381 bdev_strategy:start write_sync 16777473 0 <none>
11 3381 bdev_strategy:start write_sync 16777473 0 <none>
As I see buffer size shows only in first line 1024 and it cold be write I looking for. So b_flags for this write is 524561 and value according to /usr/include/sys/buf.h means:
0x0001 B_BUSY -> not on av_forw/back list
0x0010 B_PAGEIO -> do I/O to pages on bp->p_pages
0x0100 B_WRITE -> non-read pseudo-flag
0x080000 B_NOCACHE -> dont cache block when released
So if this true than you can find all sync writes with
dtrace -n 'io:::start / args[0]->b_flags == 524561 / {@Z[execname,args[2]->fi_pathname]=count();}'
This is how far I got and I'm not really sure if this is correct way.
P.S. sorry for my english
Edited by: 811258 on Jan 27, 2012 2:23 AM
Edited by: 811258 on Jan 27, 2012 2:24 AM
Edited by: 811258 on Jan 27, 2012 2:28 AMthere is a way to activate the processing of a file using a trigger file;
you should create the trigger file only after completion of the creation of the main file
consumption of the main file is activated by the trigger file
hope it helps -
Synchronous UART using PCI-6251
Hello
I am a beginner using LabVIEW and I need to create a synchronous UART using the PCI-6251, meaning, using one digital I/O to generate clock while another one shifts the data bit-by-bit. It has to work as a master in a half duplex mode. (LabVIEW always providing the clock but data flowing in one direction at a time).
Could someone help me?
Thanks!Hello,
It looks like your application is similar to the one in this forum. However the hardware in the forum is an X-Series in which the digital I/O has a dedicated sample clock and the PCI-6251 is an M-Series which requires you to provide the sample clock. In order to accomplish what you are describing you will need to create a counter output task to use as your sample clock for the digital output and also to export on a PFI line. An example of using a counter to correlate the digital output can be found by opening LabVIEW and navigating to Help»Find Examples»Hardware Input and Output»DAQmx»Digital Generation and selecting the Correlated Dig Write With Counter.vi.
Thank you,
Justin P
Justin
National Instruments
Product Support Engineer - Conditioned Measurements -
Issue in Synchronous OSB using Jms Queues in OSB11g
Hi,
I am working on building a synchronous OSB using the following steps.
1) Creating the Synchronous OSB Proxy Service which routes the message to the business service which in turn places a message in the Queue(inqueue) by populating the JMSCorrelationId and waits for the response message to consume from another queue.
2) A Composite(SOA) will consume the message from this Queue
3) It will do necessary transformation and Places it in another Queue (Say Response Queue).
4) OSB Business service waiting in Step 1 will receive the response from this response Queue.
I used a sample Wsdl which has both request and response message types.
I observed that the correlation ID is maintained properly from inqueue to response queue. But the message is not getting picked up by OSB from the response Queue
Twist: It is working absolutely fine in OSB 10g but it is not working in OSB 11g.
I tried using Messaging service as well as using the sample WSDL i.e keepiing the soap message in the queue. Both the cases are working absolutely fine OSB 10g but not in OSB 11g.
Can anyone faced a similar issue or any pointers will be great help in this regard.
Regards,
AshokTo debug this further can you check if the response Q has any active consumers. ? When you use response by correlation ID business service, OSB actually creates MDB's with message selectors under the hood.
This is a sample of the ejb-jar.xml of the MDB created for a business service with response by Correlation ID pattern.
<?xml version='1.0' encoding='UTF-8'?>
<jav:ejb-jar xmlns:jav="http://java.sun.com/xml/ns/javaee">
<jav:display-name>BEA ALSB JMS Outbound Sync-Async Endpoint</jav:display-name>
<jav:enterprise-beans>
<jav:message-driven>
<jav:ejb-name>ResponseEJB-6577847719916437493-3893eeb7.1287d30ba4f.-7fe1</jav:ejb-name>
<jav:ejb-class>com.bea.wli.sb.transports.jms.JmsAsyncResponseMDB</jav:ejb-class>
<jav:transaction-type>Container</jav:transaction-type>
<jav:message-destination-type>javax.jms.Queue</jav:message-destination-type>
<jav:activation-config>
*<jav:activation-config-property>*
*<jav:activation-config-property-name>messageSelector</jav:activation-config-property-name>*
*<jav:activation-config-property-value>JMSCorrelationID LIKE 'ID:424541534594cf52%'</jav:activation-config-property-value>*
*</jav:activation-config-property>*
</jav:activation-config>
<jav:env-entry>
<jav:env-entry-name>service-ref</jav:env-entry-name>
<jav:env-entry-type>java.lang.String</jav:env-entry-type>
<jav:env-entry-value>BusinessService$Test$RequestQ</jav:env-entry-value>
</jav:env-entry>
As you can see the message selector is based on JMSCorrelationID LIKE 'ID:424541534594cf52%'. This means the business service will pick only those messages which has its correlation ID starting with ID:424541534594cf52.
You can see the message selector for your MDB from admin console --> deployments.
Check and confirm if the correlation ID created in the request also starts with this value and the same is send back from the server. Also try deleting and recreating the business service or rename the business service which will create a new MDB under the hood and check the above. -
Atomic disk writes using Java, is it possible??
Hi, I need to do atomic disk writes using Java, is that supported/possible? And if, how is it done?
With a atomic disk write I mean that if I write to a file all information should be written or none at all, not just some of the data. (In case of a program crash or other failures in the computer)
/Fredrikyou can store all the information in an object..and when you are sure you have all you need, you write all the data in one step to a file...
but there is never a 100% guarantee.. you can check after the writing process if the size is correct or such things.. -
Why i cannot connect my dvd writer and cd writer using ide2???
why i cannot connect my dvd writer and cd writer using ide2???
can anyone help?Why is it that i cannot connect both the harddisk to IDE1 and both writers to IDE2 or IDE3?
Currently i am only connecting my Samsung 80G and Sony DRU810A to IDE1.
Can anyone help?
PowerLogic 450W
Intel Pentium 4 2.8Ghz FSB 533/775
512Mhz Kingston PC - 4300 DDR2 533 CL4
MSI 915P Neo2 FR
Samsung 80G 7200rpm 2MB
Maxtor 40G 7200rpm 2MB
Sony DRU810A 16xDVD+-R (8xDL)
Iomega cdrw 40x12x40 -
Printing to PDF Writer using VBA from MS Access
I have the printer properties for the Adobe PDF Writer set to use a default output folder on my desktop, and to not prompt for a filename. I have a loop in MS Access VBA that sends about 3000 individual reports to the PDF Writer, one after the next after the next.
The code in Access modifies the reports "caption" to include the employee number for the record it is on... that caption becomes the name of the report in the print queue... and the PDF Writer uses that as the filename! Each one has a different filename and eventually it prints all my reports.
Recently I have been getting an error from MS Access that says "Error 2212. Could not print your report." It stops the print run and I have to reset and pick up where it left off. Sometimes it prints 50 sometimes it prints 2500 before it hits that error. Sometimes it takes 5 or tries to get the job completed. Does anyone have any suggestions as to what may be going on?
Access 2003 SP3 on Windows XP Pro SP3, each upgraded with all MS Windows/Office updates. Adobe Acrobat 7, upgraded to 8, upgraded incrimentally to 8.14
Thank you for any advice. . .
~gabriel
P.S. I posted this in another forum and it was suggested I ask here.You might also check the two developer forums
Acrobat Scripting Forum http://forums.adobe.com/community/acrobat/acrobat_scripting
Acrobat SDK Developer Forum http://forums.adobe.com/community/acrobat/acrobat_scripting -
IPhone disk not read or write using iTunes.
iPhone disk not read or write using iTunes. I've tried the permissions on my MacBook Pro. I'm convinced it's my phone. This just started out of the blue. Any guidance ?
1. There is no such thing as an "iPhone disk." Please recheck that error message.
2. iPhones have NEVER been able to file transfer with BlueTooth to a computer. The BlueTooth profile has never been part of the iOS.
3. What iPhone model and iOS version, and what iTunes version are you using?
4. Is this phone jailbroken? -
Does Concurrent Data Store use synchronous writes?
When specifying the DB_INIT_CDB flag in opening a dbenv (to use a Concurrent Data Store), you are unable to specify any other flags except DB_INIT_MPOOL. Does this mean that logging and transactions are not enabled, and in turn that db does not use synchronous disk writes? It would be great if someone could confirm...
Hi,
Indeed, when setting up CDS (Concurrent Data Store) the only other subsystem you may initialize are the shared memory buffer pool subsystem (DB_INIT_MPOOL). CDS suites applications where there is no need for full recoverability or transaction semantics, and where you need support for deadlock-free, multiple-reader/single writer access to the database.
You will not initialize the transaction subsystem (DB_INIT_TXN) nor the logging subsystem (DB_INIT_LOG). Note that you cannot specify recovery configuration flags when opening the environment with DB_INIT_CDB (DB_INIT_RECOVER or DB_RECOVER_FATAL).
I assume that by synchronous/asynchronous writes you're referring to the possibility of using DB_TXN_NOSYNC and DB_TXN_WRITE_NOSYNC for transactions in TDS applications to influence the default behavior (DB_TXN_SYNC) when committing a transaction (which is to synchronously flush the log when the transaction commits). Since in a CDS set up there is no log buffer, no logs or transactions these flags do not apply.
The only aspect pertaining to writes in CDS applications that needs discussion is flushing the cache. Flushing the cache (or database cache) - DB->sync(), DB->close(), DB_ENV->memp_sync() - ensures that any changes made to the database are wrote to disk (stable storage). So, you could say that since there are no durability guarantees, including recoverability after failure, that disk writes in CDS application are not synchronous (they do not reach stable storage, you need to explicitly flush the environment/database cache).
More information on CDS applications is here:
[http://www.oracle.com/technology/documentation/berkeley-db/db/programmer_reference/cam.html]
Regards,
Andrei -
Read/Write using single adapter
How can i move the files from one location to another location using single file adapter?
Adapter can have only one operation either of the below.
Read, Write, Synchronous and Listing
To move the files you can refer the below URL and navigate to the below topic
http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm#CIACJFHF
*4.5.11 Copying, Moving, and Deleting Files*
- It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
Thanks,
Vijay -
Excel data write using report generation vi's
I can read data from an excel sheet but can not figure a way to write data to specific cells using the LabView report generation vi's.
In the "Excel Easy Table" VI you can specify where you want a table to be placed by wiring a value to the 'Start (0,0)' input. If you want more control than that you will have to open the "Excel_Insert_Table" vi and modify it. It is located in the _exclsub.llb library. I highly recommend making a backup copy of this llb before modifying any VI's in it.
Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect -
Need help to read and write using UTF-16LE
Hello,
I am in need of yr help.
In my application i am using UTF-16LE to export and import the data when i am doing immediate.
And sometimes i need to do the import in an scheduled formate..i.e the export and imort will happend in the specified time.
But in my application when i am doing scheduled import, they used the URL class to build the URL for that file and copy the data to one temp file to do the event later.
The importing file is in UTF-16LE formate and i need to write the code for that encoding formate.
The problem is when i am doing scheduled import i need to copy the data of the file into one temp place and they doing the import.
When copying the data from one file to the temp i cant use the UTF-16LE encoding into the URL .And if i get the path from the URl and creating the reader and writer its giving the FileNotFound exception.
Here is the excisting code,
protected void copyFile(String rootURL, String fileName) {
URL url = null;
try {
url = new URL(rootURL);
} catch(java.net.MalformedURLException ex) {
if(url != null) {
BufferedWriter out = null;
BufferedReader in = null;
try {
out = new BufferedWriter(new FileWriter(fileName));
in = new BufferedReader(new InputStreamReader(url.openStream()));
String line;
do {
line = in.readLine();
if(line != null) {
out.write(line, 0, line.length());
out.newLine();
} while(line != null);
in.close();
out.close();
} catch(Exception ex) {
Here String rootURL is the real file name from where i have to get the data and its UTF-16LE formate.And String fileName is the tem filename and it logical one.
I think i tried to describe the problem.
Plz anyone help me.
Thanks in advance.Hello,
thanks for yr reply...
I did the as per yr words using StreamWriter but the problem is i need a temp file name to create writer to write into that.
but its an logical one and its not in real so if i create Streamwriten in that its through FileNotFound exception.
The only problem is the existing code build using URL and i can change all the lines and its very difficult because its vast amount of data.
Is anyother way to solve this issue?
Once again thanks.. -
File Read and Write using File Adapter in Bpel
In Bpel Process i am using File Adapter ( Schema is Opaque) for read and write the file contents. i am able do successful deployment and read, write function in first time deployment, after that again i tired to run the application, its not going to write the content of file, its only writing the file with out data's or content in that file.
Please help me...
SaravananHi Eric
In my domain.log file having the following details. In this file im unable to find out what the exact problem. Please look at this and help me.
<2008-01-22 18:25:42,024> <INFO> <default.collaxa.cube.compiler> validating "C:\product\10.1.3.1\OracleAS_1\bpel\domains\default\tmp\.bpel_BPELProcess2_1.1_298e83988d77b6640c33dfeec11ed31b.tmp\BPELProcess2.bpel" ...
<2008-01-22 18:25:49,850> <INFO> <default.collaxa.cube.engine.deployment> <CubeProcessFactory::generateProcessClass>
Process "BPELProcess2" (revision "1.1") successfully compiled.
<2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Loading JCAActivationAgent for {portType=Read_ptt}
<2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Locating Adapter Framework instance: OraBPEL
<2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Done loading JCAActivationAgent for processId='bpel://localhost/default/BPELProcess2~1.1/
<2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.engine.deployment> Process "BPELProcess2" (revision "1.1") successfully loaded.
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::uninit Shutting down the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.0/', activation properties={portType=Read_ptt}
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - performing endpointDeactivation for portType=Read_ptt, operation=Read
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Endpoint De-activation called in adapter for endpoint : D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::init - Initializing the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.1/
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::initiateInboundJcaEndpoint - Creating and initializing inbound JCA endpoint for:
process='bpel://localhost/default/BPELProcess2~1.1/'
domain='default'
WSDL location='rd.wsdl'
portType='Read_ptt'
operation='Read'
activation properties={portType=Read_ptt}
<2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - endpointActivation for portType=Read_ptt, operation=Read
<2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Endpoint Activation called in File Adapter for endpoint: D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
<2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - successfully completed endpointActivation for portType=Read_ptt, operation=Read
<2008-01-22 18:26:02,890> <WARN> <default.collaxa.cube.activation> <File Adapter::Inbound> PollWork::run exiting, Worker thread will die
<2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Managed Connection Created
<2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Connection Created
<2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> FileInteraction Created
Maybe you are looking for
-
ORA-00600: internal error code while using UpdateXML to update xml content
Hi, I have been using the UpdateXML command to replace content of xml stored in XMLType. It was working absolutely fine. Below is the query: UPDATE temp d SET d.message_content = updateXML(d.message_content,'//*[.="Test" ]/text()','"Test123"') WHERE
-
I downloaded the Project files. Now it doesn't show up in the programs area. What happened to it? The files did download completely - it took a while! Assistance is greatly appreciated!
-
Number Range in Import Manager
Hi, Can I create a field which is automatically incremented with a specified number range and which is not unique?? Regards, RK
-
In finder, in finder, in finder, in finder, in finder, in finder
in finder when i open it my favorites does not sho how can i show it
-
Hi everybody, I've got a serious problem with my iChat service: the router process crashes constantly with messages like this: Process: router [1957] Path: /usr/bin/router Identifier: router Version: ??? (???) Code Typ