Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Domino and Websphere  RSS feed

 
kapil munjal
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Clapham
Sheriff
Posts: 22487
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
kapil munjal
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!