Anand Kumar Singh

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

Recent posts by Anand Kumar Singh

You can not use @EJB annotation outside of EJB container, it will work only inside container in deplorable classes (Like Other EJB class , Servlet if deployed in same container)

If you want to call EJB from outside container , you need to lookup EJB, Try below code

A simple code to connect with JMS server and send message, may be this will help you.


queueSender.send(message);
Don't go for EJB 2.0.

Hibernate 3.* and EJB 3.0 is best choice for Java ORM tool. Acctually Java EJB 3.0 is A Hibernate Clone
May be you are using different version client.jar in the Client end. take the jboss-client jar from the JBOSS_HOME/client/ and put it in your client's class path.

Also Instead of localhost use IP address
Go to message properties.

Select ActionKind > Return

(See attachment image)
Chain of Responsibility will be good for this scenario.
Why you are worrying about Thread management , your code is in a servlet and , servlet is deployed in a servlet container , and all Thread management is servlet container task.

You only concentrate on your business logic and left all Thread management or request handling to servlet container
15 years ago
I have a problem with logger in my application. I have implemented Java. Api java.util.logging. for logging . I set my log level to INFO and logfile appender everything is working fine.

There is one scheduler which run every night , after running that scheduler the log lever automatically switch to FINE or sometime FINER. Because of that its generation lots of unnecessary FINE or FINERlog files.

I debug a lot but didn’t get any solution, can anyone please suggest me any way to solve this problem?

Below is a sample of log file where log level is getting change form INFO to FINER.


2009-04-01 02:12:13:171|INFO|'Report file '/web/prd/secure/reports/i053/
2009-04-01 02:12:13:680|INFO|'Report file '/web/prd/secure/reports/i053/
2009-04-01 02:12:13:680|INFO|'Report file '/web/prd/secure/reports/i053/
2009-04-01 02:29:50:210|INFO|'End of processing...'|JobDeleteContentProcessing|
2009-04-01 06:35:35:160|SEVERE|'java.lang.IllegalStateException: setAttribute: Session already invalidated
2009-04-01 07:26:08:231|SEVERE|'Error UUID: 421604e6-957f-4e85-a3c4-6f935dbf8e66
2009-04-01 07:26:08:250|SEVERE|'org.springframework.dao.InvalidDataAccessApiUsageException: nested exception is org.hibernate.TransientObjectException: '|BaseExceptionHandler|
2009-04-01 08:06:01:321|SEVERE|'Error UUID: 205df9f0-4156-4bfa-baba-fac4b5aad233 |ViewPrefService|findViewByLogin|
2009-04-01 08:06:01:325|SEVERE|'org.springframework.dao.InvalidDataAccessApiUsageException: nested exception is org.hibernate.TransientObjectException:
2009-04-01 08:22:44:180|SEVERE|'ClientAbortException: java.net.SocketException: Broken pipe'|BaseExceptionHandler|
2009-04-01 08:29:53:500|FINER|'End with success'|LoginServiceImpl|findByLogin
2009-04-01 08:29:53:501|FINER|'End with success'|LoginServiceImpl|findByLogin
2009-04-01 08:29:54:010|FINER|'Entering in doView()'|MainPageAction|doView|5b
2009-04-01 08:29:54:011|FINER|'Entering Method'|MainPageForm|getTransferBean|
I have a problem with logger in my application. I have implemented Java. Api java.util.logging. for logging . I set my log level to INFO and logfile appender everything is working fine.

There is one scheduler which run every night , after running that scheduler the log lever automatically switch to FINE or sometime FINER. Because of that its generation lots of unnecessary FINE or FINERlog files.

I debug a lot but didn’t get any solution, can anyone please suggest me any way to solve this problem?

Below is a sample of log file where log level is getting change form INFO to FINER.


2009-04-01 02:12:13:171|INFO|'Report file '/web/prd/secure/reports/i053/
2009-04-01 02:12:13:680|INFO|'Report file '/web/prd/secure/reports/i053/
2009-04-01 02:12:13:680|INFO|'Report file '/web/prd/secure/reports/i053/
2009-04-01 02:29:50:210|INFO|'End of processing...'|JobDeleteContentProcessing|
2009-04-01 06:35:35:160|SEVERE|'java.lang.IllegalStateException: setAttribute: Session already invalidated
2009-04-01 07:26:08:231|SEVERE|'Error UUID: 421604e6-957f-4e85-a3c4-6f935dbf8e66
2009-04-01 07:26:08:250|SEVERE|'org.springframework.dao.InvalidDataAccessApiUsageException: nested exception is org.hibernate.TransientObjectException: '|BaseExceptionHandler|
2009-04-01 08:06:01:321|SEVERE|'Error UUID: 205df9f0-4156-4bfa-baba-fac4b5aad233 |ViewPrefService|findViewByLogin|
2009-04-01 08:06:01:325|SEVERE|'org.springframework.dao.InvalidDataAccessApiUsageException: nested exception is org.hibernate.TransientObjectException:
2009-04-01 08:22:44:180|SEVERE|'ClientAbortException: java.net.SocketException: Broken pipe'|BaseExceptionHandler|
2009-04-01 08:29:53:500|FINER|'End with success'|LoginServiceImpl|findByLogin
2009-04-01 08:29:53:501|FINER|'End with success'|LoginServiceImpl|findByLogin
2009-04-01 08:29:54:010|FINER|'Entering in doView()'|MainPageAction|doView|5b
2009-04-01 08:29:54:011|FINER|'Entering Method'|MainPageForm|getTransferBean|


15 years ago
You can do it using JSTL also.

Go through below code , it will help you.



In above code CustomFieldDetails is a String of objects which is set in request object.
15 years ago
Go through below code , it will help you.

15 years ago