Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi forum!

RamandeepS Singh

Ranch Hand
+ Follow
since Aug 25, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by RamandeepS Singh

Hi

I have one table user and child table user_details and in both tables I have column named as status.

I want that whenever I update the status column in user table it also get updated in user_details table

I am using hibernate


Thanks Ramandeep S
Hi

I am on proxy network,proxy is not allowing maven to connect to central repository
Can we somehow download and install the maven plugins manually in local .m2 repo

Please HELP!!

Thanks
Ramandeep Singh
10 years ago
Hi

I am new o EJB
I have created a new EJB app . In EJB module i created a package having one interface and one stateless bean


and exported the jar using the eclispe IDE

Then i deployed the jar in Deploy folder of JBoss

I created one folder named client.war in jBoss deploy directory and created 2 Jsp's there

index.jsp


WebClient.jsp


Its not able to find the Bean

Please let me know if i am going wrong

Thanks In Advance

Ramandeep S.
Hi

Is there any security framework like apache shiro or Spring security which allows adding new roles and giving them priviliges

Example

i have 2 roles in my Database
1) ADMIN
2) USER

and my application is running and the administrator of the application wants to add a new role EMPLOYEE and allow that role to access some URLs of the USER role
so via application administrator of the application will be able to add new role

Thanks in Advance

Ramandeep Singh
Hi

I have installed the glassfish server adapter in eclipse.
I want run glassfish server always in debug mode so that on single change glassfish does not autopublish the application, it is really time consuming while development

Please help me

Thanks in Advance
Ramandeep Singh
11 years ago
Hi

Can anybody suggest me, when should we use @CollectionTable and When to use @OneToMany

I think @OneToMany is always Beneficial

We we are Using @CollectionTable i think there will be no Improvement in Performance as well as it limits us that we can not persist without parent and even we can not query them independently

However we can achieve the same functionality with more flexibility by using @oneToMany, We Just have to write few lines more in our mapping

Please Correct me if i am Wrong


Thanks
Ramandeep Singh
Hi Vinay

I think Bill Gorder is right. You can achive it using Discriminator column with Inheritance type= Joined

Regards
Ramandeep Singh
Hi Everyone

in @inheritance type Joined

I have class person, employee and Student

i have common columns in Person , and getters setters for discriminator column if i have to access it from person class



so when i am saving the Employee or Student record and then retrieving Person record, It is giving me discriminator column value as NULL
but after restarting the server its giving me value accordingly

if i manually set the value of discriminator column value and then save and retrieve then its giving me the value (Do i need to manaully set the discriminator column value?)
then what is benefit of using discriminator column

why should i not use OneToMany relation of person with employee and student having column Type and via enum i can enter the perspective value into the column
and i will also apply lazy fetching on that columns

Please Suggest

Thanks In Advance
Ramandeep Singh
Hi

i have web application in Jsp/servlets and EJB, Is there any way to integrate Acegi security with jsp/servlets

Please Help!!

Thanks & Regards
Ramandeep Singh
11 years ago
Hi

Thanks for you reply

I am getting the following error while executing the above query


unknown state or association field [number] of class [com.practise.demo.Phone].

Thanks & Regards
Ramandeep Singh
Hi


I have table person in which i wrote the following code

public class person{

private String name;

private String lastName;

@CollectionTable(name = "PHONE")
private Set<Phone> phones;

// getters and setters

}

in Phone class

@Embeddable
public class Phone{
private string number;
private String type;

getters and setter

}


i have to fetch person record having phone number=xxxxxxxx

Please help me!

Thanks
Ramandeep Singh
Hi
I am newbie to programming
I am developing n-tier application in java

Following is my app structure

In Controller package
UserController
AdminController

In Service Package
UserService
AdminService

In Dao Pacakge
UserDao
MessagesDao

Now in userService i have method named
getUserMessages(User user);

In AdminController i need the same method
Do i rewrite the same method or i should use userservice in AdminController

Or should i make MessageService instead of AdminService


OR should i go for three service Classess
AdminService
UserService
CommonService

And Admin and UserService extends CommonService

Thanks In Advance
Ramandeep Singh
11 years ago


Hi

I am newbie to hibernate

i have a self refrencing class user having one to many relation
i am using association table for one to many

i have 4 users having following records
1 abc
2 def
3 ghi
4 jkl

following records are there in association table
user child
1 2
1 3
1 4

when i am using lazy fetching and using criteria query to fetch user 1
its giving me 1 record and when i get childs its giving me 3 records that is working fine

BUT when i change it to eager
It is giving me thrice record 1

Thanks
Ramandeep Singh
Hello

Is there any way in Spring to get the action name which is called in interceptors

say i have an interceptor in which i have implemented the preHandle in which i want to fetch the action name which is called called



Thanks
Ramandeep S
12 years ago

Bear Bibeault wrote:Why block? Use the success callback to perform any operations that need to wait for the response.



Its returning me undefined... please look the above script i poted.. i used callback

but it was returning me as of async request

Thanks
Ramandeep S