Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Rob Mech

Ranch Hand
+ Follow
since Apr 05, 2007
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 Rob Mech

I'm interested in some feedback. While I'm working on reviewing section 7 based on the Beta exam in preparation for it's release I've decided to put together my own study page for section 7. The reason being is that it's good practice drawing uml, reviewing patterns etc. As an excercise for me it may be of benefit to others.

I'd like in the end here to have something a programmer or engineer going for the SCEA might review. I'm open to feedback on this so please let me know if this has value. I only have 2 patterns in so far, but plan to continue this if nothing more than for my own work.

http://www.mechsoftware.com/SCEA5_Design_Pattern_St.html

Originally posted by Jay Banerjee:
I have more than 6 years exp. in java. I am working on J2EE technologies. I work on EJB,JSP,Servlet. I don't have SCJP. Now I work as a TL.

Now my question is should I go for SCEA directly? Is there any problem not having java certification (eg. SCJP) . But I have knowledge.



Jay, I originally had a very similar background. I'm presuming you're referring to Technical Lead (TL). I lead many projects myself and obtained my SCJP first. If nothing else myself (like others) found many subtle things on the exam that separate you from the crowd. I think if nothing else it has prepared me to begin the work on my SCEA. While the two tests are completely unrelated it gave me at least the reward of success as well as a foundation from where to start.

The SCEA doesn't require the SCJP as it focuses on design rather than programming. I know that while I continue to study for the exam (and I'm waiting for the Version 5) I've cracked open all my design pattern books from long ago. Those books are centered around programming along with Class Diagrams in UML and general OOAD.

So you really have to answer the question for yourself. If you spend all day doing UML, designing systems and using design patterns in JEE then you might want to skip the SCJP. If like myself, you are a software engineer who codes, designs, and develops then you might want the SCJP first.

I know I don't regret getting my SCJP first, in fact I'm glad as it's prepared me for other Sun Exams. I've had many people tell me that they've never met a Java Engineer that knew as much either. I often say that most of it I needed for the exam. So there is value in it, but your own career path and experience need to determine which road to choose.

- Rob
Im looking to find out how much UML syntax compliance plays into the exam.

Everything i've read regarding UML and the visibility always shows a +,-,#,~ for visibility notation (at least in print, e.g. UML Distilled). I completely understand why an ASCII character would be used in lieu of trying to specify a graphic. However every UML 2.x tool i've tested out seems to use some graphic instead. Now I've scanned through the UML spec which which states

Concrete syntax compliance. For a given compliance level, this entails:
� Compliance to the notation defined in the �Notation� sub clauses in this specification for those metamodel
elements that are defined as part of the merged metamodel for that compliance level and, by implication, the
diagram types in which those elements may appear. And, optionally:
� the ability to output diagrams and to read in diagrams based on the XMI schema defined by the Diagram
Interchange specification for notation at that level. This option requires abstract syntax and concrete syntax
compliance.



which to me would say that anything other than the ascii characters is non-normative.

Alright, so if it's non normative how important is this to the test? The testing guidelines simply say UML, which doesnt mean UML 1.x or 2.x. There are quite a few UML tools that work within eclipse that i'd like to use but they dont seem to "comply".

Is the UML portion of the test very vague?
Im in the process of converting some servlets over to EJB3 webservices. The process has been pretty painless and I've been very pleased with the results thus far. The only problem I ran into was with regards to deploying out the EJB jar file.

I use eclipse and I put together a simple EJB jar file but it never included the libraries that went with the EJB. I'm guessing here that an EJB jar cannot include the other library JAR files. I'm ok with that and ended up placing the library files into the \glassfish\lib directory.

Now I gotta think that's not the right spot for them. I'm thinking what I need to do is assemble an EAR file for this. Is this the correct approach here?

So while I have this working I'd prefer to use the standard method for including these resource libraries. Somone point me in the right direciton?
I'm new to EJB3 and I'm having a hard time grasping how the client knows which server to go to. Right now it appears to only go to localhost which would the default I imagine.

