Muralidhar Adhikarla

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

Recent posts by Muralidhar Adhikarla

HI Mikalai,

I am planning to start preparing or the Java Web services 6 exam. I have the link to your study material and i am plannng to read Java Web services - Up and Running. Is ther any other book you can recommend which might be helpful. Also, Sorry for this stupid question but will it be helpful to start reading your material first and then the Java Web services - Up and Running book or the other way around? I just want to make sure that i start it right.

Thanks For your assistance!
Murali
I am getting this error:

: Cannot use identity column key generation with <union-subclass> mapping for:
om.titan.domain.Employee
I Depend On:
jboss.jca:service=DataSourceBinding,name=DefaultDS
Depends On Me:
jboss.j2ee:jar=titan.jar,name=DataAccessBean,service=EJB3

ObjectName: jboss.j2ee:jar=titan.jar,name=DataAccessBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:jar=titan.jar,unitName=titan

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:jar=titan.jar,unitName=titan
State: FAILED
Reason: javax.persistence.PersistenceException: org.hibernate.MappingExceptio
: Cannot use identity column key generation with <union-subclass> mapping for:
om.titan.domain.Employee
I Depend On:
jboss.jca:service=DataSourceBinding,name=DefaultDS
Depends On Me:
jboss.j2ee:jar=titan.jar,name=DataAccessBean,service=EJB3
Hi All,
I am trying Exercise no 8.2 from the book Enterprise Javabeans 3.0(Oreilly). I encountered a weird behaviour . I cannot assign @Generated Value to the primary key of my Super Class while implementing
the InheritenceType.TABLE_PER_CLASS mappings.
package com.titan.domain;

import javax.persistence.*;

@Entity
@Inheritance
(strategy = InheritanceType.
TABLE_PER_CLASS)

public class Person implements java.io.Serializable
{
private int id;
private String firstName;
private String lastName;

@Id
@GeneratedValue //this is giving an error.

public int getId() { return id; }
public void setId(int id) { this.id = id; }

package com.titan.domain;

import javax.persistence.*;

@Entity
public class Customer extends Person
{......}


package com.titan.domain;

import javax.persistence.*;

@Entity
public class Employee extends Customer
{......}




While the Primary key Autogeneration works for InheritanceType. JOINED and InhertitanceType.
SINGLE_CLASS, its giving me an error for the same in InheritenceType. TABLE_PER_CLASS.

Any Idea?
I think for EJB 3.0 , We can use primitive types as primary keys. So the answer for your question is Yes.
The client can do that by calling session.invalidate() method.
Hi,The DAO pattern is not in the exam and i think you wont get these type of questions in the exam .Offcourse the answer to that question was DAO pattern .
The main motivation for using MVC is to separate your presentation logic from your
business logic. The idea is to have a �controller� component that mediates between
the two. I hope this helps .
Hi Mallika, it will result in a runtime ELException.
<jsp:useBean id="person" type="com.tridib.vo.Person" scope="session" /> creates an instance of the bean if it dosent exist, or uses the bean if it exists, The scope attribute is used to store this bean i.e person bean.
when we use <jsp:getProperty property="name" name="person"/> we simply are trying to get the name property of person bean which is set previously i.e:
using this:

Person per2 = new Person("Request");
Person per3 = new Person("Session");
request.setAttribute("person", per2);...Storing in request
request.getSession().setAttribute("person", per3);...Storing in session

RequestDispatcher dispatcher = request.getRequestDispatcher("/test.jsp");
dispatcher.forward(request, response);

The getProperty will first look for the property in page , request , session and application scope and it returns value it gets first
: in this case its request scope and hence the Request is returned to the output.

Let me know if this is clear
Option 5 should not have been correct , <jsp:forward > simply forwards the request to the Jsp page specified, so the results will be the resuls of the JSP page specified alone . Not sure y this option was right
I think A is incorrect only because of not having a closing tag.
B is correct, C is incorrect because Class and beanName cannot exist together.D is correct and i dont think if a bean is already present as is the case with D, the tag should be closed.(They are 2 different things. If this is wrong pls let me know y?)
Your question is confusing:
Here is what will happen:
if you say <mytags:tag1> and mytags:tag2> you are calling two differnt tags and the container will have 2 different instances:

But for the multiple invocations of <mytags:tag1> , the container will use the same tag instance and will call all the methods except the constructor and the realse() method.
Let me know if you have any query
Hi, In the prior versions the Servlet, the sub elements under <web-app> shuold apper in the strict order as was mentioned in the specs. From 2.4 version its no longer the case.
Hi , The JSP specification says that if the property specified is not their in the java bean then it will give an error.

So ${person.empID} will give an error if empID is not the property of person bean.