Win a copy of Spring Boot in Practice this week in the Spring forum!

# Alex Pisarev

Ranch Hand
since Apr 10, 2002
Cows and Likes
Cows
0
In last 30 days
0
Total given
0
Likes
0
0
Total given
0
Given in last 30 days
0
Scavenger Hunt
Ranch Hand Scavenger Hunt
Greenhorn Scavenger Hunt

## Recent posts by Alex Pisarev

Can someone give physical elaborations why the ground speed of the airplane will be zero?
Basically, the only force which over reacts the force of plane engine is the force of friction between wheel axles and wheels themselves.
Considering the fact, that such friction is intended to be minimal (usually, there is some oil between axles and wheels), it may be implied that the powerful plane engine will finally cause the plane to move without taking into consideration the wheel rotation factors - on some stage the wheel angular speed will be slower then actual plane movement speed.
Alex
19 years ago

Originally posted by Simon Lee:
erm, of course. the plane gains _air speed_ thru the jet/props not ground speed. qed

What about friction then? I reckon the friction between axles and the wheels will compensate all the engine power.
Alex
19 years ago
Here is an interesting problem to stimulate your grey cells.
We have an air plane (doesn't matter jet or propeller-powered) parked on a runaway. The runaway has a special system which allows the runaway to move backwards when the plane moves forward - the runaway linear speed is changed instantly in order to fully correspond to the angular speed of airplane wheels' on a chassis - when airplane wheel rotates once, the runaways moves backward on pi*Diameter of the wheel meters backwards.
Will the plane be able to take off from this kind of runaway?
19 years ago

Originally posted by Andrew Perepelytsya:
I suppose, you cannot even guarantee the consistent behaviour when MAX pool size is reached. Some containers may stretch the limit a bit, some (most, I would say) will serialize the access to the beans.
Let's say, what happens if we have MAX set to 2 for SFSB, and there is a third and fourth incoming client connection? Should the container throw the RemoteException? Doubtful.

I think for SLSB each client will get the same copy of bean simultaneously.
19 years ago

Originally posted by Andrew Perepelytsya:
JDBC extensions (of which DataSource is, perhaps, the most renowned) was a must since EJB 1.1. Please, consult the specification, section C.2.5, page 542.

Okay, I trust your words, just because I don't remember the spec by heart (last time I opened it was half a year ago or so) and don't have access to spec from this machine to look it up.

I think the way it is stated in the answers (never 'add' anything from yourself on the exam, you know it), involves a bit more than just dirty reads problem. While the behaviour you described may be compulsory, it tells us about transactional behaviour, and not memory management improvements (optional).

Well, in that case you're right with both answers. If JDBC extensions didn't mislead me at the beginning, I'd had rejected this answer as I initially wanted to.
Another point to testify that it will be better for myself to read the spec once more before taking an exam.
19 years ago
We have a Stateless Session Bean defined and minimum/maximum pool size variables in the container is set to 1. Which of the two is true?
1) The bean instance could be used as a Singleton - each time we request a new bean we will get the same instance.
2) The bean instance can't be used as a Singleton - the EJB spec does not guarantee that the pool will not be cleared and bean instance re-created at some stage.
/Alex
19 years ago
<QB><QUOTE>
Andrew Perepelitsa wrote:
D - DataSource interface is heavily utilised in today's J2EE applications. It's part of jdbc extensions package.
</QB></QUOTE>
But does it mean that it's guaranteed capability of EJB 2.0 spec (EJB 2.0 spec !=J2EE 1.3 spec)? I will kindly disagree.
<QB><QUOTE>
B, E - container optimisations, which are not prescribed for implementing by containers and which are set-up in a vendor-specific way.
</QB></QUOTE>
Concerning B. May be I am wrong, but as far as I remember (don't have spec on this machine to look it up), the containers are required to process transactions in a three different ways (A, B and C - Jboss has D). So, when we have the case with shared databases (was it case B?), cache should be updated with every transaction and the containers are advised to provide optimal methods to detect which parts of cache to update. However, may be I am misleaded somehow, but in that case the question will have only one right answer.
19 years ago

Originally posted by Bert Bates:
A little practice:
(Remember, this won't be an open-book test.)

Okay, answering from my memory then. May be incorrect, but at least I have an opinion.

1 Which two are guaranteed capabilities of EJB 2.0?
a). Local home interfaces for messages driven beans.

There is no need for local interfaces for MDBs as long as they are asynchronius.

b). Dirty detection mechanisms to reduce memory footprints.

This one is a correct answer No. 1

c). Run-as security identity functionality.

d). The JDBC 2.0 extension.

No, JDBC 2.0 is a standard spec and should not be extended by anyone.

e). Read only CMP entity beans.

It's not part of a spec, however, few containers allow you to do read-only CMPs.

2 Which API is NOT guaranteed to be supported by EJB 2.0 containers?

a). JAXP
b). JNDI
c). JXTA
d). JDBC
e). JMS

