Re: persistance cache

2015-06-24 Thread Kaouthar Ghorbel
hello, I think it is a cache problem , because when I restart tomcat
the resulting list is correct, the problem lies only  for this method.
i use tomcat 8.0.2

2015-06-23 12:00 GMT+01:00 André Warnier a...@ice-sa.com:

 hello.


 Kaouthar Ghorbel wrote:

 hello,
 I have a method that returns a list of items when I change the data in
 this
 list in the database ,the return of the method does not take into account
 this change.
   here is the configuration of  persistance.xml

 ?xml version=1.0 encoding=UTF-8?
 persistence version=2.1 xmlns=http://xmlns.jcp.org/xml/ns/persistence
 
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=
 http://xmlns.jcp.org/xml/ns/persistence
 http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd;
   persistence-unit name=persistancePU
 transaction-type=RESOURCE_LOCAL
 providerorg.eclipse.persistence.jpa.PersistenceProvider/provider
 classcom.csys.pointeuse2.model.AccessControl/class
 classcom.csys.pointeuse2.model.Accompagnantgouvernante/class
 classcom.csys.pointeuse2.model.Chambre/class
 classcom.csys.pointeuse2.model.Client/class
 classcom.csys.pointeuse2.model.EtatCha/class
 classcom.csys.pointeuse2.model.EtatChambre/class
 classcom.csys.pointeuse2.model.Etatmessage/class
 classcom.csys.pointeuse2.model.Messagechambre/class
 classcom.csys.pointeuse2.model.PrmEtage/class
 exclude-unlisted-classestrue/exclude-unlisted-classes
 shared-cache-modeNONE/shared-cache-mode
 validation-modeNONE/validation-mode


 properties
   property name=javax.persistence.jdbc.url
 value=jdbc:sqlserver://192.168.2.58:1415;databaseName=database/
   property name=javax.persistence.jdbc.password value=12355/
   property name=javax.persistence.jdbc.driver
 value=com.microsoft.sqlserver.jdbc.SQLServerDriver/
   property name=javax.persistence.jdbc.user value=ka/
 /properties
   /persistence-unit
 /persistence
 thanks ...


 But is this related to Tomcat somehow ?
 If yes, could you explain how, and provide some versions of the software
 used ?

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




detect requests that take a long time to process

2015-06-19 Thread Kaouthar Ghorbel
hello ,my webapplication is very slow , i want to know how can i detect
requests that take a long time to process in tomcat 8.

thanks


Re: detect requests that take a long time to process

2015-06-23 Thread Kaouthar Ghorbel
Thanks for your answer ..

2015-06-19 14:13 GMT+01:00 Daniel Mikusa dmik...@pivotal.io:

 On Fri, Jun 19, 2015 at 9:07 AM, Kaouthar Ghorbel gkaout...@gmail.com
 wrote:

  hello ,my webapplication is very slow , i want to know how can i detect
  requests that take a long time to process in tomcat 8.
 

 1.) Add %D or %T to your access log format.  That will log info about
 how long the request took to process.

 %D - Time taken to process the request, in millis
 %T - Time taken to process the request, in seconds

 http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Access_Log_Valve

 2.) This valve can also help.  It'll dump a stack trace when a request
 takes longer than the configure threshold.


 http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Stuck_Thread_Detection_Valve

 Dan



 
  thanks
 



persistance cache

2015-06-23 Thread Kaouthar Ghorbel
hello,
I have a method that returns a list of items when I change the data in this
list in the database ,the return of the method does not take into account
this change.
  here is the configuration of  persistance.xml

?xml version=1.0 encoding=UTF-8?
persistence version=2.1 xmlns=http://xmlns.jcp.org/xml/ns/persistence;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=
http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd;
  persistence-unit name=persistancePU transaction-type=RESOURCE_LOCAL
providerorg.eclipse.persistence.jpa.PersistenceProvider/provider
classcom.csys.pointeuse2.model.AccessControl/class
classcom.csys.pointeuse2.model.Accompagnantgouvernante/class
classcom.csys.pointeuse2.model.Chambre/class
classcom.csys.pointeuse2.model.Client/class
classcom.csys.pointeuse2.model.EtatCha/class
classcom.csys.pointeuse2.model.EtatChambre/class
classcom.csys.pointeuse2.model.Etatmessage/class
classcom.csys.pointeuse2.model.Messagechambre/class
classcom.csys.pointeuse2.model.PrmEtage/class
exclude-unlisted-classestrue/exclude-unlisted-classes
shared-cache-modeNONE/shared-cache-mode
validation-modeNONE/validation-mode


properties
  property name=javax.persistence.jdbc.url
value=jdbc:sqlserver://192.168.2.58:1415;databaseName=database/
  property name=javax.persistence.jdbc.password value=12355/
  property name=javax.persistence.jdbc.driver
value=com.microsoft.sqlserver.jdbc.SQLServerDriver/
  property name=javax.persistence.jdbc.user value=ka/
/properties
  /persistence-unit
/persistence
thanks ...


Tomcat error log

2015-07-09 Thread Kaouthar Ghorbel
Hello everyone,
I want to have a file that contains just the program execution errors in a
new folder (not the log folder ) indicating the name of the servlet that
caused the error .
thanks ..


tomcat log

2015-07-09 Thread Kaouthar Ghorbel
Hello everyone,
I want to have a file that contains just the program execution errors in a
new folder (not the log folder ) indicating the name of the servlet that
caused the error .
thanks ..


ids of all active sessions

2016-01-18 Thread Kaouthar Ghorbel
Hello everyone I want to retrieve the ids of all active sessions in the
servlet.

thanks for your help :)


Re: ids of all active sessions

2016-01-23 Thread Kaouthar Ghorbel
thanks Thomas ☺

2016-01-18 10:02 GMT+01:00 Thomas Scheffler <thomas.scheff...@uni-jena.de>:

> Am 18.01.16 um 09:35 schrieb Kaouthar Ghorbel:
>
>> Hello everyone I want to retrieve the ids of all active sessions in the
>> servlet.
>>
>> thanks for your help :)
>>
>>
> Hi Kaouthar,
>
> look for the HttpSessionListener and collect that information on your own:
>
>
> https://tomcat.apache.org/tomcat-8.0-doc/servletapi/javax/servlet/http/HttpSessionListener.html
>
> regards,
>
> Thomas
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


change persistence.xml at run time

2016-03-26 Thread Kaouthar Ghorbel
hello,

I have two database that have the same design and the same tables , I
already developped methods for  database  A and I want to reuse them  for
 database  B.

 for that I must change jndi in persistance.xml at run time , is it
possible to do that?