Forums Register Login

Domino and Websphere

+Pie Number of slices to send: Send
Hi,

I am connecting to Domino through a jsp deployed on websphere. And I have done all the required settings of DIIOP server on Domino and the required code is there in java class.

Now, whenever I execute the plain java class through main method, it works perfectly fine but if I try to call it through a jsp then it doesn't create a session with the DOMINO server.

I get the error

ID = 4062 and Text = Could not open Notes Session.

What I need to know is that why I am able to create the session from a simple java application but when I try to call the same code from a jsp then it doesn't work.



I always receive the error mentioned earlier on the line

Session s = getSession(host, user, userPassword);

here host, user and userPassword are strings refering to the accurate values which work with simple java application.

Please help.

Kapil

[ UD: removed a few "*" from the code to keep it legible ]
[ January 12, 2006: Message edited by: Ulf Dittmer ]
+Pie Number of slices to send: Send
Seeing "public void run()" - is this supposed to be a thread that runs on its own? Because that is not going to work in a JSP page.
+Pie Number of slices to send: Send
If you're connecting to a mail server in a JEE web application, you're supposed to configure a "mail provider" as a resource in the application server, then get the Session via JNDI.

However that's just "supposed to" and it is possible to do it the old-fashioned way. But the application server may already have the default session open, so if your "getSession" method calls Session.getDefaultInstance, it will fail. But Session.getInstance will probably work. (Making that change worked for me.)
+Pie Number of slices to send: Send
 

Seeing "public void run()" - is this supposed to be a thread that runs on its own? Because that is not going to work in a JSP page.


Yes, this is a thread that is supposed to run on its own. To make a connection with Lotus Mail Server through JAVA API, we have to create a thread and then initialise the session.

Here, this thread code is written in different java classes and when I call the jsp page, it tries to call the run method to connect to the mail server.

============================================================

If you're connecting to a mail server in a JEE web application, you're supposed to configure a "mail provider" as a resource in the application server, then get the Session via JNDI.



Paul Clapham ,

Could you tell me how I can configure Websphere to have a mail provider resource. Till now I was trying to configure it on WSAD, but if thats not possible, i will try to do it on Websphere Server.




This is the code of the getSession method which is being called in the run method.
Please have a look at this and let me know what can I change to make it work.

Regards
Kapil
[ January 17, 2006: Message edited by: kapil munjal ]
Liar, liar, pants on fire! refreshing plug:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 997 times.
Similar Threads
Expert View Required
IBM WAS and Lotus Domino Workflow integration
UnsatisfiedLinkError
Resources for WAS
doubt in session management in jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:27:28.