Hi
Im doing external EJB and it works great. Just one little question tho...
Ok.. I have a SessionBean using external EntityBean. In one of the business
method
of the SessionBean..
0 Collection registrants = new ArrayList();
1 Collection keyColl = regHomeRef.findByAttribute(key,value);
2 Iterator iter = keyColl.iterator();
3 while(iter.hasNext()) {
4 Object pkRef = iter.next();
5 System.out.println("key = " + pkRef);
6 Registrant reg = (Registrant)
7 PortableRemoteObject.narrow(pkRef, Registrant.class);
8 BigDecimal pk = (BigDecimal)reg.getPrimaryKey();
9 Registrant registrant =
10 regHomeRef.findByPrimaryKey(pk);
11 registrants.add(registrant.getDetails());
}
im 100000% sure that line 1 actually retrieves primaryKey (BigDecimal) from
Registrant Entity Bean but why do i have to cast it to Registrant (line 7) first
in order to
get the primaryKey. Is this something normal when you use external ejb
instead of one big lump jar?
I was just guessing when i did that...the clue was line 5 printed out
"registrant/component/Registrant:17"
which is my entity's jndi name and its pk
enlighten me please...
.u
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]