Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!

Mike Van

Ranch Hand
+ Follow
since Apr 06, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mike Van

I have an application that is deployed and working well using Spring injection with the spring-ejb-properties.xml file compiled into the .ear file. The problem is that we have a few properties that need to change on a regular basis. Because the properties are compiled into the ear, whenever a property changes, I need to do a new release of the .ear. This is resulting in a recurring chore that seems unnecessary. Other containers, such as Karaf, allow property files to be located in the container's directory structure, and the values contained therein are passed to Spring for injection by the .jar files that use them.

Is there a way to do this with Weblogic without writing some custom doo-dad that will read the file off of the system and pass it into the .ear file?
5 years ago

Stuart McCulloch wrote:

Augusto Sellhorn wrote:Thanks!
Interesting, we're using version 2.0.1 and I wasn't aware of that feature. Probably not turning it on I guess ... (perhaps I have to tell it where the xml files are???)

It should be enabled by default and scan Spring-DM/Blueprint files that end up under META-INF/spring, META-INF/blueprint, or OSGI-INF/blueprint in the final bundle. I think there were some additional improvements in 2.1.0 but if you're still having trouble then send a message to the Apache Felix dev list as we have several developers that use this feature in their projects (and know more about it than me :).

I thought it might be interesting for the group to explain exactly how a .jar file is made into a bundle using the maven-bundle-plugin. After your code is compiled, the maven-bundle-plugin (which is really just a sophisticated mavenized wrapper for bndlib) will scan all of your compiled class files for import statement. It will then list each of these under the Import-Package directive of your MANIFEST.MF file. The latest version of this plugin "should" also look for class references inside of you Spring and Aries files. The only real work a developer has to do is to check to ensure any jaxb files and spring/aries files not located in the directories you'd expect them to be in, have those files included in the maven bundle plugin's <Import-Package> section.

Richard S. Hall wrote:

Raghavan Muthu wrote:

Raghavan Muthu wrote:
3. Would there be any issues with scalability of my Java application? If so how do I address them?

Depends on what sort of scalability. There isn't too much overhead associated with OSGi at execution time, so it should be an issue there. The biggest issue probably relates to the number of modules in a system, but I think most OSGi frameworks could easily handle 100s if not 1000s of modules without too much difficulty.

Currently I use Felix, Karaf, and Camel to manage a system that processes millions of files of data a day. In that real-world application, I found it necessary to break out the major functional pieces of the system and run them in seperate OSGi instances, communicating via JMS. While the issues of scalability were created by our java code, breaking the pieces into seperate VM's works well to handle scalability issues. Oh, and we're running ~170 bundles in each OSGi instance.

Again, Felix + Karaf + Camel (2.5.0+) is a great way to go for back-end processing applications.

Richard S. Hall wrote:

Augusto Sellhorn wrote:

Richard S. Hall wrote:
The simplest approach is to create one big self-contained bundle, but it depends on your situation.

You mean embedded jars in the bundle? We ended up having to do that after bnd wrapping all dependencies wouldn't work in all cases.

Yes or just expanding them into the bundle, you don't necessarily need to embed the classes in their original JAR files.

Another approach you can use when making use of third party libraries that are not OSGi bundles, is to (in Karaf) wrap them when you install them.

For example, if you're installing a .jar file using the karaf console, and you want to wrap it as it is installed you'd do something like this:

This instructs Karaf to use the bnd library available in Karaf to wrap that non-OSGi bundle prior to installing it. The -s flag instructs Karaf to start the bundle once the jar is wrapped and installed.

Pradeep bhatt wrote:Thanks. I was concerned whether osgi api import is required for modularity.


Most of the heavy lifting with OSGi is found in the META-INF/MANIFEST.MF file. Using Maven and the maven-bundle-plugin, this file will be largely created for you without a lot of extra work on your part. When we (OSGi folks) talk about "importing" a class or package inside of an OSGi bundle, what we're usually referring to is the Import-Package directive within the MANIFEST.MF file, not the actual import statements in your code. I can go in more detail about this (using Karaf and Felix) if you'd like.

