Create Oracle DataSource in Glassfish

1 . Copy JDBC Oracle driver to GLASSFISH/lib, for example, copy ojdbc14.jar to /usr/local/glassfish/lib.

2. Restart Glassfish, log on to Glassfish admin interface, create a new JDBC Connection Pool.
Delete all properties, and add following properties:
user – set this to Oracle userid
password – set this to Oracle password
URL – set this to the URL, Format : jdbc:oracle:thin:@HOSTNAME:PORT:SID.

Test the connection pool by clicking the “ping” button to get the verify  message.

3. Create a JDBC DataSource using the JDBC Connection Pool.

Full details for creating an Oracle connection pool in Glassfish2.1.1 can be found from the link below:

http://mariosgaee.blogspot.com/2009/12/oracle-connection-pool-in-glassfish.html

Full details for creating MySQL connection pool in Glassfish can be found from the link below:

http://www.albeesonline.com/blog/2008/08/06/creating-and-configuring-a-mysql-datasource-in-glassfish-application-server/

NetBeans 6.8 IDE comes with JavaFX Composer

The JavaFX Composer is a plug-in for NetBeans IDE 6.8. It provides:

  • Visual editor for a form-like UI using components in JavaFX 1.2.1 SDK
  • Dynamic design editing based on states
  • Data access to Web Services, databases and local storages
  • Support for JavaFX binding
  • Simple animation editor
  • Multi-screen-size editing

Install:

From NetBeans 6.8 IDE, Tools — PlugIns — Available PlugIns, select JavaFX Composer, and click Install and go through the rest of installation wizard.

To use JavaFX Composer, you need to create a new JavaFX project, and use either JavaFX Desktop Business Application or JavaFX Mobile Business Application. You can’t use JavaFX Composer to open previous created JavaFX projects.

Usability:

Source/Designer views, but the generated code can not be modified in the editor manually. You need to edit it from the designer view properties editor.

Links:

http://wiki.netbeans.org/JavaFXComposer



CHKCONFIG

A unix command line tool for maintaining the /etc/rc[0-6].d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories.

Usage:
chkconfig --add NAME
Add new symbolic links in /etc/rc[0-6].d
chkconfig --del NAME
Removed from chkconfig management, and any symbolic links in /etc/rc[0-6].d which pertain to it are removed.
chkconfig [--level LEVELS] NAME
Specifies the run levels an operation should pertain to. levels between 0 – 7. For example, –level 56 specifies level 5 and 6.

Elgg 1.7

Its still not arrived, but as of yesterday it when into code lock down. Meaning that what is there now is pretty much the beta release which will be able on http://www.elgg.org within a few days.

Once the beta is available, I’ll be putting it on my test server to make sure that everything still works.

Heres hoping…

cron time-based job scheduler

Task : How to get a Perl cgi-bin script to be ran daily, without the intervention of an administrator or webpage ever being visited.

Solution: Using the systems Cron command
I knew of cron’s existance but didnt realise how usful it was. Below is how I managed to get cron to do the job for me.

Unix commands used :

crontab -e (edit crontab using vi)
crontab -l (list your current crontab enteries)

The lines I added to my crontab :

# Location of GET
GET='/opt/lampp/bin/GET'

# Location of the script file to be ran
VLEPROCESS='http://abc.123.com/cgi-bin/happiness/ProcessFiles.pl'

# The crontab command, 59 = minutes passed the hour, 6 = Am, * = no value set, $GET value of where the GET command is, ${VLEPROCESS} wherearounds of the script to be ran.
59 6 * * * $GET ${VLEPROCESS}

So at 6:59 each morning, Monday to Sunday the script ‘ProcessFiles.pl’ gets ran.
Happy days, one less thing to remember each morning.

Further cron command option for dates and time :
.—————- minute (0 – 59)
| .————- hour (0 – 23)
| | .———- day of month (1 – 31)
| | | .——- month (1 – 12) OR jan,feb,mar,apr …
| | | | .—- day of week (0 – 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
| | | | |
* * * * * command to be executed

Google webmaster tools

Problems, problems, problems…

Have you ever been mithered by nasty web bots which insist on trawling your web content, even though its password protected ?

Yes us too, this was happening on our implentation of Liferay.

We knew that the answer lay within the ‘robots.txt’ file on your server, we just couldn’t get it to stop bots accessing the required directories. This is an issue that has been bothering us with the use of Liferay for a while now, you might be glad to hear that I’ve solved the issue : This is how!

To make customising the robots.txt file all the more easier for your setup, I suggest that you create an account on Google Webmaster Tools
And register your webpages which are affected.

How to create a robots.txt file:
1. On the Webmaster Tools Home page, click the site you want.
2. Under Site configuration, click Crawler access.
3. Click the Generate robots.txt tab.

The lines that you want in your robots.txt file to stop bots from trying to trawl Liferay on a Glassfish implentation are :

User-agent: *
Disallow: /glassfish/domains/domain1/applications/j2ee-modules/liferay-portal
Disallow: /web/guest/home
Disallow: /web/guest
Allow: /

This might not be what your exactly after, but hopfully it will point you in the right direction.

elgg 1.7 on horizon

Take from the news sections of elgg.org : Elgg 1.7 will ship with 0 new features. After feedback from users and discussions with the core dev team, we have decided to tackle some bugs that have been found in Elgg core in order to improve Elgg core itself. Though we are excited about the new features we have planned for Elgg, it is agreed that current development time will be better spent making Elgg Core as solid and bug-free as possible.

This all sounds very promising, I for one will be looking forward to this release.

Elgg, a view from a small corner of the world

elgg

Just to sum up, elgg is a social network framework, which gives you the frame to create your own social network, elgg’s social engine powers all kinds of social environments, from education to business and anything inbetween. If you are looking for a professional social intranet or want to run a site for your organisation, Elgg is a great choice.

So far :

We’ve had many issues with elgg, but that’s only because we jumped on board right when 1.0 was released, in Dec 2008, since then elgg has gone through a few different version and is now on 1.6.1, this is as of last week (date of writing Sept14th 2009). Most things in 1.6.1 are now fixed, although some of the extra functionality that we had from the use of plugins from the elgg community have gone, as the core of elgg has been upgraded leaving some of the community plugins no longer working, this has noticeable happened in the Groups plugin, where you now cant edit the a discussion post once it has been created, nor can you change its status from open to closed.

Hopefully the community plugins will be updated in due time.