At JForum.java, method
service(), remove the call to
checkCookies(). Now you'll need to configure some cookies and session manually. Follow these steps:
:arrow: Create an instance of UserSession. It will be necessary to properly configure the session.
:arrow: Set the session id and user id, as well the username.
Now, if you want to have the functionality of displaying the new messages to the user ( the new ones since his last visit ),
you should retrieve some information from the database. This is done in the method
checkCookies(), and you could use a simmilar approach. In that method, look for the part
it is located at line ~389.
Note that the next lines make a call to
this is where I get the information about the user's session when it enters in the forum for the first time.
The "last" step is where you set the UserSession object you have to an entyr at SessionFacade, calling
A last point: in order to use jforum's DataAccessDriver, you need to have the ThreadLocal stuff configured. As currently there is no public method to do that, put the following code at JForum.java:
Please note that doing that, you are responsible for release the connection from the connection pool.
Also remember that you only need to call
configureThreadLocal if you don't make any request to jforum's
servlet. In other words, just call this method ( and the other stuff ) and you are your own login / auth system.
Rafael
[originally posted on jforum.net by Rafael Steil]