I want to use JForums to discuss items of an application that I am making. So when an item in the application is created, a topic in Jforums should be created as well.
First I tried it by manually creating the tables and disabling the topic cache in JForum. That did not work since Toplink essentials can't manage the structure JForum uses (yes, sounds weird, but somehow it fails on the connection of topic to the posts as soon as I add the OneToOne topic_last_post_id apart from the OneToMany that is needed for more obvious reasons)
I then thought of making net.jforum.view.forum.PostAction an EJB3 bean, adding a method to create a topic and a Remote interface to call it. But then I noticed that I'd have to turn the web-application into an ejb3-module, at least I think that this must be the reason why the jndi lookup failed and I also did not see anything in my JNDI tree on the server.
So now I'd like to ask what you would consider the easiest way to create (and later also automatically delete) a topic in jforums through an external application. Any ideas?
best regards,
David [originally posted on jforum.net by Hellek]
Probably the easiest way to do this with the current version is to use something like the Apache Commons HTTPClient to post your topic. I believe there are plans for an API to allow stuff like this in the works... don't know if it's part of 2.1.8 which is in alpha( or is it beta?) right now.
Well, technically, since jForum URLs pretty much conform to the REST principles, using HTTP and JForum can also be consider using it as a SoA webservice.
So, it's ugly is just in how you market it... you could say it was state of the art REST-ful programming. Especially, if you use a templates that just returns XML. [originally posted on jforum.net by monroe]
you convinced me. And it works perfectly btw, thanks for the advice.
The webservice-solution was just too unstable since my adaptions to get rid of the need of request/context stuff were rather quick'n'dirty. [originally posted on jforum.net by Hellek]
Hi Hellek, i would to know how you make your solution with web services. I want do similar solution to create a new topic and list topics in my application.
Thanks. [originally posted on jforum.net by feusebio]
monroe wrote: I believe there are plans for an API to allow stuff like this in the works... don't know if it's part of 2.1.8 which is in alpha( or is it beta?) right now.
is there anything new in the version 2.1.8 concerning that matter?
Thank you [originally posted on jforum.net by August]
well, after fooling around a little bit and looking the forum code I found a way to create new topics from another application. Not sure if this is a right and clean way. If somebody will find something better - all suggestions will be thankfully accepted Here it is:
It's just a dummy servlet that creates a new topic in the forum, created partly by "copy & paste" from other programs. I call it from another servlet that actually contains just a small form with a text field for the subject and a submit button. [originally posted on jforum.net by August]