Prashant Saraf

Ranch Hand
+ Follow
since Sep 25, 2006
Prashant likes ...
Eclipse IDE Java Linux
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prashant Saraf

Hi All,

I am using CXF to build webservice, my current package of war has 20+ service wsdl and each WSDL has at least two operation. I want to create different logging for each service(either with each WSDL/each Operation).
For logging we are using Log4J and all Logs were going into same log file.

Thanks for Help.

Prashant Saraf

8 years ago

I am looking for a way to fetch data with eager fetch but not all just conditional, lets say I have 3 table department, employee and address table with below relationship

one department has many employee
one employee has many address with date stayed range.

now I want fetching department, only issue I am getting its fetching all the address of employee but I want for last one year.
any way to do this.

Prashant Saraf
First of all I am so sorry for quality of code. Yes I did typed here. I have some restriction on coping code. But over all your got my point. the connect dot means connect transformer DAO and webservice..
it take input from service imp and send to transformer to create JPA entities. then send those Entity are send to DAO for DB operation. after db operation it call transformer to generate JAXB response. So I am calling it facade.

currently code is not more than 15 line.. I just put 40 line looking into future changes.

Prashant Saraf
Thanks Junilu.

The class as a operation that is being called by service impl, this method take jaxb and return jaxb below is some what code looks like. its does not does many things than connecting the dots. the method is not more than 40 line for now.

I have doubt about naming one the module in webservice. We are using JAXWS webservice, the Service implementation Class called A CLASS. This class basically does role of calling transformer if JAXB object need to translation into other business object, calling services beans and DAO classes and at the send the JAXB response back. There are different opinion are coming in my team about naming the class as either Facade/Controller/Helper/or any other. Can some one help me suggest name according to design pattern concept, I think it should be Facade as it hides the behind implementation from Service as it take JAXB and return JAXB.
I think you only need to overwrite the clone method. and this would look like below


And no need to implement Cloneable.
It does tell how many to select
Congrats Amritendu on your book.

Ranganathan Kaliyur Mannar wrote:

Prashant Saraf wrote:Also very simple but confusing point... when I am releasing the connection why does a CMT holding it?

I don't get this question. can you elaborate?

I am getting Two-Phase commit exception for oracle connection pool and I have used Toplink as ORM. and when toplink is relasing the connection then why does my JMS saying two-phase commit on oracle connection pool.

Prashant Saraf
One solution you can try is put your jar files in lib folder of web-app, the address should be webapp/web-inf/lib.
11 years ago
Thanks Ranganathan,
Can you please provide some guideline on handling the traction on programmatic way?
Also very simple but confusing point... when I am releasing the connection why does a CMT holding it?

Prashant Saraf
I am using oracle JDBC driver for my datasource. When I mark the Global tration as ture then I need to eable either 1-pahse commit or 2-phase commit. if I use two phase commit then application runs well but my requirement is why its not working on default setting of 1-phase commit.

I also did some stack trace and found that my OnMessage method is working as expected. when I am returning from onMessage its throwing this exception.

Thanks for your response.
Aptana Studio 3 has great support for HTML5 and CSS3, Excelent IDE for Web UI Developer
Hi All,
I getting Two-Phase commit Exption in my application for one of the datasource. Point is application only does ready only data option using Oracle Toplink. Here is what happling in Application

1. Request come to webservice
2. Webservice calls to JMS Queue. Application need response from queue so used queue with Read Respose
3. In Message Bean( Lets call this ProcessBean), several successful hit goes to Oracle DB using Oracle Toplink, no exception is trown.
4. After DB data read pointer goes to call to Blaze rule RMI API provided by Blaze. we get successful result.
5. Queue Calles Response Queue and Response Message is send back.
6. Now exception comes and Pointer again come to ProcessingBean
7. In webservice never get response back.

P.S. If you desible Global transation in Weblogic connection Pool then everything works fine. Or If I checked enable Two-Phase commit then also everything is working fine.
Can you clarify how you are hitting service with Java Code? if you are able to hit the service with browser then it should be access by Java Code.
11 years ago