This may or may not be your problem, but here goes.

There are restrictions imposed on what can be passed.  These are based on the
fact that, even though Tomcat and jBoss may be running in the same VM, a call
from Tomcat to jBoss is still considerd a remote method call (this, I believe,
has to do with the fact that Tomcat and jBoss are using different
ClassLoaders).  So, your call to the session bean method is still a remote
method call.

Here are the rules for parameter passing in remote method calls as I understand
them:

Any object that implements the java.io.Serializable interface will be passed by
value.  That is, the entire object is serialized and passed to the remote
method.

Any object that implements the java.rmi.Remote interface will be passed by
reference (if the transport mechanism is RMI that is).  This means that
essentially only a proxy back to the original object ends up in the remote
method call, with the original object remaining in the VM from which the remote
method is called.

I've checked and HttpServletRequest does not implement either.  Also, the 
implementation of
HttpServletRequest (called HttpServletRequestFacade) in Tomcat does not
implement either one of these interfaces. Because it does not implement either
one it cannot be passed in either direction in a remote method call.  I am
assuming that your "complex" object does implement (probably) the Serializable
interface.

Having said this, I would think you would get some kind of exception being
thrown, not just a null value for the HttpServletRequest.  What you may have
to do, though, is to wrap up the information you want to send to the session
bean in a class of your own that does implement the Serializable interface. 
Also, every object that is reachable from a Serializable class must also
implement the Serializable interface.

-vince

 On Wed, 20 Sep 2000, you wrote:
> Additional informations:
> it seems only to be a HttpServletRequests problem, a Hashtable works
> both directions. ??!?
> 
> > Hi there,
> > 
> > In my application, I want to forward all HttpServletRequests from the
> > jsp over a wrapperbean to a SessionBean to process the data there.
> > jsp to bean works fine, but if I get the home interface of my
> > SessionBean and call a method with the HttpServletRequests as
> > parameter, nothing appears in the SessionBean but I don't see any
> > exception, only a 'null' for the HttpServletRequests in the SessionBean.
> > If I do the same with a String, it works fine.  
> > The other way round it works returning a complex JavaObject from a
> > SessionBean method.
> > Are there any restrictions for the parameters I can pass to an EJB ?
> > 
> > hopefull waiting for good advice
> > 
> > best regards
> > tom
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
-- 
_______________________
Vincent Sheffer
Director of Operations
Telkel, Inc.
_______________________


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to