Question on use of shared memory objects during CIF executions
We have a CIF that runs in background via program RIMODACT that is invoked from our external job scheduler. (The schedulere kicks off a job - call it CIFJOB - and the first step of this job executes RIMODACT.)
During the execution of RIMODACT, we call a BAdI (an implementation of SMOD_APOCF005.)
In the method of this BAdI, we load some data into a shared memory object each time the BAdI is called. (We create this shared memory object the first time the BAdI is called.)
After program RIMODACT finishes, the second step of CIFJOB calls a wrapper program that calls two APO BAPI's.
Will the shared memory object be available to these BAPIs?
Reason I'm asking is that the BAPIs execute on the APO app server, but the shared memory object was created in a CIF exit called from a program executing on the ECC server (RIMODACT).
Edited by: David Halitsky on Feb 20, 2008 3:56 PM
I know what you're saying, but it doesn't apply in this case (I think.)
The critical point is that we can tie the batch job to one ECC app server. In the first step of this job (the one that executes RIMODACT to do the CIF), we build the itab as an attribute of the "root" shared memory object class.
In the second step of the batch job, we attach to the root class we built in the first step, extract some data from it, and pass these data to a BAPI that we call on the APO server. (This is what I meant by a "true" RFC - the APO BAPI on the APO server is being called from a program on the ECC server.)
So the APO BAPI never needs access to the ECC shared memory object - it gets its data passed in from a program on the ECC server that does have access to the shared memory object.
Restated this way, is the solution correct ???
Similar Messages
-
Short Dump TSV_TNEW_PAGE_ALLOC_FAILED while using shared memory objects
Hi Gurus,
We are using shared memory objects to stor some data which we will be reading later. I have implemented the interfce IF_SHM_BUILD_INSTANCE in root class and using its method BUILD for automatic area structuring.
Today our developments moved from dev system to quality system, and while writing the data into the shared memory using the methods ATTACH_FOR_WRITE and DETACH_COMMIT in one report. We started getting the run time error TSV_TNEW_PAGE_ALLOC_FAILED.This is raised when the method DETACH_COMMIT is called to commit the changes in the shared memory.
Everyhting works fine before DETACH_COMMIT. I know that it is happening since the program ran out of extended memory, but I am not sure why it is happening at DETACH_COMMIT call. If excessive memory is being used in the program, this run time error should have been raised while calling the ATTACH_FOR_WRITE method or while filling the root class attributes. I am not sure why it is happening at DETACH_COMMIT method.
Many Thanks in advance.
Thanks,
RaveeshHi raveesh,
as Naimesh suggested: Probably system parameter for shared memory area is too small. Compare the system parameters in devel and QA, check what other shared memory areas are used.
Regarding your question, why it does not fail at ATTACH_FOR_WRITE but then on DETACH_COMMIT:
Probably ATTACH_FOR_WRITE will set an exclusive write lock on the shared memory data, then write to some kind of 'rollback' memory and DETACH_COMMIT will really put the data into shared memory area and release the lock. The 'rollback' memory is in the LUW's work memory which is much bigger as the usual shared memory size.
This is my assumption - don't know who can verify or reject it.
Regards,
Clemens -
Enhanced protected mode and global named shared memory object
Good morning.
I've written a bho that do data exchange with a system service. The service creates named shared memory objects in the Global namespace. Outside appcontainer IE 11 sandboxed everything works fine lowering objects integrity level. Inside the sandboxed environment
OpenFileMappingW seems to return a valid handle but the calls to MapViewOfFile always gives access denied. What i'm missing? Thank you.
Service code for security descriptor creation:
if (InitializeSecurityDescriptor(pSA->lpSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION))
if (ConvertStringSecurityDescriptorToSecurityDescriptorW(L"D:P(A;;GA;;;WD)(A;;GA;;;AC)", SDDL_REVISION_1, &pSecDesc, NULL) == TRUE)//
BOOL fAclPresent = FALSE;
BOOL fAclDefaulted = FALSE;
if (GetSecurityDescriptorDacl(pSecDesc, &fAclPresent, &pDacl, &fAclDefaulted) == TRUE)
bRetval = SetSecurityDescriptorDacl(pSA->lpSecurityDescriptor, TRUE, pDacl, FALSE);
if (bRetVal ==TRUE && ConvertStringSecurityDescriptorToSecurityDescriptorW(L"S:(ML;;NW;;;LW)", SDDL_REVISION_1, &pSecDesc, NULL) == TRUE)
BOOL fAclPresent = FALSE;
BOOL fAclDefaulted = FALSE;
if (GetSecurityDescriptorSacl(pSecDesc, &fAclPresent, &pSacl, &fAclDefaulted) == TRUE)
bRetval = SetSecurityDescriptorSacl(pSA->lpSecurityDescriptor, TRUE, pSacl, FALSE);
OutputDebugStringW(L"SACL ok.");
return bRetval;
BHO code
LPMEMORYBUFFER OpenDataChannel(HANDLE *hQueue)
LPMEMORYBUFFER lp = NULL;
WCHAR data[512] = { 0 };
for (int a = 0;; a++)
if(iestatus==FALSE)StringCchPrintfW(data, 512,L"Global\\UrlfilterServiceIE.%d", a);//NOT in EPM
else StringCchPrintfW(data, 512, L"%s\\Global\\UrlfilterServiceIE.%d",appcontainernamedobjectpath, a);//in EPM
*hQueue = OpenFileMappingW(FILE_MAP_ALL_ACCESS, TRUE, data);//FILE_MAP_ALL_ACCESS
if (*hQueue != NULL)
//file mappato esistente
lp = (LPMEMORYBUFFER)MapViewOfFile(*hQueue, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(MEMORYBUFFER));//FILE_MAP_ALL_ACCESS
if (lp != NULL)Ciao Ritchie, thanks for coming here. ;-)
I call (only) OpenFileMapping and MapViewOfFile inside my code and i get access denied at the first try. As i stated before this happens when IE11 is working inside EPM 32/64bit mode, outside EPM it works as it should. However i decided to take a different
approach to do IPC, because, you want it or not, the service is up and running as SYSTEM... Still i'm really interested about two points:
1) can i use global kernel objects in EPM mode?
2) if one is "yes, you can": what's wrong with my code? The security descriptor? Something else?
Thanks all. -
Hi.
I am creating a new Area in SHMA. when i click on create its is not showing me an option for Binding to be specified.
Please help as this is very urgent.
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 5:36 PMAlso - my test system (which is failing for me) has a few application servers - do shared objects in shared memory work in instances where a few application servers exist?
-
Analysis Using a Network Memory Object
When loading Spatial Network into memory where is the actual memory occupied? On client or server side?
PS, example for loading network into memory:
PL/SQL:
sdo_net_mem.network_manager.read_network(net_mem=>'XXX', allow_updates=>'TRUE');
Java:
NetworkMetadata metadata = LODNetworkManager.getNetworkMetadata(sql.getConnection(), 'XXX', 'XXX');
NetworkIO networkIO = LODNetworkManager.getNetworkIO(sql.getConnection(), 'XXX', 'XXX', metadata);I found this thread and I thought I may add my experiments :
I've been playing with networks in 10g and ended up with these points :
I programmed some PL-SQL functions based on the SDO_NET_MEM api (I mostly use shortest_path and TSP functions). Everything was fine until I decided to "industrialize" the process :
I was originally working on small networks (around 30000 edges) and got pretty good results.Then, I started loading bigger networks (500 000 edges). At this point, memory was still OK but I encountered some really weird performance drops : Using the oracle network editor which is external to the database, shortest paths computations were fast, but inside my pl-sql code, these functions were taking much more time to complete.
I found out that the javavm inside Oracle was not optimized for calculation compared to the Sun runtime and that could explain my performance problems.
The following thread gives more details about this :
Spatial : big performance differences between server and client java calls
Anyway, I decided to test my procedure with really big networks (9 million edges, 7 million nodes). I never could load the network -> I got the outofmemory error.
My server is running under dedicated mode and I have 4gb of ram.
I tried several configurations :
I first set JAVA_POOL to 1.8 GB inside the SGA, in vain.
Then, I started to understand it had something to do with PGA so I reduced SGA and increased PGA up to 2BG. It failed.
I'm now completely stucked :
- JVM does not give as good results as on the client side :(
- Big networks don't load inside database memory.
My questions are (hopefully one could answer) :
Are there any means to estimate the size of a "loaded in memory" network, given the number of edges and nodes and then configure oracle memory areas ?
Why is the oracle javavm so bad, can we tune it ?
Should I definitively envisage to re-develop my program as a java client and simply use Oracle to store my data ?
Thank you.
Benjamin. -
Question about using a shared file
Please feel free to jerk my chain to the right fire hydrant, if I'm in the wrong spot for this question?
Supposing I want to "share" an excel file located on my server with a work group, and I want to "Admin" cells (add a number, in order to perform a calculation within the spreadsheet) from a remote location via a hand held device with an internet connection, such as a routine inventory of stock. Is this feasable? Could I do this with an iPhone, or some other hand held device?Possible? maybe, but it's a lot of work.
For one, the iPhone can open Excel documents, but it can't edit them. Some Windows Mobile-based devices may be able to but IMHO this is the wrong approach.
Excel is great for single-user applications. It falls down when you want multiple people to maintain the data. For example - what happens when someone in the office is using the file and your mobile device (whatever that may be) opens the file to make changes? If it even lets you you're almost certainly going to corrupt the file since the office user won't notice the changes you make remotely.
So for any kind of dynamic data a database-based approach would be better. Some databases include web-based front-ends (so anyone with a web browser can view/edit the data), others have support from multiple script languages such as Perl, PHP, Java, etc. that let you develop your own web front-end.
For the users that are familiar with Excel, even Excel can pull data from a database to populate the worksheet. -
Question about using threads and synchronizing objects
Hi all,
I am not that familiar and I have 2 questions.
QUESTION 1
I have a server which just sits and accepts incomming connections, then I spawn off a new thread which implements Runnable, and then call the run method. But the loop would not iterate, it would just sit inside the run method (which has rather long loop in it). I changed the class to extend Thread and called the start() method, rather than run(), and everything worked out fine.
Anyone know why this is?
QUESTION 2
So I am building a client server chat application where a user can be in multiple chat rooms. I have this personObject which has output/input streams. In the personObject, I create writeObject/ readObject method, which simply does as it implies.
I figured that I should make these methods synchronized, to ensure things run smoothly. however, when I made a call to readObject, which sat there and waited, and then made a call to writeObject, I would not enter the writeObject method. I took out the synchronized on the writeObject, and everything worked out fine.
I was under the assumption that synchronizing a method only synchronized on that method, not on the whole class. How come then was I not able to enter the writeObject method?
The more I think about it, I don't think I need to have these methods synchronized, but I thought it wouldn't hurt.
Thanks for the help.Hi all,
I am not that familiar and I have 2 questions.
QUESTION 1
I have a server which just sits and accepts incomming
connections, then I spawn off a new thread which
implements Runnable, and then call the run method.
But the loop would not iterate, it would just sit
inside the run method (which has rather long loop in
it). I changed the class to extend Thread and called
the start() method, rather than run(), and everything
worked out fine.
Anyone know why this is?
You should still implement Runnable, rather than extending Thread. Like this: Runnable r = new MyRunnable();
Thread t = new Thread(r);
t.start(); run() is just another method. Nothing special about it as far as multithreading or anything else goes.
start() is the method that actually spawns a new thread of execution.
I was under the assumption that synchronizing a
method only synchronized on that method, not on the
whole class. How come then was I not able to enter
the writeObject method?When you synchronize, you obtain a lock. As long as you hold that lock--until you exit the sync block or call wait()--no other thread can enter that block or any other block that obtains the same lock.
Two synchronized methods on the same object rely on obtaining the same lock--there's one lock for each object. -
Shared memory used in Web Dynpro ABAP
Hi Gurus,
I am using shared memory objects in Web Dynpro ABAP. Everything was working fine until we went live to production. After some research I realized that users are not always able to reach data in shared memory because of different approach of web environment and classic GUI when using more servers. Solution would be to go to database instead of shared memory. However I am still interested if there might be some other way to solve it. Any ideas?Marek Veverka wrote:
Hi Gurus,
>
> I am using shared memory objects in Web Dynpro ABAP. Everything was working fine until we went live to production. After some research I realized that users are not always able to reach data in shared memory because of different approach of web environment and classic GUI when using more servers. Solution would be to go to database instead of shared memory. However I am still interested if there might be some other way to solve it. Any ideas?
To my understanding writing to the database is the safe option. There are no other ways to solve your problem with Shared memory. -
Cannot attach data store shared-memory segment using JDBC (TT0837)
I'm currently evaluating TimesTen during which I've encountered some problems.
All of the sudden my small Java app fails to connect to the TT data source.
Though I can still connect to the data source using ttisql.
Everything worked without problems until I started poking around in the ODBC administrator (Windows 2K).
I wanted to increase permanent data size so I changed some of the parameters.
After that my Java app fails to connect with the following message:
DriverManager.getConnection("jdbc:timesten:direct:dsn=rundata_tt60;OverWrite=0;threadsafe=1;durablecommits=0")
trying driver[className=com.timesten.jdbc.TimesTenDriver,com.timesten.jdbc.TimesTenDriver@addbf1]
SQLException: SQLState(08001) vendor code(837)
java.sql.SQLException: [TimesTen][TimesTen 6.0.4 ODBC Driver][TimesTen]TT0837: Cannot attach data store shared-memory segment, error 8 -- file "db.c", lineno 8846, procedure "sbDbConnect()"
The TT manual hasn't really provided any good explanation what the error code means.
Obviusly I'v already tried restoring the original ODBC parameters without any luck.
Ideas..anyone?
/PeterPeter,
Not sure if you have resolved this issue or not. In any case, here are some information to look into.
- On Windows 32-bit, the allocation of shared data segment doesn't work the same way like on Unix and Linux. As a result, the maximum TimesTen database size one can allocate is much smaller on the Windows platform than on other platforms.
- Windows error 8 means ERROR_NOT_ENOUGH_MEMORY: not enough storage is available to process this command.
- TimesTen TT0837 says the system was unable to attach a shared memory segment during a data store creation or data store connection operation.
- What was the largest successful perm-size and temp-size you used when allocating the TimesTen database?
* One explanation for why you were able to connect using ttIsql is that it doesn't use much of the DLLs, whereas your Java application typically has a lot more DLLs.
* As a troubleshooting step, you can try reduce your Temp-size to a very small size and just see if you can connect to the data store. Eventually, you may need to reduce your perm-size to get Windows to fit the shared data segment in the process space.
By the way the TimesTen documentation has been modified to document this error as follows:
Unable to attach to a shared memory segment during a data store creation or data store connection operation.
You will receive this error if a process cannot attach to the shared memory segment for the data store.
On UNIX or Linux systems, the shmat call can fail due to one of:
- The application does not have access to the shared memory segment. In this case the system error code is EACCESS.
- The system cannot allocate memory to keep track of the allocation, or there is not enough data space to fit the segment. In this case the system error code is ENOMEM.
- The attach exceeds the system limit on the number of shared memory segments for the process. In this case the system error code is EMFILE.
It is possible that some UNIX or Linux systems will have additional possible causes for the error. The shmat man page lists the possibilities.
On Windows systems, the error could occur because of one of these reasons:
- Access denied
- The system has no handles available.
- The segment cannot be fit into the data section
Hope this helps.
-scheung -
Use Shared Local Object with Javascript
Hi to everybody!
I have to make a javascript component that have to take some
data from a Shared Local Object;What I have to do in order to use
the Shared Local Object in javascript? It maybe that I have to
create an ActionScript file in which I use the Shared Local Object
and than import that file in Js?
Furthermore, do you know if it possible to lanch a waba
application (is a java application for pocket pc and pda ) from a
flash application?
And if yes, What I hava to do?
ThanksHave you downloaded and read the Acrobat SDK yet? That's your starting point.
-
Shared Memory Short Dump: SHMM ab_ShmResetLocks - anyone?
hello:)
I have a problem with shared memory area (SHMM) that dumps.
I have a tool that uses a shared memory area instance to store data.
When I run the tool and update the data stored in the instance, a short dump is thrown:
SYSTEM_SHM_AREA_OBSOLETE with the explanation:
An attempt was made to access a shared memory area that has already been
released. Possible reasons for release:
- explicit release from an ABAP program or from the shared objects
management transaction
- implicit release during resource shortages
The first one does not match, as I DO NOT explicitly release the instance of my area.
Moreover, ST22 shows me different parts of code every time, so my code is not the cause, or a specific part of code, or data that I shift.
The second one would probably be the cause.
But how can I avoid it?
Moreover, there in SM21(System Log) there is at this time, there is a runtime error, that says
ab_ShmResetLocks and nothing more:(
Shared Memory size is sufficient.
The Shared Memory Area Settings (SHMA) do not time out the read/write access(Lifetime: no entry and Automatic area structuring is set)
Any help is more than welcome, why i get the short dump!!
best regards
simon:)Please check the following SAP notes:
[SAP Note 1105266 WDA: Runtime error SYSTEM_SHM_AREA_OBSOLETE|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_wd/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31313035323636%7d]
Also check the below notes for related details.
Note 1322182 - Memory consumption of ABAP Shared Objects
[SAP Note 764187 SYSTEM_SHM_AREA_DETACHED runtime error|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_aba/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d373634313837%7d]
Please check the size of the shared memory object in the profile parameter abap/shared_objects_size_MB.
Regards,
Dipanjan -
Hi every one,
i have problem installing oracle 8i database in my branded system hp-PIV system. while it gives the following error during initilizing database
ORA 04031: unable to allocate 'size in number' of shared memory ("shared pool" ,"unknown object ", "sga heap"," db_block_buffer")
while it installs fine in all hp-PIII machines but gives above error in all hp-PIV branded machines.
oracle 9i installs accurately in all machines. what is the actual problem?
Regards & Thanks
Najeeb04031, 00000, "unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\",\"%s\")"
// *Cause: More shared memory is needed than was allocated in the shared
// pool.
// *Action: If the shared pool is out of memory, either use the
// dbms_shared_pool package to pin large packages,
// reduce your use of shared memory, or increase the amount of
// available shared memory by increasing the value of the
// INIT.ORA parameters "shared_pool_reserved_size" and
// "shared_pool_size".
// If the large pool is out of memory, increase the INIT.ORA
// parameter "large_pool_size". -
Dear developers,
I have some documentation on ABAP SHARED OBJECTS and I wonder how I could define shared memory objects at run time ( so I would need something like an API ) instead of using the SHMA transaction.
I actually also wonder what would happen if 2 users of the same shared object would call on one of its methods ? Can we have concurrent access ? How does the whole locking thing works ? Is it possible to implement waiting calls/locks ?
If you have any serious/technical documentation on semaphores/locks in SAP/ABAP I'd also be very interested.
Sincerely,
Olivier MATTHi matt,
This is vijay here.
if you r working on frequntly changed data then you must use this locking technique.
well jus go to se11 and make a lock object by starting initial......EZ....
EX: EZENMARA.
then u can fix the lock as shared or (exclusive,cumulative) or( exclusive, not cumulative)
you can also fix the lock parameters like specific fields.then jus save and activate.
and when you will make a program jus call the function module enqueue_ezenmara for locking and dequeue_ezenmara for unlocking and u can get rest in my program.
regards
vijay
rewards if answer is helpfull.
TABLES: MARA.
PARAMETER: MATNR LIKE MARA-MATNR.
CALL FUNCTION 'ENQUEUE_EZENMARA'
EXPORTING
MODE_MARA = 'S'
MANDT = SY-MANDT
MATNR =
X_MATNR = 'MATNR'
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
IF SY-SUBRC = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
WRITE: 'TABLE IS LOCKED'.
ELSE.
SELECT * FROM MARA WHERE MATNR = MATNR.
WRITE:/ MARA-MATNR,MARA-ERNAM,MARA-MTART.
ENDSELECT.
ENDIF. -
Shared memory settings from 32 to 64 bit Oracle
Hello,
Questions about Oracle and Shared Memory from 32bit to 64bit Oracle
I have a Sun Sparc V880 server running Solaris 9 with 8xCPUs and 16gb of Ram. It is currently running 6 Oracle (32 bit) 9.2 databases which we are planning to upgrade to 10.2. My question regards the setting of the Solaris 9 kernel parameters speciifically 'shminfo_shmmax'. This is currently set to - 'shmsys:shminfo_shmmax=4294967295'which I believe is the maximum amount of shared memory which can be allocated to a 32bit version of Oracle and the one recommended by Oracle.
Running 'show sga' on all of the current 9.2 databases returns
Total System Global Area
DB SGA(bytes)
db1 772528008
db2 789305244
db3 772528008
db4 114021228
db5 791238556
db6 789305244
Total = 4045703524 bytes or 3.76786 gb.
1. Does this mean that each Oracle 32bit database can only use up to a maximum of about 4gb of shared memory or that all 6 together can only use up to 4gb ? resulting in 12gb being available for other (non Oracle) processes.
2. I have noticed (through 'sar' stats) that the server occasionally pages (non zero values for pgscan/s and pgfree/s etc.). Since the server mostly only runs the Oracle databases, is this because Oracle can only use circa 4gb of Ram before it starts paging ?
3. If both 9.2 and 10.2 Oracle databases are run on the server would increasing the value of shminfo_shmmax then allow the 10.2 databases to use more of the 16gb of Ram, while still limiting the 32bit databases to the 4gb limit ?
Any help here would be appreciatedPl see if MOS Doc 467960.1 (How Important It Is To Set shmsys:shminfo_shmmax Above 4 GB) and the notes it references can help
HTH
Srini -
I am running BerkeleyDB on FreeBSD 6.2 ... our application has two sets of processes that share a common set of databases. Each set of processes runs as a different user. I would like to use the shared memory environment option ( DB_SYSTEM_MEM ).
If a process under user A creates a DB which is then later recovered by a process owned by user B ... it will fail. This is because FreeBSD only allows the owner or creator ( they can be different ) to delete a shared memory region which occurs during recovery.
If BerkeleyDB had a means to set the owner / creator as different users that would help.
Any other suggestions ?Hi,
The easiest solution would probably for your application (in process under user A) were to change the access permissions of the region after it is opened.
- Alex
Maybe you are looking for
-
HT4436 How to set up iPhone with apple id and a different iCloud account
Hi I am trying to set up my husbands iPhone so that we can both use my iTunes but he has a different I cloud as we don't want each others contacts etc How I'd I do this.
-
Why can't I edit reminders in iCal?
If I create a reminder on my iPhone, I cannot edit it in iCal. It shows up just fine, but it is read only....
-
Does SOAP in synchronous mode retry?
Hi, I have a scenario in which i want to post a message through my SOAP receiver adapter and receive the response. But i want to know how many times the soap adapter will retry if the it fails ? How is the retry interval and time out work for adapter
-
BEx Analyzer through SAP Netweaver ABAP trial version
Hi, I have installed SAP Netweaver ABAP trial version but dont know how to get BEx analyzer. Can someone help to find out that. Thanks,
-
Panel menus aren't working correctly on dual monitors
Hi, I posted a question yesterday about this, but no one replied. Maybe my subject didn't describe the problem so I am trying again. I use DW on a dual monitor Windows XP system. The program is on the main monitor and I move some of the panels/pale