Wednesday, November 27, 2013

Saturday, April 27, 2013

JBOSS App Server has New Name? Do you know

Its Name is WildFly.

While the name may be new, WildFly is the eigth version of the project previously known as JBoss AS.
Picking up where JBoss AS 7 left off, Wildfly 8 is JBoss' new community project for rapidly driving forward java application server innovation

Refer the Jboss Website
--


Friday, February 22, 2013

Download Soon - Update CPU Now Oracle JDK 7u15 and 6u41 released

Oracle has released a Critical Patch Update which including updates to JDK 6 and 7. More information about this CPU is available on https://blogs.oracle.com/security and in the releases notes (7u15, 6u41).

The JDK releases are available from the following download sites:

Note that this JDK 6 release is the final public update of JDK 6. For more information on the End of Public Updates milestone, see my previous blog on the topic.


--

Regards
Ganesh Babu G

Friday, February 15, 2013

[programming thrills]Spring Framework v4.0 Next release!

 For Hungry spring developers
For Spring Framework 4.0, our focus is on emerging enterprise themes in 2013 and beyond:
  • First-class support for Java SE 8 based Spring applications:
    language features such as lambda expressions; APIs such as JSR-310 Date and Time
  • Configuring and implementing Spring-style applications using Groovy 2:
    Groovy-based bean definitions; Groovy as the language of choice for an entire app
  • Support for key Java EE 7 technologies:
    including JMS 2.0, JPA 2.1, Bean Validation 1.1, Servlet 3.1, and JCache
  • Enabling WebSocket-style application architectures:
    support for JSR-356 compliant runtimes and related technologies
  • Fine-grained eventing and messaging within the application:
    building on our existing application event and message listener mechanisms
  • Pruning and dependency upgrades:
    removing deprecated features; raising minimum dependencies to Java 6+ etc


I shall show some example of the spring 4.0 by next upcoming posts. 


Thursday, September 27, 2012

From Ruby to Java with interactive Tutor canal.

Main difference with Java

As with Java, in Ruby,...

  • Memory is managed for you via a garbage collector.
  • Objects are strongly typed.
  • There are public, private, and protected methods.
  • There are embedded doc tools (Ruby's is called RDoc). The docs generated by rdoc look very similar to those generated by javadoc.

Differences

Unlike Java, in Ruby,...
  • You don't need to compile your code. You just run it directly.
  • There are several different popular third-party GUI toolkits. Ruby users can try WxRuby, FXRuby, Ruby-GNOME2, or the bundled-in Ruby Tk for example.
  • You use the end keyword after defining things like classes, instead of having to put braces around blocks of code.
  • You have require instead of import.
  • All member variables are private. From the outside, you access everything via methods.
  • Parentheses in method calls are usually optional and often omitted.
  • Everything is an object, including numbers like 2 and 3.14159.
  • There's no static type checking.
  • Variable names are just labels. They don't have a type associated with them.
  • There are no type declarations. You just assign to new variable names as-needed and they just "spring up" (i.e. a = [1,2,3] rather than int[] a = {1,2,3};).
  • There's no casting. Just call the methods. Your unit tests should tell you before you even run the code if you're going to see an exception.
  • It's foo = Foo.new( "hi") instead of Foo foo = new Foo( "hi" ).
  • The constructor is always named "initialize" instead of the name of the class.
  • You have "mixin's" instead of interfaces.
  • YAML tends to be favored over XML.
  • It's nil instead of null.
  • == and equals() are handled differently in Ruby. Use == when you want to test equivalence in Ruby (equals() is Java). Use equal?() when you want to know if two objects are the same (== in Java).
If you're really want to Ruby has a Kick Start , here is the interactive Tutor session given by Ruby. Learn Ruby within 20mins  http://tryruby.org/levels/1/challenges/0 

Get Familiar with Apache Ant Commands :-)

How to do following tasks in ant file?
  1. Make zip file.
  2. Run command.
  3. Copy files to remote machine.
  4. Run commands on Remote Linux machine.
  5. Open an input box and respond to input value.
  6. Make an ant call.
Answers:

1. Make zip file:

Following is the xml for making zip file in ant:

1 <zip destfile='${destination.folder}/zipName.zip'>
2      <fileset dir= '${Source.folder}' />
3 </zip>
In here "destfile" is the name and location of the created zip file. Inside fileset tag the dir attricute is used to specify source folder form where all files will be zipped.

2. Run commands:

Here I will show you how to start tomcat in ant file to demonstrate how to run commands in ant. Following is the xml for this:

