Hi Guillaume,

The only way to achieve that is to use a JNDI resource that you declare at Tomcat's level. You can then in the jahia.properties file lookup the resource by specifying the datasource name. You can do the same from your application.

But if you try to access Jahia tables and modify them, this will not work, because Jahia has in-memory caches of the database tables (for performance reasons), and then you would have inconsistent states between memory and DB, which could lead to content corruption. Of course you could also deactivate caching, but performance will suffer a lot.

Regards,
 Serge Huber.

Guillaume Kuhmel wrote:

Hi Serge,

Another question regarding the database access: is it possible/recommended for webApp to access the Jahia connection pool?
Or do you advise to use, for instance the tomcat connection pooling via JNDI?


In my situation i want to create 3 webapps that use the that database that Jahia (but otjher tables)

Thanks



Serge Huber wrote:


Hi Eric,

Jahia uses a lot of cache systems to reduce load on the database, so accessing directly the database functions will not work as the caches will not be updated. Also, the subject of content creation has been covered multiple times in this mailing list, try doing a search for saveContainer in this mailing list.

Regards,
 Serge Huber.

eric petit wrote:

Hello everybody,

I have a question about the way to insert new ContainerList , new Container and Fields inside the Jahia DB.
My problem is that I use some servlet to do some calcul and I need to insert the result of this calcul inside Jahia fields,container and ContainerList.


I managed to find the right method to do it but I'm a little bit lost with the jahia API I can use to do it.
I try to use those API : ServicesRegistry.getInstance().getJahiaFieldService().createJahiaField(...)


db_create_container(...)
db_create_container_list(...)

But I does not work very well.
I just want to know if someone (maybe Serge Huber)could give me the right way to create and to insert fields , containers and containerlist into the Jahia DB without using Admin interface.


Thanks a lot.

Eric.






-- ------------------------------------------------------------------------

*Guillaume Kuhmel*
*Ing�nieur Concepteur D�veloppeur*
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>*
*T�l. : +33 (0)6.88.33.36.16*



*http://www.sqli.com* <http://www.sqli.fr>
*Groupe SQLI**
**75 rue Marcelin Berthelot
13848 Aix en Provence Cedex 3*




Reply via email to