Think of OSGi modularity like this. A bundle deployed inside of OSGi only knows about the class files, spring, aries, jaxb, etc files that it contains. If your bundle needs to use the functionality provide by another bundle, this needs to be identified in your MANIFEST.MF file. For example, if you have a service that makes JMS available to your OSGi container, and you have a bundle that needs to use JMS, you would grab a reference to that service via Aries or SpringDM, and use IOC to inject the service into your bundle. On a side note, I've found that using Camel along with OSGi is pure win, as it contains camel components for JMS and like services out-of-the-box. All you have to do is set it up in SpringDM or Aries, and BLAMMO, its available to all of your camel routes.

Hope that helps clear things up.
Depends, is your resume worth reading? Seriously, having a website is a good thing and all, but make sure it represents you and your skillset well. Are you a J2EE guy? Then, don't get a website running on PHP. Remember, your website, in many respects, is your resume. If you do it poorly, it will give them impression that the rest of what you do is poor also.
11 years ago
Sirs and Madams,

We all know that Java Programming and Management are two specifically different topics with different purposes. Over the past few months I've noticed a number of postings on various groups about transitions from Java Programming to Management, Management Techniques, and various management methodologies. As we begin moving from the Object-Oriented Analysis and Design metaphor to more agile methodologies such as XP, SCRUM, and Feature Driven Development, I propose that a forum to discuss management is overdue and timely.

