Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

Rajiv Shr

Ranch Hand
+ Follow
since Aug 11, 2010
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 Rajiv Shr

But, our application is running 24x7. If we turn GC off at some point, and if there is any issue any time after that, then we will not be able to analyze.

So, Sun does not provide any way of rolling over and archiving the gc log file?
7 years ago
Hi,

I am using Sun JVM garbage collection logging to find out the performance of my application. Below are the parameters that I have lined up in my apache tomcat server's setenv.sh file


export CATALINA_OPTS="-server -Xms512m -Xmx1536m -XX:MaxPermSize=150m -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -Xloggc:/var/tom8080/logs/gclog.txt"

The problem we are facing is that the gclog.txt is growing huge and eating up 50% of the space on the server. And still growing.

Is there a way to roll over that file and archive it in an automated fashion, similar to how you would do it for a log4j controlled file ?
7 years ago
I resolved the issue guys. Basically, we have a Tomcat home instance deployed on our linux box and multiple base instances. For some reason, tomcat was not reading the web.xml from the conf folder of the home installation. I had to copy the web.xml from the {catalina.home}/conf folder to the {catalina.base}/conf folder. The web.xml has the mappings for the default servlet/jsps. Once I restarted the server after that, things worked fine.
7 years ago
Hi guys

I have deployed a web application in my tomcat server, and I see that the application is up and running as I am able to make SOAP requests to my application api endpoints and get a proper SOAP response. However, I am unable to access any pages under the application folder.

When I type this in the URL - http://<hostname>:<port>/myapplication/index.html or http://<hostname>:<port>/myapplication/mypage.jsp , I am not able to access it. It gives me a 404 error saying that - The requested resource () is not available.

I can see that the WAR file has exploded under the webapps with all the required files in it, and my application is running as well. But I also want to access the mypage.jsp under my application folder to bring up my app admin console, which I am not able to do at the moment.

Any ideas?
7 years ago
You dont need to use Service Locator if you are using Dependency Injection. Both do the same thing ie hiding the complexity of the lookup, and they both do it differently. You should use one or the other, not both. Read this article - http://martinfowler.com/articles/injection.html#ServiceLocatorVsDependencyInjection

For your follow-up question, yes, you can use Business Delegate as a separation between the presentation and business layer. There are different opinions on where to show the business delegate component in the Component diagram in part 2. I showed it in the presentation layer.

- Rajiv
Wang,

You can use the Interaction Occurence element ("ref" element) to include one sequence diagram into another. This way you can have separate diagrams for 2 use cases, and include one in the other.

More details here - http://www.ibm.com/developerworks/rational/library/3101.html
Refer to this section in the link above - "Referencing another sequence diagram"

- Rajiv
Wang,

Since this is an exam question, not sure if someone can answer this completely without doing part of the assignment for you. So let me give you this hint - Yes, your question is correct. I had the same doubt as I got the same assignment. You are the architect. There is a design assumptions section allowed in the assignment, where you can state why are you are doing things a certain way. Use it

- Rajiv
It may have been dependent on the tool used to create the diagrams. Dont worry about that. If your design has synchronous messages, then indicate it using the appropriate arrows. Same goes for asynchronous. The rectangular bar on the object's lifeline will change accordingly. Thats the most important visual indicator. I think thats all that matters.
Speaking from my own experience in Part 2, I changed the cardinality in 2 places. I wrote a detailed paragraph justifying my decision in the Design Assumptions section at the top.

Few days later I passed.

I think the only rule is that you should not neglect any BDM objects completely. You can add/modify/replace, but dont eliminate them completely.

Bottom line - Like Andrew said, you are the architect. If you feel that there is something that can be done better, then do it and justify your decision. There is no skill required in copying something 1:1. Even my manager can do that
If the complete business logic is being provided by an external system, and the assignment only wants you to focus on presentation, then I dont really see a need of using EJBs. You may still want to consider some other performance and scalibility aspects in your design. For example, besides transactions, EJBs (Stateless Session Beans) are useful as pooled resources. Object pooling is very useful to design and develop scalable real world applications. Companies that dont use EJBs may use some other framework like Spring to provide similar functionality.
I used MDBs in part 2 to send different kinds of notification to users. I showed the MDBs in the class diagram with a <<use>> relationship between the manager class (that puts the message in the queue) and the MDB that listens to the queue. I dont think you need to show the queues anywhere as when you use MDB it is obvious that there would be a corresponding queue to listen to.
Xin, yes, the problem is with Prometric. Prometric needs to send the essay to Sun. I am not sure why there is a delay or why they dont respond to your queries on the situation.
For me, it took around 1 month for Prometric to send the essay to Sun. I was in touch with Sun's OCP Team on the same email address that you use to submit the assignment (architect-submit_US@oracle.com). I would recommend sending an email to Sun every 10 days politely asking for an update.
Here is what I did for Part 1
http://www.coderanch.com/t/508520/java-Architect-SCEA/certification/Cleared-SCEA-Pt

For Part 2, Cade's book gives a very clear picture of what is expected. I didnt study anything else for Part 2, as I have some realworld experience designing applications at work.

For Part 3, there is no studying required. If you completed part 2 on your own, then you already know the rationale for your decisions. Search this forum on what kind of questions to expect for part 3. There was some good post about it in the past.
If the engine is used in other classes as well - like Bus, aeroplane etc Then it is an aggregation. If the engine can only be associated with the Car class, and Car is responsible for instantiating/destroying the engine instance, then it is composition.

jack fe wrote:
1. do we need to point out the direction(bi or uni) for association or it is not important?


I feel you need to. The direction may be obvious based on which class has an instance of which class, but if you know the association direction at design time, then why not point it out.

jack fe wrote:
2. If I want to draw the relation for robot, parts, handpart, footpart, bodypart, headpart.robot and parts should be aggregation or composition relationship?


Composition is a strong form of aggregation. Composition is used when your constituent classes cannot exist without the parent composite class, and only the parent class is responsible for instantiating them. In my case, I had used composition, when I had to represent different Part Types. Since individual part types needed a parent composite class to tie the part type, part category and part property instance together, I used composition. In your case I think, if the parts only make sense when associated with a robot, then use composition, else use aggregation.

jack fe wrote:
3. manage session bean and entity bean should be dependency or association relationship?


What I have learnt is that dependency is used when you want to pass the instance of your class as a method argument to the method in another class. In case of a managed session bean and entity bean, I think you can show an association relationship.

Having said that, these are small things, and losing 15 marks might not be solely due to this. You can check if
-- You have not discarded any classes from the BDM
-- You have mentioned the multiplicity properly.
-- You are showing other classes at the front end as well to give an end to end picture. Please refer to the Cade/Sheil book.
-- If you feel the need to change anything in BDM, then you should provide a detailed justification in the Design Assumptions section.

Hope this helps.