vikas sharmaa

Ranch Hand
+ Follow
since Jun 28, 2007
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vikas sharmaa

Hi, please someone help me resolve this error. or guide me some direction to look into. thanks.
I am not able to deploy EJB 3.0 in my existing application. I am using Weblogic 10.3.

code:



weblogic-ejb-jar.xml:



ejb-jar.xml is optional in EJB 3.0, so I have removed it.

I am getting below error on starting Weblogic application server:

Welcome Ken Rimple & Srini Penchikala!
8 years ago
ok i got it. the correct query is

session.createQuery("from Team t join t.game gm");
There is one-to-one mapping between Game and Team tables.

I am getting "Path expected for Join!" exception on executing below inner join HQL query:



Please find below the mapping files:

Team.hbm.xml


Game.hbm.xml


Team.java


Game.java
good Knowledge of Java and SQL is sufficient.
Java Persistence with Hibernate by Christian Bauer and Gavin King is one good book.

Mahendr Shinde wrote:I think you made Employee first and then added those two tables later. This is wrong approach!



this might be wrong approach for Hibernate inheritance mapping.

But, the scenario is:

I have an EMPLOYEE table with multiple columns. I execute many queries on EMPLOYEE table.

Now, there is an enhancement that is specific for few employees. These few Employees are categorised as REGULAR_EMP and CONTRACT_EMP. Please note that there can be Employees who are neither Regular nor Contract Emp.

Now, I don't want to do changes in existing EMPLOYEE table just for few Employees.

It seems I should go with one-to-one relationship instead of inheritance. am I right?
Wendy,

If I write code like Employee emp = new RegularEmp(); and then set emp data; in that case both EMPLOYEE and REGULAR_EMP tables will be updated automatically.

But, in my case, EMPLOYEE table already have some data. and now, I am creating child tables REGULAR_EMP and CONTRACT_EMP. Now, I want to sync data in Employee table into REGULAR_EMP and CONTRACT_EMP.

I suppose, in such scenario I should go with one-to-one mapping. please correct me if I am missing some point.
Employee table is mapped to Employee class. Employee table has some records.

Now, requirement is to create child tables Regular_Emp and Contract_Emp.

So, using table per class inheritance strategy I have created these tables. both Regular_Emp and Contract_Emp extends Employee class.

Now, how could I write code to insert data in Regular_Emp or Contract_Emp tables corresponding to data present in parent table Employee. Please help.
no Sam, I didnt find reference to what i said in the first post about distributed application.

still, my main question is how Spring implementation is different in distributed application (or there is no difference?)..

for example, i have written an application that is running perfectly on the server. later, I added 2 more nodes using clustering in weblogic. now, do i require to do any changes in spring configuration or code... or, it will automatically take advantage of clustering.
8 years ago
As per my knowledge, Application Server handles all the load balancing, failover kind of stuff in the distributed application..

then how working in clustered environment is different if we are using Spring instead of EJB? Do we require to do some extra configuration or coding in Spring? why some people say, EJB is more suitable for distributed environment?
8 years ago
Thanks Jaikiran for your response.

I am not working on distributed application. I asked these questions to improve my concept of distributed application.

For # 1, you said, it depends upon the Application and Application server.

So, for example, I want to deploy a simple web application in the distributed cluster environment with 2 nodes. The Application Server is Weblogic 10g. And, I have a singleton class in the application.

My purpose of deploying it into cluster environment is to achieve High Availability.

In this scenario, do i need to do any changes in the code or just do the configuration in the Weblogic console?