1 <exec dir='${tomcat.home}/bin' executable='cmd' os='Windows XP'>
2      <arg line='/c startup.bat'/>
3 </exec>
Here "${tomcat.home}" is the path of the tomcat folder. The command is given in "<arg>" tag in "line" attribute.

Note: To run following commands you will need JSCH jar.

3. Copy files to remote machine:

1 <copy file='${source.folder.file} ' todir='\\remote\path'>
2 </copy>
To copy files on remote machine that supports SCP use following tag:

1 <scp file='${source.folder.file} ' todir='${remote.user}@${remote.host}:${remote.path.where.to.do.copy}'
2        password='${remote.password}' trust='true'>
3 </scp>
In above both commands "file" is the source file which you want to copy with its path. And "todir" is the remote machine folder path where you want to copy the file.

4. Run commands on remote machine:

You can use following tag to execute commands on remote Linux machine.

1 <sshexec host='${remote.host}' username='${remote.username}' password='${remote.password}'
2      command='${command.to.run}' trust='true' />

1 <sshexec host='${remote.host}' username='${remote.user}' password='${remote.password}'
2          command='sh ${tomcat.home}/startup.sh' trust='true' />

5. Open an input box and respond to input value:

To open an input dialog use following tag:

1 <input message='Enter id: ' addproperty='my.id'>
2 </input>
Here "my.id" in "addproperty" is the variable name which holds input value. Now to check if user has denied to enter value in input:
1 <condition property='do.abort'>
2      <equals arg1='n' arg2='${my.id}'/>
3 </condition>
4 <fail if='do.abort'>Build aborted by user.</fail>
And if user enters value and press OK then after you can refer to entered value as "${my.id}".

6. Make an ant call:
1 <antcall target='targetName'>
2 </antcall>
Here "target" is the name of the target that will be executed.

Note: In above examples all values starting with "${"and ending with "}'' are variables and you may have to put appropriate values in them to successfully run them.

Monday, September 24, 2012

