Alexander Yanuar Koentjara

Ranch Hand
+ Follow
since Jun 03, 2002
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 Alexander Yanuar Koentjara

Hi ..
If I have 3 machines, machine I is a managed server, dedicated for application server (EJBs). Machine II is a managed server, dedicated for web applications (the war file). Machine III is an admin server. All run under 1 domain.
What I do now:
1. I start machine III as admin server.
2. I deploy the EJB components at machine I
3. I deploy the Web components at machine II (which contains only web application war) at machine II
Problem:
I browse the JNDI tree on machine II, and it cannot found the EJBs at machine I, thus, machine II cannot access the beans.. But, if I deploy the EJBs at machine II, then EJB will be used in machine II (which should not be happened - for security purpose).
Please help.
18 years ago
>2) Is it possible in EJB2.0 to define two tables in a CMP. If it so please give the sample programs.
Cannot. In Web Logic deployment descriptor, you must indicate one table in database for one CMP EntityEJB.
But, for your case, you have several alternatives:
1. declare the secondary table as another Entity EJB, then you can set up the relationship.
2. Use BMP, with DAO to access both primary & secondary table.
3. discard the secondary table, and use blob in main table instead. Then, you can use java serialization method to convert values of secondary table to binary. This only work for 1-1 relationship (example: profile as secondary table in customer table, profile contains name, address, company, telephone. Then you can make a class called ProfileValueObject, use serializable method to convert it into bytes, then store it as blob in customer table)
4. merge the table into one, work only for 1-1 relationship.
18 years ago
Basic differences:
1.0:
- no mandate that Entity EJB must be supported by EJB container
- no Message Driven Bean
- EJB communication backbone uses RMI-JRMP
- no CMP Entity EJB
- no Deployment Descriptor xml file, use compiled class, then serializes it into flat file (binary).
1.1:
- Entity Bean must be supported by EJB container
- no Message Driven Bean
- has CMP, but never describe how to configure relationship between CMP EntityEJBs, this depends on container tool provided by vendor
- RMI-IIOP is suggested for EJB communication
- Deployment Descriptor xml file is introduced
2.0:
- Message Driven Bean is introduced
- With CMP, you can configure the relationship between CMP EntityEJBs, in ejb-jar.xml
- EJB-QL for CMP EntityEJB query language
- RMI-IIOP is a must for EJB communication
18 years ago
Now it works .. hmm .. not my code, but this is WL's fault not to conform EJB spec.
If I replace _setProfile with setProfileVO and _getProfile with getProfileVO, and declare dummy variable:
ProfileVO profileVO;
Then, it works. This is weird though since profileVO is not a cmp field, why should I bother to declare it according to get/set EJB2.0 contract? The funny thing, if the return value is a subclass of Collection/Set, it never complain.
18 years ago

Originally posted by virga:
hi everyone,
every time i deploy application (.war, .jar or .ear) i got this exception.
<Error> <HTTP> <Connection failure
java.net.SocketException: ReadFile failed: Le nom reseau specifie n'est plus disponible.
(error 64, fd 2784)
at weblogic.socket.NTSocketMuxer.initiateIO(Native Method)
at weblogic.socket.NTSocketMuxer.read(NTSocketMuxer.java:410)
at weblogic.servlet.internal.MuxableSocketHTTP.requeue(MuxableSocketHTTP
.java:222)
at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImp
l.java:992)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2209)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
but it deploys and there's no problem when accessing it. i'm using weblogic 6.1 sp2 jdk 1.3.1_01
win2k.
is it a bug ?
thanks in advance.



Ah .. I got this error message when I use Win98 as the server (not officially supported by BEA WL6.1)

Shutdown your server, open your config.xml, search for word "nativeIO" (use in-case-sensitive search), then, replace value "true" with "false".. then .. restart again
18 years ago
Hi,
This sounds a silly question. I hope you can stay with me for a moment.
I use WebLogic 6.1, I keep getting error messages whenever I want to write non-cmp business method on CMP EntityBean.
public interface Customer extends EJBObject {
...
public ProfileVO _getProfile() throws RemoteException;
public void _setProfile(ProfileVO profile) throws RemoteException;
...
}
Basically, ProfileVO is a value object contains name, address, etc. And ProfileVO object is going to be serialized into database as single String value profile (CMP field).
The bean code:
...
public abstract class CustomerEJB implements EntityBean {
...
// this is a CMP field
public String profile;
// this is not a CMP field
public ProfileVO profileVo;
public ProfileVO _getProfile() {
return profileVo;
}
public void _setProfile(ProfileVO p) {
profileVo = p;
}
public void ejbLoad() {
// ProfileVO can accept String as argument,
// and parse it to get the customer name,
// address, etc.
profileVo = new ProfileVO(profile);
}
public void ejbStore() {
// this will convert ProfileVO to String
// so it can be saved into database
profile = profileVO.constructString();
}
...
}
The error told something about "field definition mismatch" or similar.. My code can be compiled *only* when I remove _setProfile and _getProfile in Customer remote interface. Why?
PS: It works fine when I use BMP ...
18 years ago
Thanks very much Mayor!
Hi,
This is my opinion:
Since finder method return Collection or Enumeration object, these classes are provided by vendor, and I don't think it is a default collection classes which we usually use from java.util package (although it uses Collection or Enumeration interface).
The vendor's Collection/Enumeration class is more like a proxy class, and it has smart algorithm not to waste server's RAM by creating 1000 entity beans at one time.
Suppose you create a search engine, and it return 1000 item, will you display them at once? At most case, no, and you will use paging mechanism. And most likely in many case, your code will access one bean (or few) at one time.
So probably, the vendor's self-made Collection or Enumeration object has smart algorithm to handle this, and maybe even you have 1000 bean as result, probably in server side they are just 100 or 50 entity beans relevant to the finder result at one time.

