cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with cache refresh entity bean / server node

torsten_blank2
Participant
0 Kudos

Hello,

ive got a big problem and not found answer in sdn until now.

Ive got a job that gets data from maxdb by sapjob - jco - session bean - entity bean - database.

this job works daily. the data to work with is written directly to database from external.

on first execute it works, but second etc not. i search for answer and i guess something:

entity bean is cached (increase percormance?) with results of the select and do not know about new database entries when they are written directly to database. so second select says: there is no new data (but they are there).

i only get this new data when i restart netweaver server node, then it works, but only for one time. then result is in cache and then i have to do same procedure before it goes (restart server).

how can i get this data? is there any setting for force node to refresh cache? or any other settings to affect something like this?

we have to go live with this in august.

thx for help.

Version: NW04, SP21

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

What's interesting is that the first execution works and second doesn't. If the EB is cached, then the first execution shouldn't result in any data either, since both first and second load are direct DB inserts.

I think that there's some flag in there that marks an item as "changed". The logic could be:

during first load, flag is "unchanged".

1. Load happens.

2. Refresh logic kicks in, checks the flag.

- If flag is "unchanged", then refresh the cache.

- else don't do anything.

3. Flag is marked as "changed".

during second load, flag is "changed".

1. Load happens.

2. Refresh logic kicks in, checks the flag.

- If flag is "unchanged", then refresh the cache.

- else don't do anything.

This way, second load results in no refresh of the cache. I am not sure but if your golive is coming up soon, you may want to open a SAP OSS and check to see if this is a bug...

torsten_blank2
Participant
0 Kudos

thanks at first.

OSS was the next step i consider, enforcedly.

I hoped that there was a kind of timeout in visual admin or somewhere else where (for example) i can set a special time (seconds?) for refreshig the cache. Or i can set a flag for "do not cache entity beans".

Someone else any idea?

Nowadays on test system whe have made a task that starts windows every night so that netweaver also is "fresh". a kind of resolution but not the best and no resolution for the productiv system. or whe have to write a kind of batch job that only restarts server node once a day.

New Info:

I think cache was filled directly after restart.

when we restart, then data are written, and then our application wanted to read them, they are also not seen.

The data are only seen by bean when the restart takes place AFTER the data are written into db.

So we change restart time to point after data are written. so we will test if this works, on monday we will see.

Edited by: Torsten on Jul 11, 2008 11:27 AM

torsten_blank2
Participant
0 Kudos

So i get answer from sap:

functionality of writing into database directly with sql and with bean layer is not the rigth handling. Only one way. so no support for this. great!

i think starting only netweaver server instead of whole widows is much easier and faster.

so can anybody tell me which steps are done when i go into mmc to my server, open right mouse menu (?) and click on "Restart"?

i think writing these steps into a batch can help me to reduce and optimize downtime to 1 minute and 33 secons (testsystem, productiv system is faster).

also i try to write sql access for reading database tables instead of entity beans, they can "see" these external make entries.