JXTA is not guaranteed. However, you should make clear distinction between EJB 2.0 containers and J2EE 1.3 containers. By the way, JDBC is not a part of J2EE as well, it's part of J2SE.

3 When programming business methods, which technique should be avoided to ensure bean portability across all EJB 2.0 containers?
a). Using the java.net.Socket class.
b). Using inner classes.
c). Using the 'final' modifier for fields.
d). Passing 'this' as an argument.

d) - one should reference bean context instead.

4 Which two are typically responsible for creating ejb-jar files? (Choose two.)
a). The bean provider.
b). The application assembler.
c). The deployer.

b) and c) as far as I remember

5 Which two must be included in every ejb-jar file? (Choose two.)
a). Stubs for the EJBHome and EJBObject interface.
b). The JAR Manifest file.
c). A deployment descriptor.
d). The JNDI context.
e). The EJB's home interface.

c) and e) (if under EJB's home interface you mean a tag that allows you to specify it).
Alex
19 years ago

Originally posted by ssachu:
Hi all ,
i have to define architecture for one of my project .
oracle database distributed geographically .
requirement is to access these distributed db on WAN and process data for generating report for user .
q: do i need to consider one weblogic server in each station
q: rmi iiop is better or Soap on http is better ?
q: RMI is possible ?
performance and database access will be a bottleneck if architecture not defined well .
so pls share ur ideas and experiences and documents !!
many thanks
sachit :roll:

Hi, Sachit!
Firstly, I don't have a clear picture upon organization of your WAN network. I don't see any need for an expensive Weblogic server in every location - I think that Weblogic is needed only at the central location and it could be used for actual processing of the data you received from the remote locations.
If you have HTTP protocol as the only mean of for communication between your sites, you have the following options:
1. Servlet container (i.e. Tomcat) using servlets to access the database data via JDBC and sending the database data back in XML format - slow and inefficient way, the use of Web Services would be a better alternative.
2. Apache Axis Web Services server (or any other) that provides Web Services to access database through JDBC. More elegant solution than the first one, however, still too slow and time-consuming in comparison with IIOP/JRMP solutions described below.
In case, if you have an opportunity to use JRMP or IIOP you have the following options here:
1. JavaIDL CORBA applications on a remote locations that communicate with database via JDBC and are accessible through IIOP.
2. RMI/JRMP Java applications on a remote locations communicating with database via JDBC and are accessible through JRMP.
3. RMI/IIOP Java applications on a client side communications with database via RMI and are accessible via IIOP.
If you plan to stick with Java all the time, I think option number 2 could be the best and faster solution for you. However, it will require more coding that option 3, so it could be more time consuming and expensive.
You could use option 1 if your application would require some of the features that IIOP has over JRMP or you're planning to switch from Java to something else (i.e. because of performance considerations) in the near future - so it's the most extensible/maintainable option.
You would require an application server on a remote locations to use option 3, but you can use free JBoss in that case. This will be the most effective option - you'll get a chance to make anything you want without pretty much headache. In that case you'll be able to develop the most extensible, maintainable, secure and fast solution. However, it could require some additional time time to develop it - but you'll never regret, believe me.
Option number 4 will require additional security expenses and is an example of tight coupling that is no good for a good n-tier application. However, it's one of the most straighforward and cheap options you can afford, plus you will become more dependable on your database implementation than in the options mentioned above.
Alternatively, you could directly retreive the information from your database via HTTP protocol in XML format (Oracle supports that) - the same as a previous option, but more slower.
I afraid, that the best decision could be made only after detailed reviewal of your system's WAN infrastructure, after receiving the information about nature, structure, volume of the data your will retreive from the database, your project budget, the team you have and many other criterias. It's impossible to make such a decisions without all that information.
Alex
19 years ago

Sanjay,
First of all thank you for the SCEA@Whiz mock exam! I learnt many important points for the actual exam and I feel better and better prepared with each day!
So in this question what exactly is being asked of me:
1. Is it good idea to use DAO with Stateful Session Beans
OR
2. Is it good idea to access data from Stateful Session Beans
Seid

I think the first one, but I'll repeat again - it fully depends on your architecture.
Alex
19 years ago

Originally posted by Gabriel Fox:
If an enterprise web application has some of its sub systems fully implemented . What questions
should be considered when thinking of extending the functionality of the System by adding(plugging) a subsystem.
Please , all ideas are welcomed ...

Development of framework that supports easy component integration. Something like JCA?
Alex
19 years ago

Originally posted by Mila Donkova:
Hi Alex,
I don't think SCEA certification loses its prestige.
I am ashamed to say I am doing my project more than 6 months already but I am getting new knowledges every day and it makes me happy. When I started the project I thougth it would take not more than 2-3 weeks to finish it.
All this time I followed this forum discussions. I really enjoyed your and Gennady Shapiro threads and found that you are very smart and competent individual. I think your OOAD knowledge and experience deserve the highest mark as well as your writing and polemic skills. Starting your
own business is very doubtful thing. Wasting time waiting while someone entrust you really great project is difficult for you too.
Do what you really like!
I would suggest to become some of the guys who writes the books for us like Mr. Fowler, Mr. Ambler, or Mr. Cade.
I feel you could succeed on this field.

Hi Mila,
Thanks for the warm worlds - they're really helpful at this cool and nasty day we have here in Dublin today.
I appreciate your idea of becoming a writer, however, I still think I don't have enough practical experience to write books - probably, I don't have something unique in my mind to write about and I don't want to repeat others. However, it will be very interesting for me to develop courses - I always liked to share the knowledge with others.
Well, probably the time will solve that problem, but for now, I'll try to start up. At least I would get a chance to make several steps towards my future MBA.
Alex
19 years ago

Originally posted by Byron Estes:
Connection based.
Converstational state between request/responses is not maintained, but a socket connection is established between the client and the server for communication.
Therefore it is connection based, but conversationally stateless.
Regards,

Confirming. All TCP protocols are connection based. All UDP ones are connectionless. HTTP is stateless connection based protocol.
Alex
19 years ago

Does anyone use this
feature for their final html documentation and yet pass the exam ?

I assure you that SCEA exam is not a matter of UML tools preferrings.

I understand that we need to generate in general the following uml
diagram ,
1 x class diagram
1 x component diagram
4 x sequence diagram (since 4 use cases)

I would like the level of details required for each diagram.
Do we need to show the following ?
1) EJB home, remote and implementation bean class

