Rafael F. Oliveira

Greenhorn
+ Follow
since Aug 26, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Rafael F. Oliveira

Is it possible to disable a pdf printing during its creation (using Java)?

thanks in advance
14 years ago
My native method is synchronized and "showMessage" is called in some cases...if the thread isn't stopped or killed new tasks will start in a blocked mode. Because that I would like to kill a specific thread instead of all of them when the timeout is exceeded. Is it possible?

I can get the thread by use the following code:


Hi,

I have the following code:



I'm running the aforementioned code inside a servlet container (tomcat).

The native method calls a Delphi method that executes a "showMessage", when the futureTask is running the native method calls the showMessage (it will just wait for the user to press "OK"), because it executes inside a servlet, the user doesn't see the dialog message, so, the task will run until the timeout.

The problem is that my task stops, but the thread (pool-1-thread-1) doesn't stop.

In that case, how can I kill a thread?

Thanks in advance.
It is necessary because we have a legacy application...



[]'s
14 years ago
Hi,

I have two questions.

1. If I'm in a load balancing scenario (Apache Server + 3 Tomcats: Tomcat1, Tomcat2 and Tomcat3) and I have a synchronized method. How will the application execute this method for 2 simultaneous access? It will be transparent, even if the first request of the synchroned method is alocated to the Tomcat1 and the second request of the synchroned method is alocated to the Tomcat2, Will the synchronized execution be maintained?

2. When an user calls a synchronized method and it broken (ex.: a loop), and, the second user is trying to call the same synchronized method. What will happen in that case? Will the second user wait infinitely? If Yes, can I configure a timeout?

Thanks in advance!
14 years ago
Ok, Your suggestion is related to http sessions, How can I intercept the Hibernate Session (openSession method)?

[]'s
14 years ago
Hi,

I have the following scenario:

---When any method is called I would like to set the user logged in the session before its execution---

I am using Spring + Hibernate. In the "applicationContext.xml" I configured as follows:



I've tried that by implementing the interface Filter like this:



But, it does not work, because if a method calls another methods the user logged is not setted. Any ideas?

Thanks in advance!
14 years ago
Can I use JNDI and DataSource to solve my problem?

For example, If I started my application using the following link http//10.0.0.1/app_test -> get the dataSource from jdbc/app_test, else, if I started my application using the following link http//10.0.0.1/app_prod -> get the dataSource from jdbc/app_prod

Is this possible?
15 years ago
Hi, I have a big problem in my company:

Scenario
- The same application "App" was installed in two contexts: www.company.com.br/AppProd and www.company.com.br/AppTest
- Each one has an app.properties file that contains its database configuration (url, user, password, etc).
- Each one has a separated Apache HTTP Server and 2 Tomcat for load balancing.
- Base technologies: Apache, Tomcat, Spring and Java

Problem:
We would like to keep the user changes (in the app.properties file) even if a new App is released and deployed.
Where/how should I put, link and load the app.properties in the source code/directory of the application?

Possible Solution (just a idea, not yet implemented):
Put each app.properties in the apache configuration directory, for example, apache1/conf/app.properties and apache2/conf/app.properties. Using this, we can redeploy a new version without overwrite the app.properties file, instead of to put this file (packed in the .war file) in the tomcat webapps directory.
I've read about PropertyPlaceholderConfigurer, but how to use this Class in my scenario?

Anyone has a idea how to solve this problem?

Thanks in advance!

Rafael Oliveira
15 years ago
hi...

im using HttpConnection for to send a string into server, in following:



how to get this string in the Strus 2 Action?
16 years ago
following my XML code


the type in localVariables references a domainSorts.3, i want to get, for instance, the attribute name for //@domainSorts.3 in this case Room...

i use XPath? how should do?

thanks...
hi, follow my conversion from String to Date

I use struts2-core-2.0.11.1.jar, xwork-2.0.4.jar and ognl-2.6.11.jar libs
Have a MyAction class

I created the properties MyAction-conversion.properties and define it as follow

and the form

then when click in search, the follow message show in log


obs: i try with this version too -> struts pra 2.0.8 e xwork pra 2.0.3

what can I do?
[ August 26, 2008: Message edited by: Rafael F. Oliveira ]
16 years ago