Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

Tuxedo client memory allocation

Hi,

We are calling EJB from VC++ client through tuxedo call (tpcall).
Client (VC++ 6.0)/Windows Tuxedo Client ----> Tuxedo Domain/Gateway/Broker (V 8.0) ----> Weblogic domain (8.1 SP5) ----> EJB (running in different application server).

We are having the following problem:

From the VC++ client we are calling a EJB which will return a search result. We don't know the number of results (i.e. size) that will be returned to the client. The prblem is we are allocating the output buffer (tpalloc) in the client to hold the result that will be returned by the EJB before calling the service.  So we are not able to display the results if it exceeds the the size of output buffer.

Can anyone let me know what to do in this situation so that we will be able to display the whole result always.

Thanks
0
pbsmbc
Asked:
pbsmbc
  • 2
1 Solution
 
yuseungkimCommented:
What is buffer type you're using ?

did you try to check the size of olen from tpcall and compare it with initial size allocated and if olen is bigger than what initially allocated by tpalloc, try to resize it using tprealloc ?

int tpcall(char *svc, char *idata, long ilen, char **odata, long *olen, long flags)

As you know, odata is the address of a pointer to the buffer where a reply is read into, and olen points to the length of that reply. *odata must point to a buffer originally allocated by tpalloc(). If the same buffer is to be used for both sending and receiving, odata should be set to the address of idata. FML and FML32 buffers often assume a minimum size of 4096 bytes; if the reply is larger than 4096, the size of the buffer is increased to a size large enough to accommodate the data being returned.

Cheers

Andy K

0
 
pbsmbcAuthor Commented:
Thanks Andy.
We are using FML32 buffer and we not using same buffer for sending and receiving the request.


0
 
yuseungkimCommented:
Did you try to resize it based on olen using tprealloc ?
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now