Someone can tell me how to upload a file and store it in the database with Nukes?
It's very important for me !!
Thanks a lot !
The directory nukes, from the CVS, contains sub directories, some of them are nukes modules ( sections and jounal ), the directory called nukes is the core of module of nukes application. The directory called build, is the directory where u can build the core and the modules, just type build.sh ( or build.bat ) and the build system will build the entire thing.
In order to deploy nukes, type build.sh deploy with a $JBOSS_HOME env variable set to your jboss directory path, normally this will deploy nukes, you can access to nukes with this url http://localhost:8080/nukes/index.html
support for postgres comes first with
the development of a Postgres specific
entity command are used by cmp2.0 fwk to
retrieve the PK from DB after it's been inserted.
if you know how to retrieve the key generated
by Postgres with generated PK it's easy to
Usually there are two ways to do that :
1st downcasting the jdbc statement/driver to the specific and there is a method to get the pk (mysql case)
2nd executing a sepcific DB command that fetch the last inserted PK (HSQLDB case)
if you are inserted, please continue this here.
Unfortunately, there doesn't seem to be any way of doing this in
Postgres at the moment.
The getGeneratedKeys method isn't implemented in the JDBC drivers.
Are there any other posibilities? e.g. generating the keys in JBoss?
yes JBoss has several generators but it won't fit in nukes because of pk format. these usually creates UUID pks that are very long strings.
nukes use an Integer PK.
are you sure there is no way to get the PK via SQL ?
for instance in HsqlDB you execute special SQL that gives you the generated PK. its
as far as I remember something like :
so if you do an insert then execute SELECT IDENTITY it give you back the generated PK.
check PostGres in that way, I am pretty sure
there is something there.
OK, I figured out a way to do it.
I've submitted a patch into sourceforge (#28346) for a class
that does the key generation thing for postgres.
Unfortunately I probably cannot spend any more time porting nukes to postgres, but if anyone else wants to try, it should be dead simple now with my new class.
Oops, that should have read patch #728346
great, one more.
I don't have much time these days, if someone takes it cool, otherwise it will be postponed.
Postgres entity command is in 3.2.1, the only thing missing are the ddl files compatible for postgres.
And the testing of course.
it's ok there, I'll look at it later since I have not a lot of time now.
Just wanted to post to this thread that I'm working on Postgres as well. I've got the entity command merging into the deployment and have all of the DDL files working with Postgres, but I haven't tested everything yet, and I plan to go back and add referential integrity to the tables. So far, nukes, adminmessage, and faq are working.
Just FYI, postgres does support sequences, so that a uique id can be generated via a special sql call to a function, i believe its called nextval(sequence_name). This can even be auto-inserted into a field on the table upon insert, but if the jdbc driver doesnt support the getauto(whatever) function then this will not help.
Ive used postgres for 4 years now and would be glad to help where needed, Im new to this project so would rather work under anothers direction for now, let me know where any of you require assistance.
I just joind the forum and must add that I am THRILLED that someone has finally build a good open java cms... how long Ive looked for one, tried building one, and wished something like this would get off the ground!
I've got nukes working with postgres. If anyone is interrested, I can dump the database description and post it here.
we have the statements for all modules except the forum, do you have that ?
otherwise, how your statements compare to the ones in nukes sources ?