what is coming in EJB 3.2 ?

  • Support for the following features has been made optional in this release and their description is moved to a separate EJB Optional Features document:

    • EJB 2.1 and earlier Entity Bean Component Contract for Container-Managed Persistence

    • EJB 2.1 and earlier Entity Bean Component Contract for Bean-Managed Persistence

    • Client View of an EJB 2.1 and earlier Entity Bean

    • EJB QL: Query Language for Container-Managed Persistence Query Methods

    • JAX-RPC Based Web Service Endpoints

    • JAX-RPC Web Service Client View


  • Support for local asynchronous session bean invocations and non-persistent EJB Timer Service has been added to the EJB 3.2 Lite set of features

  • Restriction on obtaining the current class loader has been removed

  • Access to Java I/O has been relaxed, replacing 'must not' with 'should exercise caution'

  • Lifecycle callback interceptor methods of stateful session beans can now be executed in a transaction context (determined by the lifecycle callback method's transaction attribute)

  • It is now possible to completely disable passivation of a specific stateful session bean

  • TimerService API has been extended for an ability to query all active timers in the same EJB module

  • Default rules for designating implemented interfaces for a session bean as local or as remote business interfaces has been relaxed to include more than one interface (see examples in the document for the detailed rules)

  • List of standard activation properties for JMS message-driven beans has been extended to match the changes in the JMS 2.0 specification

  • A unique identifier of a JMS message-driven bean can be now looked up by a standard name by the JMS resource adapter to construct a subscription name








--

Regards
Ganesh Babu G


Tuesday, September 18, 2012

News: Convert Your Java byte Code to path to iPad, iPhone apps

With the open source release of J2ObjC, Google has authored a translator to convert Java source code into Objective-C source for iPhone and iPad applications. The intent is to enable developers to write an application's non-UI code, such as data access code or application logic, in Java. Apple has not permitted Java to run on its iOS systems (though Java code can be part of an iOS application build), while Objective-C is Apple's development language of choice for the devices.

"J2ObjC is not a Java emulator but instead converts Java classes to Objective-C classes that directly use the iOS Foundation Framework," Google engineer Tom Ball said in a blog post. "It supports the full Java 6 language and most of its runtime features that are required by client-side application developers, including exceptions, inner and anonymous classes, generic types, threads, and reflection. JUnit test translation and execution is also supported. J2ObjC can be used with most build tools, including Xcode and Make."

New URL : - http://www.computerworld.com/s/article/9231282/Google_s_Java_translator_eases_path_to_iPad_iPhone_apps?source=CTWNLE_nlt_app_2012-09-17


Wednesday, September 12, 2012

Sunday, July 15, 2012

A little adivce for the Java developer looking to embrace the cloud

he thing about developing in the cloud is that it's exactly the same as development that happens when you're not in the cloud, except for the times when things are different.
Some things to keep in mind, especially for developers sticking their toes in the mist of the cloud for the very first time? Armel Nene points out five points of interest, namely some cloud based mysticism that impacts:
  • Static objects
  • Cached objects
  • Server-side sessions
  • Event execution
  • The use of the JRE
If you're moving in the direction of the cloud, it's a listing of caveats you are wont to check out:
you're moving in the direction of the cloud, it's a listing of caveats you are wont to check out:
http://armelnene.blogspot.co.uk/2012/04/5-things-all-java-developer-should-know.html



What's In Store for Java 8 and 9?

JavaOne 2011 is different from any other JavaOne conference in the past four years for at least one principal reason: there is now a new release of Java.

During his JavaOne keynote, Mark Reinhold, Chief Architect for the Java Platform at Oracle, said that a year ago at JavaOne the discussion was all about what should happen to Java 7. Java 7 was released earlier this year after having its feature set split into two releases. Java 7 includes Project Coin, Invoke Dynamic and the Fork/Join framework while other features like Project Lambda will land in the Java 8 release in 2012.

"Four years, 7 months and 17 days after Java 6, we delivered Java 7 on the 28th of July this year, exactly when we said we would," Reinhold said to the applause of the JavaOne audience.

With Java SE 7 now available, the focus is now on Java 8 work.

"Java 7 was an important release and it has really gotten Java moving forward again," Reinhold said. "But in terms of the overall history of the Java platform, it's a release that was a bit more evolutionary than revolutionary. Java 8 will wind up being more revolutionary.


Key Features Slated for Java 8

Two of the key new projects that will make Java 8 revolutionary are Lambda, which will bring closures to Java, and Jigsaw, which aims to define a module system for the Java platform.

Reinhold said that one of the key reasons why Lambda expressions are needed in Java is because multi-core processor handling requires them. He explained that a Lambda expression enables a developer to take anonymous inner class constructors and replace them with a compact expression. The Project Lambda approach is also constructed in such a way as to be inclusive of older methods too, so as not to break older applications.

"What we have in Java, at last, is a way to evolve interfaces over time in a way that does not break compatibility," Reinhold said.


With Project Jigsaw, Reinhold noted that the motivation is to address the problem of programming "in the large" for Java.

"Programming in the small for Java is about writing classes and interfaces and putting them together in packages," Reinhold said. "Programming in the large is about doing things at a higher level, where you have large program components that you want to be able to re-use and assemble in different ways to construct different kinds of applications."

Reinhold noted that today writing in the large for Java means writing a classpath. Project Jigsaw is an attempt to extend the Java language so developers can declare higher-level constructs in something that looks like Java code.

Another item that is under discussion for Java 8 is something called Project Nashorn.

"Nashorn is a new implementation of JavaScript built from the ground up to leverage the JVM and the invoke dynamic," Reinhold said. "Our goal is to leverage it and come up with a really good JavaScript implementation that is well integrated with Java the language and Java the platform."

A Sneak Peek at Java 9

Looking beyond Java 8, Reinhold offered a few ideas as to what might be part of the future Java 9 release as well. At the top of his list for is a self-tuning JVM.

"You should just be able to type' Java'," Reinhold said. "You shouldn't have to go and tweak a bunch of command line flags to get good performance."


Tuesday, July 10, 2012

.CHM Problems

I got this problem recently, then tried using this stuff

I had couple of .CHM files, specially for C# .NET related stuff and I saw some of the chm files when I open them I see "This page cannot be displayed" error. Finally I figured out that there could be two reasons for this:
[Option 1 courtesy chan.chawla from the posted comment, adding as the first option to be tried out before going any further]
1. Double click the .chm file. It will open a security dialog. Uncheck "Always ask after opening this file". Alternatively, right click on the file you want to open, click Properties and then click Unblock. This should do the trick.
2. If you chm file name or the path contains '#' character, just get rid of that and I guess you would be able to start viewing your chm files again.
3. If nothing works, try this.
Because of a Microsoft Service Pack, the chm files does not have enough permissions (by default). This case is usually when you try to open .chm files over network. The resolution for this is as follows:
  • Click Start, click Run, type regedit, and then click OK.
  • Locate and then click the following subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions [If this registry subkey does not exist, create it]
  • Right-click the ItssRestrictions subkey, point to New, and then click DWORD Value.
  • Type MaxAllowedZone, and then press Enter.
  • Right-click the MaxAllowedZone value, and then click Modify.
  • In the Value data box, type 1, and then click OK.
  • Quit Registry Editor