Solved

Tuxedo client memory allocation

Posted on 2006-06-29
3
302 Views
Last Modified: 2013-12-10
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
Comment
Question by:pbsmbc
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
yuseungkim earned 500 total points
ID: 17011235
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
 

Author Comment

by:pbsmbc
ID: 17011441
Thanks Andy.
We are using FML32 buffer and we not using same buffer for sending and receiving the request.


0
 
LVL 3

Expert Comment

by:yuseungkim
ID: 17012461
Did you try to resize it based on olen using tprealloc ?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now