Showing posts with label Java Specification. Show all posts
Showing posts with label Java Specification. Show all posts

Thursday, February 02, 2012

Subversion for Oracle WebLogic workshop.

Reference http://blogs.oracle.com/simonthorpe/entry/subversion_source_control_in_o

Now that the server is up and running, I want to enable my development environment to use it. I have installed on my workstation the 10g release of Workshop for Weblogic. You have two choices for this environment, Subclipse and Subversive. I decided on Subclipse for no other reason than it was listed first :)

Before we do anything with Workshop, I actually ran into a bug which limits the ability to install Subclipse via the "Software Updates" mechanism directly in the IDE. There is a workaround for this problem detailed below.

Comment out the com.* import lines in your %BEA_HOME%\wlportal_10.3\eclipse\features\com.bea.wlp_10.3.0\feature.xml, like this:


<requires>
<import plugin="org.eclipse.core.runtime" version="3.3" match="compatible"/>
<import plugin="org.eclipse.ui" version="3.3" match="compatible"/>
<!--
<import feature="com.m7.nitrox" version="1.0.20" match="compatible"/>
<import feature="com.bea.workshop.cmdline.feature" version="1.0.30" match="compatible"/>
<import feature="com.bea.workshop.common.feature" version="1.1.40" match="compatible"/>
<import feature="com.bea.workshop.upgrade81.feature" version="1.0.30" match="compatible"/>
<import feature="com.bea.workshop.web.feature" version="1.0.20" match="compatible"/>
<import feature="com.bea.workshop.wls.feature" version="1.1.30" match="compatible"/>
<import feature="com.bea.workshop.xmlbeans.feature" version="1.0.30" match="compatible"/>
-->
</requires>



Then restart Workshop
Once you've done this follow these instructions to download and install the subversion client.
Start Workshop for WebLogic and go to "Help > Software Updates > Find and Install..." then select Search for new features to install. Click on New Remote Site and enter;
  • Name = subclipse 1.6
  • URL = http://subclipse.tigris.org/update_1.6.x
Once added, ensure that this site is the only one checked in the sites to include in the search and hit Finish. You will be presented with a tree to choose the components, I selected the following;
workshop_subclipse01.gif

Agree to the licenses

workshop_subclipse02.gif

Accept the optional component;

workshop_subclipse03.gif

Finally hit finish to install everything. Note these are not signed packages so you'll need to agree also to install the unsigned components. At the end you'll be asked to restart Workshop.

workshop_subclipse04.gif

Checkout test project from subversion in Workshop for WebLogic


Ok, nearly there. Now its time to checkout that test repository I created during the server setup.
In Workshop go to "File > New > Other" and in the resulting dialog find the SVN section and choose Checkout Projects from SVN.


workshop_subclipse05.gif


Select Create a new repository location. It now asks for the URL to the server, remember this is in the format SVN://servername/respository my example is shown below. The client will attempt to connect after which you can select the URL to get to the Check Out As dialog.


workshop_subclipse06.gif


The check out dialog now asks what you want to do with the project. If you want you can create a new project using the Workshop's wizard. However I just wanted to add a vanilla project so selected Check out as a project in the workspace, like below and hit Finish. It also warns me that i'm checking out the entire root which is fine for this test.


workshop_subclipse07.gif


You will now have an empty project folder in Workshop. You can take a look at all the version control options now by right clicking on the project and selecting the Team menu. Here you have access to all the branching, merging etc features.

Monday, January 10, 2011

Just clarify the pass by value of Java

Remember long time ago, I ever saw a post talking about the refrence of Java. But with the passing of time, almost forget it compeltely. Recently, I looked at another post on the server side agruing the pass by reference. I have to reread it and make it much deeper in my mind. The follow artcile is a good one for pass by reference - http://javadude.com/articles/passbyvalue.htm.

Primitives are passed by value
Objects are passed reference by value (call by sharing)

Thursday, January 07, 2010

What Is The Relation Between JSR-299 and JSR-330 In Java EE 6?

http://java.dzone.com/articles/what-relation-betwe-there

JSR-330 (Dependency Injection for Java) led by Rod Johnson (SpringSource) and Bob Lee (Google Inc.) became a part of Java EE 6. JSR-330 is very simplistic. It comes with own few annotations from the package: javax.inject. The package contains the following elements: Inject, Qualifier, Scope, Singleton, Named and Provider. Its the definition of the basic dependency injection semantics.

JSR-299 (Java Contexts and Dependency Injection), with Gavin King as lead, uses JSR-330 as base and enhances it significantly with modularization, cross cutting aspects (decorators, interceptors), custom scopes, or type safe injection capabilities. JSR-299 is layered on top of JSR-330.

It is amusing to see that the built-in qualifier @Named is not recommended and should be used only for integration with legacy code:

"The use of @Named as an injection point qualifier is not recommended, except in the case of integration with legacy code that uses string-based names to identify beans."
[3.11 The qualifier @Named at injection points, JSR-299 Spec, Page 32]

The relation between JSR-299 and JSR-330 is comparable to the relation between JPA and JDBC. JPA uses internally JDBC, but you can still use JDBC without JPA. In Java EE 6 you can just use JSR-330 for basic stuff, and enhance it on demand with JSR-299. There is almost no overlap in the practice. You can even mix JSR-299 / JSR-330 with EJB 3.1 - to streamline your application.