It is with this observation that I humbly request a new permanent topic under the "Careers" category named "Management and Methodologies" designed to provide:
  • IT to Management Transition: We will identify what an IT professional should do to prepare for a move to management and compare experiences;
  • The Difference Between IT and Management: We will help Java Programmers with issues as the transition between IT and Management;
  • New Manager Support from a Java Point-of-View: Professionals reading this forum will be able to discuss thier management difficulties and gain mentorship as they mature as managers;
  • Agile vs OOA&D vs Upcoming Management Approaches: We would provide IT managers and IT Technical Leaders with assistance employing the various management approaches to IT, both in lessons learned and in the doctrine of each approach;

  • JavaRanch has provided me with so much help over the last 6 years, I really hated having to leave it in 2003 to pursue management. As a "new" member in 2006, I was awed at the rich amount of material available for new programmers. My professional programming career has been strongly supported by JavaRanch, twice now. My only objection was the lack of assistance in transitioning to management. With the Agile methodologies, more and more Java programmers will be thrust into the role of management and I think its a good idea to support them as they grow in thier fields.

    Respectfully Submitted

    Mike Van, PMP (2003-2009)
    [ September 03, 2006: Message edited by: Mike Van ]
    11 years ago
    To anwer your question now. If you have decided, reading my previous posting on the differences between management and IT that you want to pursue IT, this is what I did. You may find it useful.

    The Project Management Institute is recognized worldwide as the leaders in the project management body of knowledge (PMBOK). IN fact, they wrote the ANSI standard in it and are considered the worldwide authority. When I decided to go management, I went to them and found a reputable "Registered Educational Provider" (REP).

    My suggestion is that you begin slowly by reading and studying all of thier suggested curriculum. If you have been identified as someone in your organization with management potential, organize a study group of like-minded peers (people you work with who have similar goals) and start a study group. Of course, advertise this to your company or just to your boss. Plan study sessions on your lunch, your breaks or whenever you will have the least impact on your job. In organizations with very tight restrictions on time, consider doing your studies after-hours with your group.

    Make your desire for management known, but do not do so in a manner that will threaten your current managers. Remember, you want to work for them not take thier job. If you feel they will work against you, then do your studies in private. Management is a very political group, so make sure you don't make any waves that will upset the people that you are trying to join, the managers.

    If your company supports continuing education in the form of college, get whatever support you can and try to get that MBA. At this point, remember, education is a wonderful thing because the more you have in a particular area, the more you are considered an expert. Also, if you are attempting to gain a Project Management Professionalisation (PMI's PMP), make sure you document your credits earned and the number of hours you spend training. They will all help.

    Remember, management is a highly technical task, so you must understand it and master it. If you jump into a management position without any training, you have a higher likelihood of failure. As such, get as much training as possible.

    Finally, when you are ready, express your desire to move into management. Do so diplomatically, and present yourself as someone who can further the goals of the customer and the manager you are appealing to. REmember, if you can help him/her get better bonuses and promotions, you are their asset.

    Please feel free to ask questions on this topic.
    [ September 03, 2006: Message edited by: Mike Van ]
    11 years ago
    There are a couple of ways you can change career paths from IT (engineer) to IT (manager).

    Before you start though, consider that management and engineering are two distinctly different job fields. An IT engineer who has no management responsibilities is solely responsible for mastering the technical, theoretical and application-specific portions of thier craft. A manager must be knowledgable in hard-skills such as accounting and law but must also master their soft-skills such as communication and intrapersonal communcation.

    An engineer is expert at the tools and algorithms necessary to perform the technical portions of thier jobs. There is also the implicit understanding that a good IT engineer understands the theories and principles used to make the IT do its job. Be it from networking to computer programming to architecting, an IT engineer is responsible for all technical portions of thier job. The more an IT engineer can master their field and the tangental technologies the more respected they will become.

    A manager of IT is understood to have a good-level understanding of technology, but must also master accounting, the laws of human resourcing, contracting, etc. and must also be good to varying degrees at soft skills including deriving business objectives from customers/executives and then explaining requirement to IT professionals.

    On any given day, a high-level IT professional such as a technical lead, will be expected to take specific technical requirements and break them down into tasks that one IT professional will be able to understand and accomplish. They are also expected to understand their overall technical goal and apply technologies and algorithms to meet those goals. Lower level IT engineers are expected to have a good-to-firm grasp of a specific set of technologies and/or tools and be able to quickly perform the tasks the technical leads provide them.

    On any given day the manager must review the costs of personel, identify the performance of a group of professionals, speak to IT professionals, and prepare reports for customers and executives which range from cost-accounting to your groups ability to meet various performance objectives. Additionally, the manager is responsible for meeting with the Sr. IT leads on a various number of topics including personell performance, task objectives, schedule, and how well the IT professionals are able to meet thier objectives. Also, managers are expected to review thier IT Leads expectations of IT professionals and periodically rate and review them. On a regular occasion, managers are also required to provide reviews on all of thier assigned personnel, explain thier reviews, and then assign raises and bonuses. Lastly, if an employee is unable to perform, refuses or is unable to improve thier perfomance, and knows of the problem, the manager is the person that fires them.

    Now that you know the difference between a manager and IT lead, its time to think about how you transition.

    First and foremost, make sure you are someone who will perform well in a management position. Here's a top-x list of things to keep in mind.
    1) At home, do you account for all of your spending and balance your bank-account? Or, do you prefer to spend as you wish and then live inexpensively for a week or so until your next paycheck comes in? If you account and budget, you'll be good at management. If you don't, you should acquire the habit, because that's how you'll be driving your projects if you want to be successful.

    2) When a fellow co-working comes up to you with a problem, do you listen to them or do you prefer that they go to someone else? You can be a manager without the ability to emphathise, but you must listen if you want to be a successful manager. Regardless of who you are talking to, knowledge is power and the ability to listen is one of the most important aspects of management. Knowledge is power, and you cannot gain that if you interrupt or try to finish the sentences of the people you're talking with. Lastly on this point, do you talk TO people or WITH them? Talking TO someone is a one-way communication process where you unload what you want and then go without getting feedback. Talking WITH someone is a 2-way process where you interact and LISTEN to what they have to say.

    3) Can you understand the difference between business goals and technical objectives? As a manager, part of your job will be talking with customers and determining the overall business goals they have. In this case, your customer could be your executives, your paying customers, and the end-users of your product. Your job is not to define the specific technology or technical route, rather it is to document the actual goals. "I want 1,000,000 more visitors to my website with less than 1 minute downtime a year" is a business goal. "Using J2EE technology, load-balance a system across multiple geographically distant server-farms with automatic failovers" is a technical goal. Be able to understand the actual business goal.

    4) Can you let go of Java as the end-all, be-all of software engineering? Recently I was asked to manage a website. My goals were specific, get it up and running quickly and have an administrative interfact which allows someone with absolutely no web knowledge to run it. I chose a PHP-based server called XOOPS. Why? Well, the customer may have been able to do better with Java, but thier human requirements clearly wouldn't allow it. Addionally, the server host was convinced Java would create problems. As such, to meet the timeline, I chose a non-Java Technology.

    Ok, that's all for now. Let me know if this helps.
    11 years ago
    You may want to consider using the XMLBean api instead of doing what you're doing. In my experience, it works well and doesnt' require an in-depth knowledge of the XML parsing api's.
    In the US, we use a number of various methods to decide who to marry. In most cases, marriages are the result of late-night binding in drunken lust, leading to the conception of a child out-of-wedlock. The actual marriage might be the result of one partner not wanting an abortion and the other's desire to do the "right" thing. Then, years later when the process of maturation is in flow, they realize how out of balance they are, begin hating each other, and have either highly disfunctional relationships or get a divorce.

    As a testament to how love sucks, I've heard some women say "bang the hot-guy and marry the rich and powerful one". How many men in the US have kids who are not genetically thier own, and don't know?

    Love may be blind, but it is also stupid. You see, as individuals we are hard-wired to seek out people based on thier physical attributes, not on thier long-term ability to complement us. As such, we are the best people to choose who will make our funny-parts tingle, and we are also the worst people to decide who we should be with for a long term period of time. As such, perhaps there is room for a matchmaker who makes invitations based on the craft of finding the right people for long-term relationships.

    Frankly, sometimes it would be nice to have the counsel of a third-party who has been able to see you interact and knows you might be the best way to go. Of course, that only works if you're lucky enough to get the person who has an impeachable character.

    So then, in closing, neither system works well, but it seems like matchmaking has a better track record. Of course, this is only if its based on things like long-term viability and compatability. At least, it appears to have a much better track record than our own chemical reactions based on the size of a woman's bust and curve of her hips while we are under the influence of inebriate spirits.
    11 years ago
    Well, compared to our President, his qualifications are pretty stellar. Except of course that your guy was never a C-level student at an ivy league school, didn't get hooked on drugs and alcohol, or disgrace his family in his early years.

    So, the question is, who is the better man, the one who has made mistakes and learned from rising out of the darkness of his own soul, or the one who never made any mistakes?

    They're both fairly well qualified for very different opinions, in my conciepted opinion.
    11 years ago
    I'd like to see the SCJA implemented in the same manner as the most basic Oracle certification. That is, it is less than $100.00, available online, and required for higher levels of certification.

    This model is good because is provides a clear way for newcommers to determine whether or not Java is something they'd like to pursue into the future. I've known a couple of Oracle SQL guys that were very against certification, ostensibly on moral grounds. Howevever, the real problem was that they didnt' feel they could pass a test and considered the need demeaning. However, the test was truly basic, and after some prodding of thier ego, they did take the test. What it did for them was validate thier knowledge. Before, when someone would question a design decision, they would go on and on about thier advanced experience. Now, they do that and throw in the fact that they're certified and laugh. They still dont' think that certification is something which should be required, but they are proud of the fact they pursued it. Without the online test though, I doubt they would have begun down that road.
    You mean you guys are getting paid to program in Java? All this time I coulda been making money!
    11 years ago
    This is probably a stupid response; but hey, I think you've come to expect that from me! Its ironic that you're asking how to get a job in the US when many of our s/w engineering jobs are actually being sent to you country. I sincerely don't mean this to sound negative; but, it is ironic.
    11 years ago