Saathvik Reddy

Ranch Hand
+ Follow
since Jun 03, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Saathvik Reddy

Hi,

I have a requirement where i need to poll a directory for any .csv files. I have an external process which would put .csv files to that directory.

I need to listen to that directory and if it has any .csv files i need to process them and then delete them. I can put a while(true) statement to indefinitely see if any files are present in that directory.

Is this a good/standard way of doing it? Is there any better approach?

Thanks,
15 years ago
Hi,

I want to know which would be the best reporting tool out in the market? I am looking for a generic tool to configure how we would like to group, sort, filter, etc... and there wouldn't be so many changes.

Thanks,
15 years ago
Should i make the utility class Util as final?
15 years ago
Hi,

I am writing a generic utility class. I have two approaches and wanted to know which is the best

Approach 1:



Client code to call util methods:



Approach 2:



Client code to call util methods:



If i use Approach 2 i cannot restrict client from calling Util util = new Util(); util.perform();

What are the implications of each approach?

Thanks,
15 years ago
Hi,

I have an many-to-many relationship mapped with annotations
as below:





I am updating the UserGroup by doing:

I am getting this exception:


If i remove cascade=CascadeType.ALL from Group entity i
don't get any exception but i want to keep cascade in Group entity.
Is there anything i need to do to get rid of this exception or I should
remove cascade in Group entity?

Thanks,
thanks stanislav for replying my post but i am looking a way to do it with annotations. I googled it but couldn't find anything which matches my problem.

Can anyone please tell me how to solve this issue.

Thanks,
Hi,
I have a Parent child relationship between two entities. I have cascade = all JPA property between these two entities.

I am doing parent.getChildren().add(child) to add children to the parent class and saving the parent entity which works great.

But, when i do parent.getChildren().remove(child) and save the parent the child record is not removed. What should i do to remove the child?

Thanks,
Hi,

I have an Enum StatusType

In my entity class i am mapping as



I have no problem saving the enum value but when i try to retrieve the entity i get status as null.

Can anyone point me where am i going wrong?

Thanks,
Hi,

Is it possible to create datasource for HSQLDB from application servers like weblogic or websphere? If yes, what would be the database host name and port number for the datasource?

Cameron Wallace McKenzie wrote:Well, in that case, you should configure Hibernate as your JPA provider.

I'm not sure of any drawbacks. You can always switch to a native JPA provider in the future. I think using Hibernate is a safe and secure option.

-Cameron McKenzie



So, you mean we have to configure this in spring context as below:


instead of this


right??

Cameron Wallace McKenzie wrote:What is your JPA provider if you're not using Hibernate?

-Cameron



Hibernate is the only JPA provider we are using at least now.
Hi,

I am going to work on a spring-hibernate enterprise project. When integrating spring with hibernate should i be using JPA or Hibernate for ex: should i configure JPA's entity manager factory or hibernate's session factory in my spring context file?

What are the pros and cons of both the approaches?

Thanks,
Srikanth.
Hi,

I am using JAXB annotations for Marshaling/Un-marshaling.

I have two objects Account and User
Ex: Account

Ex: User



When i load the user object from the database and try to unmarshall it i get this exception:
JAXBException occurred : A cycle is detected in the object graph. This will cause infinitely deep XML: User@69aae1 -> Account@6aefb4 -> User@69aae1

Could anyone please help me out.

Thanks,

I realized i made a silly mistake. It works now.

Thanks,
15 years ago