• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Register user

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I have done just that by calling:




[originally posted on jforum.net by coolste]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I've been trying to integrate the forum into my portal solution as much as I can. Both run as servlets in the same context on a tomcat 5.5 application server.

I'm using SSO and turned off registration for the forum and want it to be handled by the portal as well. When I'm logged in into the portal and access the forum the SSO class authenticates the user correctly and enters the user into the DB if he's not there yet. Since the entry is done using dummy values for email and password I don't want that to happen. I want my user registered in both databases using the same values.
So what I do is, I get an instance of the DataAccessDriver from the forum in my registration class (I made sure both Servlets are initialized) and enter the user there as well. I now this is not a very clean solution, but I don't want to put too much effort into the integration

I use basically the same lines of code that are used by the auto-registration. This is the code in the class responsible for the registration in the portal:



Everything works fine and I run into no exceptions. But if I look into the DB there is no record of the added user in jforum_users. The userIds however are incremented in every registration process. There is just no user there! I'm a bit lost right now, because I can't see any error, just that the entries are not there.
[originally posted on jforum.net by coolste]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello coolste;

With the code given below, you are just creating an instance of user, but not sending it to the server.

After doing that;

UserDAO jUser = DataAccessDriver.getInstance().newUserDAO();
jUser.addNew(forumUser);

That should work. (I suppose)

Cheers.
[originally posted on jforum.net by bobylus]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic