EJB programming & troubleshooting: How to use HTTPS to post a message inside a EJB bean
I created a stateless session bean which is deployed on WebLogic 5.1. The bean will try to post a message using HTTPS, which I bought from a third party. It seems like the posting part is fine but when the bean tries to get the InputStream from the URLConnection object, it blocks until it times out.
- Posted by: Lei Gu
- Posted on: January 06 2001 23:50 EST
Anybody has any ideas? Suggestion?
BTW, the program works fine out the application server.
Thanks in advance.
- How to use HTTPS to post a message inside a EJB bean by Jan Casteels on January 17 2001 13:56 EST
The problem is that you are violation the container principle. According to the specification of Sun, there are a number of programming restrictions.
<SUN EJB 2.0 SPEC>
The enterprise bean must not attempt to set the socket factory used by ServerSocket, Socket, or
the stream handler factory used by URL.
These networking functions are reserved for the EJB Container. Allowing the enterprise bean to use
these functions could compromise security and decrease the Container’s ability to properly manage the
</SUN EJB 2.0 SPEC>
This means that you are not able to use the libraries that you have bought but that you are stuck what weblogic provides us.
Take a look at
Setting up URL connection factories