Trilochan Bharadwaj

Ranch Hand
+ Follow
since Feb 02, 2009
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 Trilochan Bharadwaj

just to add pojo-type-declaration.ftl is following:

I am trying to run hbm2java using maven(ant also runs the same way)and I am able to get Pojos generated correctly, but I wanted to suffix each of my files with "Model"; I tried putting in my hibernate3 plugin component properties declaration (on POM Xml) following:

I cannot get Pojos generated to be ending with 'Model' suffix... I need some suggestions/ideas/pointers..

I want to build a SOAP/REST WS using JAX WS for pushing RSS feeds that users can subscribe to ... I need:
1.) Some architectural pointers/suggestions on best practices for doing so in Java.
2.) Some guidance on various sources / any open source frameworks that I can utilize.

11 years ago
I have two tables:


I want to write a critieria query with following association

Media.getMediaTypes( ) ( where Media types is the collection), now the problem is my hibernate mapping files generate Media Type with many-to-one relationship with media but media has no reference to media types; how do i make this go bothways, with hibernate mapping media type collection inside media table...?

What is the best and structured way to prepare; I see that we've got Do NOT do this, Do NOT do that, but there's no sticky: Here's what we have to do ... or atleast I couldn't find it. Any suggestions/advise?

Anybody? ... Would appreciate some help ...

11 years ago
My configuration (web xml):

I have an application class INewsApplication that has the resources set as: <br />

My context configurations are as defined above; they get loaded properly during deployment to JBoss. However when I run the client test case (using JAX RS libraries); which is as follows:

I get a 404; Is there anything fundamental that I might be missing?

Would appreciate anyone's help/suggestions on this ...
11 years ago
Yea especially with stuff like which makes mocking a breeze ... and whats more its native to spring, so if an application is using spring, its really helpful.
11 years ago
Replaced Concrete Implementation with Interface and also replaced and it worked fine ... Cool thanks All!

One more thing I noted since I am deploying on JBOSS; JBOSS's JNDI binding for UserTransaction are as opposed to . Once those changes were made it all went well.

Again appreciate everyone's help!
11 years ago
What do you mean code to an interface ... I am not following; does that mean, I use:

instead of using DefaultActorModelService?

Can you clarify in the snippet please?

Appreciate your help!
11 years ago
I use following class hierarchy for Service:

And refer to it in controller resource:

I simply refer to this in my spring resource config xml (for controllers and restful resource configuration) like this:

However when I package and deploy the jar on JBoss, I get following exception:

What am I missing ...? My guess is that I am doing something fundamentally wrong in the code ... Any suggestions?

Any help would appreciable ...
11 years ago

If you read what I said in the end you'd know that I do NOT intend to use only transaction manager with JETTY or that JETTY alone; I asked I just want to test out my transactions in Spring; which means I need pointers on how to do that in Spring ... so it really is a concern of Spring.


I am currently working on a Spring MVC, Spring Web Flow / Dojo client / Restful Resource on JAX RS (using Jersey JAX) <--> Spring <--> Hibernate <--> DB based web application; and we use maven with jetty for running some of our stuff for testing. I wanted to test some of my Business tier elements (Service Tier annotated with @Transactional annotations for Spring); On presentation tier I have restful resource using Jersey JAX RS that calls Spring based POJO service that calls DAO to get the results. The service methods are annotated with @Transactional (spring) annotations and I wanted to test out my flow; Our service xml for Spring beans/context configuration looks like this:


I have configured Jetty plugin as follows: (in POM.xml)

For jetty config I am using Jetty plus xml as supplied with jetty server download. I have added following lines to it:

But when I do a mvn clean compile test install jetty:run ... It compiles fine and test cases run, but Jetty maven plugin cannot find UserTransactionImp; I checked ... its there on the classpath and I checked the jar in .m2 repo ... its present where it should be ...

2010-02-09 23:07:34.657:INFO::Logging to StdErrLog:: DEBUG=false via org.eclipse.jetty.util.log.StdErrLog
2010-02-09 23:07:34.689:WARN::Config error at <New id="userTxImpl" class="com.atomikos.icatch.jta.UserTransactionImp"/> java.lang.ClassNotFoundException: com.atomikos.icatch.jta.UserTransactionImp

^^ those are the two lines I get and server exits ...

Any help or suggestions would appreciated ... NOTE: I don't need Atomikos ... I couldn't find any other transaction implementation that I could use with Jetty ... I just need to test my code's flow with Transaction management (Integration testing 101).

Thanks in advance!

I noticed that I do have apache commons dependencies, which themselves might rely on their commons logging, I don't know if that is causing any issue; I looked up on slf4j page, it asks me to put an "slf-nop.jar' and only ONE slf4j-noop.jar (or any one from slf4j api); I am using above dependency declaration ... That should have taken care of it already, but it hasn't

I am a little lost on this one, as jars are clearly present (eclipse project shows jars), and in any case I do:

to generate war file ... that should package everything correct? I don't know what's up

12 years ago