This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!

Iyn Shri

Greenhorn
+ Follow
since Apr 20, 2001
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 Iyn Shri

Hi all,
Can someone give me answers for the following qtns? Will be good if we can discuss..
(1) Which are true about session beans?
A. A client can pass a remote home object reference to another application.
B. The javax.ejb.EJBMetaData interface is intended to allow application assembly
tools to discover information about the session bean, and to allow loose
client/server binding and client-side scripting.
C. The javax.ejb.EJBLocalHome interface defines the method create() which returns
javax.ejb.EJBLocalObject.
D. The javax.ejb.EJBLocalHome interface defines the method remove(Object primaryKey)
which returns null.
(2) Consider the following session bean class:
import javax.ejb.*;
import javax.naming.*;
import javax.sql.*;
import javax.jms.*;
public class MySessionBean implements SessionBean {
private SessionContext sessionContext;
private Context jndiContext;
private Queue queue;
private UserDefinedClass userDefinedClass;
public void ejbCreate() {
try {
queue = (Queue) jndiContext.lookup("java:comp/env/jms/StockQueue");
} catch (NamingException ne) {
throw new EJBException(ne);
}
userDefinedClass = new UserDefinedClass();
}
public void ejbRemove() {...}
public void ejbActivate() {...}
public void ejbPassivate() {...}
public void setSessionContext(SessionContext sessionContext) {
this.sessionContext = sessionContext;
try {
jndiContext = new InitialContext();
} catch (NamingException ne) {
throw new EJBException(ne);
}
}
public class UserDefinedClass {
String dummy;
private DataSource dataSource;
public UserDefinedClass() {
try {
dataSource = (DataSource) jndiContext.lookup(
"java:comp/env/jdbc/MyDB");
} catch (NamingException ne) {
throw new EJBException(ne);
}
}
}
}
Which of the following are true about the conversational state?
A. The state of the variable sessionContext is kept after passivation/activation.
B. The state of the variable jndiContext is kept after passivation/activation.
C. The state of the variable queue is kept after passivation/activation.
D. The state of the variable userDefinedClass is kept after passivation/activation.
E. The container must be able to properly save and restore the reference to the
home and component interfaces of the EJBs stored in the instance��s
state even if the classes that implement the object references are not
serializable.
F. The container may use the object replacement technique
(java.io.ObjectOutputStream/ObjectInputStream) to externalize the home and
component references.
(3) Which are true about session beans? (Choose all that apply)
A. An attempt to remove a session object while the object is in a transaction will
cause the container to throw the IllegalStateException to the client.
B. A session bean class must not implement the session bean's component interface.
C. A session bean class must not implement the ejbCreate() method.
D. The business methods of a session bean must not be declared as final or static.
E. The remote interface methods must not expose the managed collection classes
that are used for CMP entity beans as arguments or results.
(4) Given a CMP entity bean, which of the following statements are correct?
(Choose all that apply)
A. All the exceptions defined in the throws clause of the method of the remote interface
must be defined in the throws clause of the matching method of the enterprise Bean class.
B. The ejbSelect<METHOD>(...) must not be declared as static or abstract.
C. The ejbHome<METHOD>(...) can be declared as final.
D. The return value type of a business method of an entity bean class could be of MyClass defined
as follows:
public class MyClass {
public int result;
public int getResult() { return result; }
public void setResult(int result) { this.result = result; }
}
E. The throws clause of an ejbPostCreate<METHOD>(...) may define
arbitrary application specific exceptions including javax.ejb.CreateException.
F. The bean provider must always define a query for each finder method in the deployment descriptor.
(5) Which of these is/are correct about exception? (Choose all that apply)
A. When a RemoveException is thrown from the ejbRemove() method of an entity bean
where the corresponding remove() method has CMT attribute Mandatory,
the client will receive this RemoveException.
B. If the Container denies a client access to a business method, the client will
receive RemoteException or EJBException.
C. When a NoSuchObjectException is thrown from an ejbHome<METHOD>(...) method of an entity bean
where the corresponding home method has CMT attribute RequiresNew,
the client's transaction if any must be marked for rollback.
D. When a system exception is thrown from the onMessage() method of a MDB
with BMT, any transaction that has been started, but not yet completed, by the instance
must be marked for rollback.
(6) Which are true about EJB environment? (Choose all that apply)
A. A resource manager connection factory reference is scoped to the EJB whose declaration
contains the resource-ref element.
B. By default, connections to a resource manager are shareable across other EJBs
in the application that use the same resource in the same transaction context.
C. The Deployer must ensure that all the declared resource environment references are bound to
administered objects that exist in the operational environment. The Deployer may use, for
example, the JNDI LinkRef mechanism to create a symbolic link to the actual JNDI name of
the target object.
D. The Deployer should be able to customize an EJB's business logic.
(7) Which is/are true about security responsibilities? (Choose all that apply)
A. The Deployer is responsible for configuring principal mapping for inter-EJB calls.
The management of caller principals passed on inter-EJB invocations is set up
by the Deployer and System Administrator.
B. Security roles are defined by the Bean Provider in the deployment descriptor.
C. The EJB Container can, but is not required to, provide support for multiple
security domains, and/or multiple principal realms.
D. If the client is in a different security domain than the target enterprise
bean, the system administrator is responsible for mapping the principals used by
the client to the principals defined for the enterprise bean.
(8) Which is/are true about ejb security? (Choose all that apply)
A. If the security infrastructure performs principal mapping, the
getCallerPrincipal() method must return the original caller principal.
B. If the run-as security identity is set up for the bean, its method getCallerPrincipal()
returns the principal that corresponds to the run-as security identity.
C. If transactional requests within a single transaction arrive from multiple clients, all requests
within the same transaction must be allowed to be associated with different security context.
D. The Container must allow multiple-deployed enterprise beans to co-exist at runtime.
Hi,
Has anyone created a chat application using JMF ? I am trying to create one. I want to use it in real time. Just wanted to know where can I upload the application once created.
Also are there any good resources on creating a voice chat application ?
Pls someone reply. There seems be no replies for a long time.
Thanks in advance
[ September 18, 2002: Message edited by: Iyn Shri ]
19 years ago
Congrats Carlos !!
19 years ago
Hi,
Cleared SCEA II & III with 78%
Following is the break up:
Class Diagram (44 (maximum) .. 30
Component Diagram (44 maximum) .. 38 Sequence/Collaboration Diagrams(12 maximum).. 10
I don't know where i went wrong. Sun unfortunately does not give any info about this.
Referred following books:
Core J2EE patterns
UML distilled
Enterprise Java with UML - C.T.Arrington
Thanks to the group.
Cheers
[ September 19, 2002: Message edited by: Iyn Shri ]
19 years ago
Hi,
Any Help pls !!
19 years ago
Hi all,
I am trying to create a voice chat application using JMF. I wish to use this live in the Internet to chat. Can anyone please let me know where i can upload the application and use it.
vidya
19 years ago
Hi guys,

Thanks for the reply.. But can u tell me where can i download only JDK1.4 if not the cobundle... i searched in java.sun.com and it gives me the cobundle.. where did u get the size of JDK1.4 ??
Also can u tell whether the IDE Forte is good ??
Vidya
Hello,
The size of the JDK1.3 was app 40 MB and J2SDK 1.4 is app 86 MB.. and its written as 'SunTM ONE Studio 4, Community Edition (formerly ForteTM for JavaTM 4, Community Edition) - J2SETM v1.4.0 Cobundle' Does this mean the J2SDK 1.4.0 is along with an IDE (Forte)... it also includes webstart... is the drastic rise in the size of J2SDK 1.4.0 becoz of forte and webstart ?? or is there any other download which has only J2SDK1.4.0 and not the IDE so that we can use any other IDE ??
Vidya
Hi...
Ye second option is fine.. just create separate diag for Login & create profile and include notes in the seq saying that the login/create profile is executed
Hope this helps..
Vidya
Hi...
That's more than enough ....
Best of Luck
Vidya
Hi ruilin...
Even I had the same doubt... but I just wanted to know which seq is good...
Bussinessdelegate --- Session facade -- Service Locator...
Vidya
Hi...
Should we show the required patterns such as presentation tiers, Bussinees & Integrations (Front Controller, View Helper, Bussiness delegate, service Locator, Session facade, DAo, VO) in the seq diag.. or should we should we show these patterns only in the class diag... How is it ?? I am just planning to include the patterns session facade, DAO, VO (wherever needed) in the seq diag but make the class diag more elaborate by using the other patterns... Am I right ??? It is true that we need not spend much time in the seq diag.. but since I don't know how detailed it should most of my time is spent on it.. still I am not thru with it... Would really appreciate if anyone can throw some light on this... will help me to move forward....
Thanks,
Vidya
Hi paul...
Can u pls tell me what's yr approach ? According to what I know u just need to identify the classes... then design the seq diag using those objects and then design the class diag from the seq diag... I think class diag will be more detailed than the seq diag in the sense u may have more classes in the class diag...
Correct me if I am wrong...
Cheers..
Vidya
Hi arrington...
Yr hotmail id does'nt seem to function !!!
Vidya
Hi all...
How detailed should be the sequence diagrams ?? Should we show the Bussiness tier patterns, presentation tier patterns in the sequence diagrams.. becoz I know that we need to identify the objects first, draw the sequence diagrams and draw the class diagrams from the sequence diagrams... we need to show the patterns in the class diag... so should we show the Value objects, facade, DAo and stuff in sequence diag also... if yes then the seq diag will be very detailed... Stuck on this !!!