As you wish, but if I were you I would show only bean classes.

2) Show any class method/attribute ? (I think instruction say
otherwise)

You can show methods/attributes for some of the most important classes for better picture if you want.

3) Show any kind of design pattern, like Observer, proxy , delegation
pattern ?

Well, I would say that you "explain" the patterns you used in your architecture document. You show them as well, but don't forget to point out which pattern you used where.

4) Show JSP, Servlet implemention class ? and how they linked

Well, I bet the component diagram will the best place to show your JSP/servlet/EJB relationships.

5) Can we show UI implementation package instead of class ? Since
there may a lot of class for UI, showing package encapsulate those
class ?

I don't think there is need of showing UI classes on your main class diagram - it should be just an extension of the domain model, not all system classes. However, you can show UI classes on an additional class diagram if you want.

6) How to we model the transmaster API,Do we just show this
transmaster as a class or a package ?? Though I think package is a
better show...

Transmaster is an organization, isn't it? You just point out the class that responsible for communication with Transmaster, that will be enough.

7) How do the transmaster API spec affected the architecture ??

Well, you would need to decide how your system will deal with XML-RPC.

1)
FBN has a frequent flyer mileage system that has a web interface
bind by Perl, html, cgi and oracle database that is not accessible
to travel agent and customer. Does that imply the system is using a
intranet/extranet ?

I bet it's intranet.

Does all travel agents reside in FBN single building only ? Or that
FBN travel agent is scattered around the country but each of them
are given a 3270 terminal to hook up with information system of
FBN ? and given a pc running a graphical browser to access mileage
system ?

I assume that they are scattered around the country. I assume that they have VPN connections with the central office. I assume that you can open any firewall port you want. I presume that you're thinking about Web Services to push in here, aren't you? Forget it man, not the right case.

3)
What is exactly itinerary stand for ?

Your flight schedule with some additional information on aircraft types/meals/type of seats, etc.

4)
The assignment mention that Transmaster has commited to have their
site available 99.99%. What does it mean by 'their site' ??
I though what they have is just API not website where they process
credit card ??

They don't imply "WEBSITE". They imply just remote host. You send the XML-RPC requests to the
remote host and get information back. I assume they have VPN between Transmaster and FlightByNight networks.

5) The following question is derived from the business domain model.
How does a customer related to itinerary ?

The customer HAS itinerary.

and what exactly is segment ? and its
relationship with flight ?

Well, it was kind of hot discussions a couple of months before regarding to segment vs flight. You could look at it if you want to get some elaborations on this subject. For me, it's the quite the same, you just need to decide which entity will carry information on your seats and aircraft types.

How is it that equipment is linked with the seats

Plane (equipment) HAS seats. Seats ARE of different classes.

No problemo, amigo.
Alex
19 years ago

Originally posted by Rufus Bugleweed:
I agree with you. DAO is to decouple the application from the data source.
One problem I could see would be the stateful bean holding a reference to the DAO. That's a memory leak isn't it?

I afraid that we could need some more elaborations here.
DAO is originally a Microsoft term, I propose to stick with Floyd Marinescu's DTO definition. Although Sun uses DAO term, I think it's a bit confusing.
DTO can be used with any beans you want - as Rufus said it's just decouples your data manipulation methods from your business methods.
I can't see any objections of calling DTO from stateful bean - DTO usually doesn't hold any state (however, you could erect some cache on top of it and develop it up to a complex framework - but it would not be old-is-gold DTO anymore, wouldn't it?). The point is that it's not so easy to find a case when you would have a certain need of using DTO with your statefuls - so in most cases the use of DTO with statefuls could be considered as an architecture drawback. That's my 2 cents.
Alex
19 years ago