Originally posted by Keane sh:
Hi Alexander,
Could you tell us where we can get the official information about the upgrade for SCEA?
thanks
[ July 09, 2002: Message edited by: Keane sh ]



Hello,
We will be updating the SCEA exam from version 1.1 to 2.0. We are hoping to do
this in August of 2002, however we do not have a release date at this time. I am
not able to insure that the updated version will be released in August.
To answer the second portion of your question, you may use the exam result part
I. You will be able to continue your examination process.
Regards,
Monica Green
> From: "Alexander Yanuar K." <akoentjara@globalsources.com>
> To: "Monica Green" <Monica.Green@sun.com>
> Subject: Sun Certification for Java Architect exam
> Date: Mon, 24 Jun 2002 12:29:31 +0800
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
>
> Hi Monica,
>
> I am planning like to take the SCEA exam part 1 soon, but I heard from many
discussion that the EJB specification will be changed from version 1.1 to 2.0 on
August 2002. May I have confirmation regarding on this issue?
> If I pass the SCEA exam part 1 before August 2002 (which is using EJB spec
1.1), can I still use the exam result part 1 to take SCEA exam for part 2 and 3
after August? If yes, what EJB specification will be used then?
>
> Thanks.
>
> Alexander Yanuar Koentjara
Hi all..
In one of the study guide, I read that CORBA object can only be passed by reference, but in other book (I forgot which one), CORBA can only be passed by value. Which one is right?
I learned that in Java we can use Stringified to pass object by reference in CORBA (object_to_string and string_to_object), so it uses pass by reference?
In other hand, when we use IDL (by converting idl to java using idlj), the returned object or argument object is converted to final class by ORB internally, and it implements java.io.Serialization. So, does it use pass by value, or pass by reference (the stub which is passed is actually a proxy object in client)?
Question:
1. For CORBA object which is bound to naming server, was it retrieved by java using pass by reference or pass by value? (RMI use pass by reference in this case).
2. When passing parameter or receiving method result from CORBA object, does it use pass by value or pass by reference?
3. When using java to call CORBA object, what kind restrictions applied?
4. What is the relationship between PortableRemoteObject.narrow() with org.omg.CORBA.ORB.string_to_object()?
the exact date is not too sure but it is after August this year (according to Monica Green - Sun's customer service). So, I am taking the exam part 1 at the end of this month, I don't want to have additional stuffs to learn..
The reason you cannot pool: the container never know about specific information stored in the bean. Imagine a bean like this:
class MyEJB ..... {
private int state = 0;
...
...
}
You can passivate this bean (to reduce RAM consumtion) and activate the bean (if client request it later), but there is no way you can reuse this bean for other client since the state of one client is different to the others. The container just doesn't have a way to modify the state.
Stateless bean won't have this problem since it should never store user-specific information in the bean itself, so it is safe for container to assume the bean is poolable.
Hi, currently the SCEA is using EJB 1.2, but currently I am learning EJB 2.0 since I think it is better to learn spec 2.0 rather than 1.2 which will not be used per August 2002.
If I only learn EJB spec 2.0 and completely ignore spec 1.2, will I have any difficulties taking exam part 1?
Other than Message-Driven bean, can somebody note the differences between spec 2.0 from spec 1.2?
Thanks!
After waiting not even 3 weeks (fast!!), I got my SCJD result: 143/155 ...
Thanks everyone, and good luck for those still take the exams ..
General Considerations: Max=58 Deductions=0 Actual=58
Documentation: Max=20 Deductions=3 Actual=17
GUI: Max=24 Deductions=9 Actual=15
Server: Maximum=53 Deductions=0 Actual=53
Maximum Total=155 Deduction Total=12 Certification Score=143
I got most the deduction from GUI... I quite surprise for that since I have tried hard to design the GUI as useful as possible (FYI, I got Flight By Night SCJD project) ... Anyway, I am happy with the score.
18 years ago
Hi!
I am getting curious ... from your point of distribution:
Class Diagram (44 Maximum) .......................... 44
Component Diagram (44 maximum) ...................... 44
Sequence/Colloboration Diagrams (12 maximum) ........ 12
All are about diagrams? There is nothing about code or documentation?
Sorry, I just finished with my SCJD2, and it was all about programming and documentation. Now, after reading your post it seems that SCEA part II doesn't involve java code at all. Or, I miss something here? But, if there is coding involved, I want to know what EJB server you use, and do you upload the container's deployment descriptor too.
Thanks!