From the EJB3 apress book it has



Now from the API it says

JNDI determines each property's value by merging the values from the following two sources, in order:

The first occurrence of the property from the constructor's environment parameter and (for appropriate properties) the applet parameters and system properties.
The application resource files (jndi.properties).

I'm presuming that the jdni.properties would then contain the remote server name?

Am I on the right track here? Where would the jdni.properties go that would be appropriate and where would i get more info on the key/value for it.

Just looking for a nudge in the right direciton.
[ December 30, 2007: Message edited by: Rob Mech ]
Try building the servlet as I described and I'm sure you'll find out!
13 years ago
I was eventually able to get it to work. While the servlet api did have the method listed in it there was a change to web.xml that also had to be made.

[Edit: not-so-nice comment removed. Even if you do not agree with the approach being taken to try and help you answer your questions, please try to keep your tone civil.]
[ August 24, 2007: Message edited by: Bear Bibeault ]
13 years ago

Originally posted by Bear Bibeault:


There is nothing unfriendly about teaching a man how to fish. JavaRanch is primarily a learing site -- not someplace to just get an answer without understanding. You will much more often be led down a path of discovery rather than given a code snippet.

There's a big difference between "do it yourself" and "here's a clue to help you find out the answer to this, as well as similar questions in the future".



Agreed, but you dont show a person an ocean and say there it is either. I'd of been fine with the method of the api without the code snippet. Either way I'll find what I need elsewhere.
13 years ago

Originally posted by Bear Bibeault:
There are plenty of other methods on the request. Why not write a servlet that shows you what each returns?



Yeah, guess I could do that but then why did I bother posting a question on the friendly site for greenhorns. Seems pointless to ask a question to be told find it yourself.
13 years ago

Originally posted by David O'Meara:
Yep, check the API for the other information available from the request, it's all there
(I'd give you the answer, but it isn't difficult and I think the time spent wandering the API is valuable )



Well I've done that already hense my post. I thought it had something to do with getContextPath but I wasnt sure how to apply that to the servlet itself. Hense my post.

Are you suggesting that getContextPath for the above URL would return everything after the servlet name? If so that's hardly clear from the API documentation for getContextPath.
13 years ago
I'd like to pull of a directory path to use that for parameters. Let me give an example


Servlet named "NewsInfo"

www.mysite.com/NewsInfo/Local/60146/

Basically I want to pull off the "Local" as a parameter and "60146" as a parameter. I don't want this to be a traditional parameter since many search engines rip off everything after the ? on a spider.

Any way to do this with a servlet or other J2EE technology?
13 years ago
Hopefully this is a no-brainer for somone. I have some data that I'd prefer to read in with the Scanner class. I have to break up this data and scanner works perfectly for it.

My problem is that the data contains no CRLF (or any other line break character).

For example:

ABCD123~ABC484848~23423423~

That might be an example line however it's HUGE (2-3 MB files). When I input this into the scanner and just use the ~ as a delimiter it runs out of Heap space.

I'd like to gracefully parse through this preferably using "next".

I've thought about just using a more "low level" read and replacing the ~ with a ~(CRLF) and then re-opening the stream but I'd prefer to make it more efficient.

Suggestions?
13 years ago
Thanks all, exactly what I needed!
13 years ago
Can somone point me in the right direction (preferably with some sample code) to basically load a class at runtime. I'm thinking that ClassLoader is what I want but from what I saw in the API spec it doesnt seem clear how to do this from a file.

I do *NOT* want to do this with EJB. I want a very simple process by which I can specify a filename and do something like

Animal = new loadClass(new File("someanimal.class"));

I realize I totally oversimplified this but basically I want to load up a a lass by filename at runtime. No EJB, no security just very simple load process at runtime.

If anyone can just point me in the right direction I can get it from there.

Thanks everyone.
13 years ago
Wow, first time I didn't get a response on my question at all.