Yes, the cleanup is probably the result of a GC operation.
It isn't necessarily a JBoss problem. But we need to clarify a few things - I'm assuming that you are actually talking about a web application rather than a Web service and that you are getting an BLOB from the database.
How much physical memory have you got in the server? If you are consuming disk space when you application runs, it means that the system must be commiting program and data to swap space because you don't have sufficient physical memory to house the entire image. If this is not the case, you probably need to explain this some more.
You also need to look at the way you are processing and consuming the data. My guess is that you are materialising the BLOB and then copying that from the EJB to the servlet? You can cut down consumption by using the local interface call from the embedded servlet container to the EJB. In JBoss, this allows the servlet to use the same data image as the EJB rather than operating on a copy. It also improves performance, bypassing the data copy operation.
Also look at your coding techniques and use of data structures - there are plenty of reports and tutorials on squeezing optimal memory use out of your data routines.
In the end, JBoss has probably little to do with your particular situation. However, you do need to consider a few things if you are using entity beans - such as the read-ahead settings, commit and release and so on. Aside from that, it will be up to you, based on your analysis of the implementation, to determine how to tweak your application's memory usage.
The entity bean tuning guide is:
HI, I am actually running a Webservice (however, the webservice itself is published as an ejb).
The physical memory on the server is 512M.
In your reply, were you referring to -> Running out of physical memory would actually uses the diskspace as memory replacement?
For most swapouts I would expect the SWAP to be used by OS. Since it seems you were not talking about that type of usage, there must be some other temporary files being created.
Are you able to locate and identify these files? For example in /tmp or in any of the JBoss work directories or in the JBoss bin or conf directories? Sometimes file artifacts appear here but usually disappear as a result of cleanup or when JBoss is shutdown.
If you are using third party libraries, I guess it is possible that they manifest a temporary file to do whatever processing they require, particularly if what they are doing (like manipulating large XML files) cannot be contained in physical memory.
Since the container is long running, and if the application does not explicitly remove handles to temporary files, they may not be removed until the EJB dies. Just a thought and a guess.
Try and locate these files, and also determine when they are created and by whom. It will help determine what is going on with your application. But whatever is happening is probably not being caused by JBoss.