Recent Bloggers

Charles Lam

1 Mensagens
30 de Setembro de 2016

Maarten van Heiningen

3 Mensagens
29 de Setembro de 2016

Christine Reyes

Staff
2 Mensagens
27 de Setembro de 2016

Javeed Chida

13 Mensagens
27 de Setembro de 2016

Cristina Gonzalez

Staff
1 Mensagens
26 de Setembro de 2016

Geert van der Ploeg

1 Mensagens
20 de Setembro de 2016

Olaf Kock

Staff
117 Mensagens
20 de Setembro de 2016

Antonio Pol

Staff
1 Mensagens
19 de Setembro de 2016

David H Nebinger

31 Mensagens
15 de Setembro de 2016

Jan Eerdekens

13 Mensagens
14 de Setembro de 2016

Running Windows XP Professional with VMWare Fusion and Multiple Processors

General Blogs 2 de Agosto de 2013 Por Neil Griffin Staff

I was recently installed a ".vmdk" image into VMware Fusion on a MacBook Pro with multiple processor cores. The operating system in the image was Windows XP Professional with Service Pack 3. After I installed the image, I assigned 4 processors to the VM using VMWare Settings. But after I started the VM, I noticed that the XP Task Manager was showing only 1 processor.

I did some searching on the web and found that XP Professional supports multiple processors, but the VMware Community forums had a lot of unanswered questions. Finally I found a VMware Knowledge Base article titled Modifying the Hardware Abstraction Layer (HAL) for a Windows virtual machine (1003978) that provided some guidance.

In the Device Manager, I double clicked on the "Computer" node in the tree and it expanded to show a "Single Processor PC" node. I then right clicked on that node and left clicked on "Update Driver" and after a reboot, it showed "Multiprocessor PC" and the Task Manager was showing multiple CPUs.

You can verify this further by following these steps:

  • Open Windows Explorer
  • Navigate down to C:\WINDOWS\system32
  • Right click on the hal.dll file and left click on "Properties"
  • Click on the Version tab
  • Click on the Internal Name list item

If the value is halmacpi.dll then the Windows HAL is setup for multiple processors.

Hope this helps somebody in the future so that they don't have to spend as much time on this as I did.

Announcement: Liferay Faces 3.1.2-ga3 Released

Company Blogs 3 de Junho de 2013 Por Neil Griffin Staff

On June 1, 2013 Liferay released the 3rd General Availability (GA) release of Liferay Faces:

  • Liferay Faces 3.1.2-ga3 (JSF 2.1 + Liferay 6.1.x)
  • Liferay Faces 3.0.2-ga3 (JSF 2.1 + Liferay 6.0.x)
  • Liferay Faces 3.0.2-legacy-ga3 (JSF 2.1 + Liferay 5.2.x)
  • Liferay Faces 2.1.2-ga3 (JSF 1.2 + Liferay 6.1.x)

Project Links

Version Scheme

Please refer to the Liferay Faces Version Scheme wiki article for a detailed explanation of the version numbering.

Release Highlights

This is a maintenance release that has 50+ bug fixes20+ improvements, and 10+ new features. For full details, please refer to the Release Notes.
 

New Feature: CDI Support

One of the exciting new features in this release is support for Contexts and Dependency Injection (CDI), thanks to the new Liferay CDI Portlet Bridge. We developed a new jsf2-cdi-portlet demo that shows how to use annotations like javax.inject.Injectjavax.inject.Named, and javax.enterprise.context.RequestScoped. For more information, refer to the new Developing JSF Portlets with CDI wiki article.
 

Critical Bug Fixes

  • [FACES-224] JSF 2.x f:viewParam feature not working due to RenderRequestPhaseListener stopping lifecycle phase execution after RESTORE_VIEW phase
  • [FACES-257] Bridge generates URLs that can be incompatible with Liferay friendly URLs
  • [FACES-1463] References to BridgeRequestScope instances causing memory leak
  • [FACES-1470] Memory leak for RequestScoped, SessionScoped, and ViewScoped managed-beans when running under Mojarra + JBoss AS
  • [FACES-1496] Memory leak with Mojarra and JSF2 resources
  • [FACES-1591] ViewExpiredException when Ajax is used on WebLogic

Testing

We have strengthened our commitment to quality with a new suite of automated integration tests that utilize Selenium via Arquillian. The tests exercise the Liferay Faces demo portlets and also verify bug fixes with issue tester portlets. For example, the FACES-257 Selenium Test exercises the FACES-257-portlet in order to verify that f:viewParam is working in conjuntion with Liferay friendly URLs.

Thank You

Thanks to everyone in the community that reported issues, contributed patches, and participated in the forums!

JSFCentral Interview: Neil Griffin on Liferay Projects, Portlets, and JSF

Company Blogs 16 de Janeiro de 2013 Por Neil Griffin Staff

I really enjoyed the JSFCentral Interview by Kito Mann. The podcast was posted on December 06, 2012.

 
Some of the topics we discussed:
  • Liferay Portal
  • Liferay Faces
  • JSR 329
  • CDI

Contributing to Liferay Faces

Company Blogs 21 de Dezembro de 2012 Por Neil Griffin Staff

Note: This blog post has been moved to the Liferay Faces Wiki.

Announcement: Liferay Faces 3.1.1-ga2 Released

Company Blogs 12 de Dezembro de 2012 Por Neil Griffin Staff

On December 11, 2012 Liferay released the 2nd General Availability (GA) release of Liferay Faces:

  • Liferay Faces 3.1.1-ga2 (JSF 2.0/2.1 + Liferay 6.1.x)
  • Liferay Faces 3.0.1-ga2 (JSF 2.0/2.1 + Liferay 6.0.x)
  • Liferay Faces 2.1.1-ga2 (JSF 1.2 + Liferay 6.1.x)

Project Links

Version Scheme

For information on the Liferay Faces Version Scheme, refer to the Liferay Faces Wiki article.

Release Highlights

This is a maintenance release that fixes several bugs including a memory leak (documented in FACES-1445). Liferay recommends that all JSF portlet projects be upgraded to this new version. Please refer to the Release Notes for more information.

Thanks to everyone in the community that reported issues, contributed patches, and participated in the forums!

Announcement: PrimeFaces Technology Partnership

Company Blogs 31 de Outubro de 2012 Por Neil Griffin Staff

Liferay has entered into a new technology partnership with PrimeTek Informatics, maker of PrimeFaces.

Customers who have purchased Liferay EE and PrimeFaces PRO now enjoy the benefit of a communication channel between our companies, so that technology issues can be resolved in accordance with corresponding Service Level Agreements (SLAs). In addition, this partnership will ensure that our mutual customers will be able to develop PrimeFaces portlets that can be used in conjunction with the Liferay Faces Alloy component suite.
 

Please vote for Liferay to serve on the JCP Executive Committee

Company Blogs 28 de Outubro de 2012 Por Neil Griffin Staff

UPDATE: 10/30: Congratulations to the London Java Community and to CloudBees! And thanks to everyone who voted for Liferay.
 

UPDATE 10/19: Liferay Sr. Software Architect Ray Augé spoke on behalf of Liferay on the "Meet the EC Candidates" call. You can listen to Ray on the MP3 recording from 19m 50s - 23m 35s.
 

This year Liferay is running for election to serve on the JCP Executive Committee. To my great surprise, Liferay nominated me to be the company's representative. I'm truly honored to be nominated, and if we are elected, we will endeavor to serve the Java community well.
 
Here is the company description that we submitted for the 2012 Executive Committee Nominations page:
 
Liferay is an open source software company that is dedicated to the success of the Java platform. As a privately held company, we are free from investor pressures which in turn makes us free to serve the best interests of our 70,000+ member community. We have benefitted greatly from the contributions and feedback of our community members and strongly believe in open/transparent processes. We will strive to contribute this experience if we are elected to serve on the JCP Executive Committee.
 
We also submitted a brief Position Statement.
 
If you are a member of the JCP, please cast your vote for Liferay! The voting period is from October 16, 2012 - October 29 2012. We would treasure your vote and would be honored to serve.
 
Thank you,
 
Neil
 

Announcement: Liferay Faces in Maven Central

Company Blogs 31 de Agosto de 2012 Por Neil Griffin Staff

The new location for downloading Liferay Faces artifacts (JARs, WARs, etc.) is Maven Central.

As part of the migration of Liferay Faces from portletfaces.org to liferay.com, the repository.portletfaces.org Nexus repository is being phased-out. Now that the artifacts are in Maven Central, developer should remove the following repository from project pom.xml files:

<repositories>
  <repository>
    <id>maven2-repository-portletfaces.org</id>
    <url>http://repository.portletfaces.org/content/repositories/liferay-releases</url>
  </repository>
</repositories>

Announcement: Liferay Faces 3.1.0-ga1 Released

Company Blogs 22 de Agosto de 2012 Por Neil Griffin Staff

UPDATE: Liferay Faces in Maven Central

On August 22, 2012 Liferay issued a press release announcing the first General Availability (GA) release of Liferay Faces:

  • Liferay Faces 3.1.0-ga1 (JSF 2.0/2.1 + Liferay 6.1.x)
  • Liferay Faces 3.0.0-ga1 (JSF 2.0/2.1 + Liferay 6.0.x)
  • Liferay Faces 2.1.0-ga1 (JSF 1.2 + Liferay 6.1.x)

Project Links

Version Scheme

For information on the Liferay Faces Version Scheme, refer to the Liferay Faces Wiki article.

Release Highlights

We recently announced that Liferay Faces Bridge Certified was certified as JSR 329 Compliant. As a result of this certification, we released a JSF 1.2 compatible version that that developers can use to migrate legacy portlets to Liferay Faces.

Once again, thanks to everyone in the community that reported issues, contributed patches, and participated in the forums!

Notes no longer available in Mail.app with Mountain Lion

Company Blogs 15 de Agosto de 2012 Por Neil Griffin Staff

If you have used the "New Note" feature in Mail.app, then you may have noticed that the feature is gone in Mountain Lion. Although I was generally happy with the new Mountain Lion features, this completely disrupted my daily workflow process.

I used the Notes feature to create pseudo "Tasks" as part of a GTD type of workflow. This allowed me to keep tasks and email messages in different folders. Even though the feature is now gone, I found that I am still able to do the same type of thing with draft email messages. For example:

  • Create a new email message
  • Leave the recipient list blank
  • Give it a subject like "Task: Do this and that"
  • Type in some instructions in the email body
  • Save the email message as a Draft
  • Move the message from the Draft folder to some other folder, like "Today"

The only problem was that I wasn't able to edit the messages after I moved them out of drafts. As a workaround, it can still be edited by moving it temporarily back to drafts.

 

Announcement: Liferay Faces Bridge Certified as JSR 329 Compliant

Company Blogs 9 de Agosto de 2012 Por Neil Griffin Staff

On behalf of Liferay, I'm pleased to announce that as of August 8, 2012, Liferay Faces Bridge (a sub-project of Liferay Faces) has been certified by Oracle as compliant with JSR 329.

JSR 329 is the "Portlet 2.0 Bridge for JavaServer™ Faces 1.2" specification by the JCP. Liferay Faces Bridge 2.1.x has received the official certification (since it is designed for Portlet 2.0 and JSF 1.2). Although Liferay Faces Bridge 3.1.x is designed for Portlet 2.0 and JSF 2.0, it also passes all of the tests in the JSR 329 Technology Compatibility Kit (TCK).

I'd like to extend my personal thanks to Michael Freedman of Oracle -- as the Chairman of the JSR 329 Expert Group, he spent countless hours working on the specification and TCK. He is also a wonderful mentor and friend.

Announcement: Liferay Faces 3.1.0-RC2 Released

Company Blogs 14 de Julho de 2012 Por Neil Griffin Staff

On behalf of Liferay, I'm pleased to announce the latest release of Liferay Faces:

  • Liferay Faces 3.1.0-RC2 (Compatible with Liferay 6.1.x)
  • Liferay Faces 3.0.0-RC2 (Compatible with Liferay 6.0.x)

Project Links

RC2 Status

The release has been designated RC2 (instead of GA1) because there have been significant changes since the release of RC1, and we wanted to be able to give the community time to kick the tires and provide feedback:

  1. FACES-1307: The new liferay-faces-bridge-api.jar artifact has replaced portlet-bridge-api.jar from Apache MyFaces
  2. FACES-1349: The new liferay-faces-util.jar artifact contains common classes/interfaces (see issue details for repackaging and renaming of classes)
  3. FACES-1286: The Public Render Parameters IPC feature has been modified in order to properly comply with the requirements of the JSR 329 Specification.
  4. FACES-1346: The new test/bridge-tck/bridge-tck-runner project provides run the JSR 329 TCK, and 100% of the TCK tests are passing in Liferay 6.1 and Pluto 2.0.3.

Release Highlights

We've been busy since the release of RC1 (about 45 days ago). The release notes provide summary of over 100 resolved issues, and as shown in the chart below, we've really gotten ahead of the curve.

Thanks to everyone in the community that reported issues, contributed patches, and participated in the forums!

Announcement: Liferay Faces 3.1.0-RC1 Released

Company Blogs 1 de Junho de 2012 Por Neil Griffin Staff

Announcement

On behalf of Liferay, I'm pleased to announce the latest release of Liferay Faces:

  • Liferay Faces 3.1.0-RC1 (Compatible with Liferay 6.1.x)
  • Liferay Faces 3.0.0-RC1 (Compatible with Liferay 6.0.x)

Project Links

Release Highlights

This release contains quite a few bug fixes in the bridge, and several improvements in the demo portlets:

  • The jsf2-portlet now demonstrates the ability to upload multiple documents with the HTML5 "multiple" attribute and a fileUploadEvent attribute.
  • The icefaces3-portlet has been enhanced to use ace:dataTable and ace:notificationPanel
  • The icefaces3-compat-portlet has been refactored to use ice:dataTable and ice:panelPopup
  • The primefaces3-portlet has benefited from better integration with p:fileUpload
  • The richfaces4-portlet has been enhanced to use rich:fileUpload, rich:dataTable, and rich:popupPanel

Many of the improvements are related to supporting file upload across the various component suites. Specifically, the fix for FACES-1241 provides enhancements to the bridge's UploadedFile interface and UploadedFileWrapper class. This in turn provided consistency across the demo portlets (each of them now has very similar code for handling file uploads).

Thank You

I wanted to extend my personal thanks to everyone in the community that reported issues and participated in the forums. Your help was invaluable!

JSF PhaseListener instances must be made thread-safe

Company Blogs 30 de Maio de 2012 Por Neil Griffin Staff

I recently performed a Google Search for "phaselistener not thread safe" and realized that this issue is not widely published, so I'd like to take a moment to discuss it here.

Sooner or later, most JSF developers end up developing a PhaseListener implementation like BridgeDebugPhaseListener.java found in Liferay Faces Bridge. One thing to remember though, is that PhaseListener instances are application-wide Singletons that are referenced by the JSF Lifecycle, which itself is an application-wide Singleton. Since these instances are not created within the PortletRequest thread, they need to be made thread-safe.

First, I recommend reading an external blog post section titled Immutable Objects.

Second, I think easiest way for me to explain what is OK and what is NOT OK is by showing some example code:

	package foo;

import javax.faces.event.PhaseId;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseListener;

public class MyPhaseListener implements PhaseListener {

    // Class-level immutable (final) variables are thread-safe since they are read-only
    // and are initialized at about the same time as the constructor. The Java compiler
    // will also permit you to initialize final variables within the body of the constructor.
    private final String classLevelImmutableVariable1 = "cannot-change-me-1";
    private final String classLevelImmutableVariable2; // initialized in constructor

    // Class-level mutable (non-final) variables are NOT thread-safe. Don't use these
    // without synchronization!
    private String classLevelMutableVariable = "can-change-me-but-dont-do-it!";

    // Static final constants (like loggers) are typically thread-safe.
    private static final Logger logger = LoggerFactory.getLogger(MyPhaseListener.class);

    /**
     * PhaseListener constructors execute when Mojarra/MyFaces initializes.
     */
    public MyPhaseListener() {
        // It's OK to initialize final class-level variables here.
        this.classLevelImmutableVariable2 = "cannot-change-me-2";
    }

    public void afterPhase(PhaseEvent phaseEvent) {

        // Accessing method parameters is thread-safe.
        PhaseId phaseId = phaseEvent.getPhaseId();

        // Accessing FacesContext is thread-safe since it is a ThreadLocal singleton.
        FacesContext facesContext = phaseEvent.getFacesContext();
    }

    public void beforePhase(PhaseEvent phaseEvent) {

        // Creating local method variables is thread-safe, since the JVM will create an
        // instance (copy) on the stack for each Thread.
        String mutableLocalMethodVariable = "ok-to-change-me-in-the-scope-of-this-method";

        // Writing to a logger is thread-safe, providing the underlying logger
        // implementation is thread-safe!
        logger.debug("inside beforePhase method");
    }
}

Finally, the bottom line is that the afterPhase(PhaseEvent) and beforePhase(PhaseEvent) methods must not modify class-level mutable (non-final) variables, or any type of memory that is shared by other threads, unless the methods are synchronized or access to the shared data is synchronized. Having said that, relying on synchronization can sometimes cause bottlenecks in an application because it causes other threads to block.

 

 

Internationalizing JSF Portlets

Company Blogs 10 de Maio de 2012 Por Neil Griffin Staff

Note: This blog post has been moved to the Liferay Faces Wiki.

Migrating to Liferay Faces

Company Blogs 10 de Abril de 2012 Por Neil Griffin Staff

The Liferay Faces Reference Documentation has a new chapter titled "Migration Guide" that discusses migration issues that you may encounter when migrating from portletfaces.org projects to Liferay Faces. By way of preview, here are a list of topics discussed:

  • BridgeRequestAttributeListener
  • Configuration Option Names
  • File Upload
  • Facelet Tag Library Namespaces
  • GenericFacesPortlet
  • LiferayFacesContext
  • Logging
  • Portlet Preferences

For more information, you can download the latest version of the PDF from the following page:

http://www.liferay.com/community/liferay-projects/liferay-faces/documentation

If anyone encounters additional migration issues, please comment below and we'll try to get the documentation updated accordingly. Thanks everyone!

New Liferay Faces project at liferay.com

Company Blogs 3 de Abril de 2012 Por Neil Griffin Staff

Press Release

On April 3, 2012 a press release was issued announcing that Liferay will be assuming leadership for the portletfaces.org community. I'm very excited about this development and wanted to take a moment to provide some additional details.

Background

The portletfaces.org community was formed by Liferay Platinum Partner Triton Services, Inc. and Silver Partner Mimacom AG in order to provide support for JSF 2 inside of Liferay Portal. Here at Liferay, we have seen strong demand for JSF portlets from Liferay’s community and customers. Triton and Mimacom recently contributed the projects from portletfaces.org to liferay.com and Liferay has committed to moving the technology forward.

Liferay Faces

Liferay FacesThe portletfaces.org website is being transitioned to its new home at liferay.com:

http://www.liferay.com/community/liferay-projects/liferay-faces

The projects at portletfaces.org have been repackaged under a new umbrella project called Liferay Faces along with some name changes:

Additionally, the java packaging namespace has been refactored: org.portletfaces -> com.liferay

Upcoming Release

The first release of Liferay Faces is version 3.0.0-BETA1 and is scheduled for Friday April 6, 2012. The 3.0.x branch is designed to be used with Liferay 6.0.x based portals. After the release, work will begin on the 3.1.x branch which will target Liferay 6.1.x based portals.

In this first release, the Liferay Faces Alloy and Liferay Facs Portal projects have received some minor bug fixes, but Liferay Faces Bridge has undergone significant development since the last release of PortletFaces Bridge 2.0.2. Specifically, we've focussed on developing the remaining features of JSR 329 and have made great progress towards getting the bridge to pass all of the tests in the JSR 329 Test Compatibility Kit (TCK).

Liferay IDE

Features and support for developing portlets with Liferay Faces will be included in upcoming releases of Liferay IDE and Liferay Developer Studio.

Forums

The forums at portletfaces.org were migrated on April 3, 2012 to their new home at liferay.com:

http://www.liferay.com/community/forums/-/message_boards/category/13289027

If your account at www.portletfaces.org was created prior to January 19, 2012 had the same email address as your account at liferay.com then the posts you made at portletfaces.org should still be authored with your name. Otherwise the author will appear as "PortletFaces Community Member." If you're waiting on an answer on a particular forum post, I recommend that you make a comment on that post in order to make sure you get email alerts. Also, I recommend subscribing to the Liferay Faces forum in general.

JIRA

The issues at jira.portletfaces.org will be consolidated into a single JIRA project called FACES and will soon be migrated to their new home at liferay.com:

http://issues.liferay.com/browse/FACES

If your account at jira.portletfaces.org had the same username as your account at issues.liferay.com then issues you created (or commented on) should continue to be authored with your name. If you didn't have an account at issues.liferay.com then a new account will automatically be created once the migration is complete. If that's the case, then you will probably have to use the "forgot my password" feature in order to setup your password in the new system.

Twitter

I renamed my @portletfaces account at twitter to @liferayfaces. If you were following @portletfaces then you will automatically be following @liferayfaces.

Enterprise Subscription & Support

As soon as Liferay Faces 3.0.0 and 3.1.0 reach their first production release, Liferay EE customers will enjoy support for Liferay Faces according to the Service Level Agreement (SLA) associated with Liferay Enterprise Subscription & Support (ESS).

License Change

The projects at portletfaces.org were released under the Apache 2 license, but the Liferay Faces project will be released under the LGPL 2.1 license which is already used by Liferay on other projects.

Thank You

I wanted to extend my personal thanks to my dear friends at Triton and Mimacom for making this contribution, and to Liferay for taking the lead moving forward. I also want to thank the faithful members of the portletfaces.org community for their support and kind words of encouragement.

 

Utilizing instance storage (ephemeral storage) with RHEL on Amazon EC2

Company Blogs 2 de Setembro de 2011 Por Neil Griffin Staff

Introduction

I recently had the opportunity to launch an Amazon EC2 instance and setup Liferay & MySQL. There were a couple of hurdles that I had to overcome, so I thought I would share the solutions I came up with.

 

Storage: Ephemeral or EBS?

When you launch an RHEL instance on EC2, the disk storage that is provided is a VERY SMALL (7 GB or less) root partition that is contained within the instance itself. This type of storage is called ephemeral. The benefit of ephemeral storage is that it doesn't cost any extra money. The drawback is that it can't participate in the EBS backup solution provided by Amazon -- you'll need to backup files across the network instead. Depending on the size of the instance, you will be given additional ephemeral storage, which is where you can potentially store data or install an app server for Liferay. The Amazon documentation indicates that this will be mounted automatically on /ephemeral0 but I found that this wasn't the case. You will need to use the "fdisk -l" command to find out the device name of the additional ephemeral storage. In my case, I found that the device was named /dev/xvdj. However, there was no filesystem on it, and it wasn't mounted. So you'll need to execute commands like the following:
mkfs -t ext4 /dev/xvdj
mkdir /ephemeral0
echo "/dev/xvdj /ephemeral0 ext4 defaults 1 2" >> /etc/fstab
mount /ephemeral0
 
The alternative storage is called EBS. The benefit is that it can participate in the Amazon backup solution, but the drawback is that it costs extra money. If you want to use EBS instead of ephemeral, you can create EBS Volumes using the Amazon Management Console and then attach them to your instance. Bear in mind that you'll still need to discover the device with "fdisk -l", put a filesystem on it, mount it, etc.
 

Moving MySQL to the additional ephemeral storage

In order to utilize the larger ephemeral storage for database files, I needed to move the MySQL data files from /var/lib/mysql to a filesystem mounted on /ephemeral0. I tried to follow the instructions in section 10.4.1 of the HREL documentation titled "MySQL Changing Database Location" but when I restarted mysqld via "service mysqld start" it reported FAILED, and the following was found in /var/log/mysqld.log:
 
110902 11:35:42 mysqld_safe Starting mysqld daemon with databases from /opt/var/mysql
110902 11:35:42 [Warning] Can't create test file /opt/var/mysql/domU-12-31-39-09-AE-12.lower-test
110902 11:35:42 [Warning] Can't create test file /opt/var/mysql/domU-12-31-39-09-AE-12.lower-test
/usr/libexec/mysqld: Can't change dir to '/opt/var/mysql/' (Errcode: 13)
110902 11:35:42 [ERROR] Aborting
 
The irony here is that section 10.4.1 is meant to show you how to avoid this error.  So I had to find a different approach, and found inspiration in the following articles:
 
The strategy I used was to copy the MySQL files to /ephemeral0, and then mount the ephemeral storage directory back to /var/lib/mysql
 
Step 1: Stop the MySQL server and copy the data files over to /ephemeral0:
[root@server]# service mysqld stop
[root@server]# cd /var/lib
[root@server]# tar cf - mysql/ --selinux | (cd /ephemeral0/var/lib; tar xvfp -)
NOTE: It's really important to keep the --selinux switch so that the SELinux context for each file will be saved in the tarball. Also, it's really important to keep the "p" switch upon extraction, so that file permissions will be preserved.
 
Step 2: Determine the existing selinux settings and re-apply them on a similar var/lib folder structure on /ephemeral0:
[root@server]# ls -lZ / | grep var
drwxr-xr-x. root root system_u:object_r:var_t:s0       var
 
[root@server]# chcon -u system_u -r object_r -t var_t /ephemeral0/var
 
[root@server]# ls -lZ /var | grep lib
drwxr-xr-x. root   root   system_u:object_r:var_lib_t:s0   lib
 
[root@server]# chcon -u system_u -r object_r -t var_t /ephemeral0/var/lib
 
[root@server]# ls -lZ /var/lib | grep mysql
drwxr-xr-x. mysql     mysql    system_u:object_r:mysqld_db_t:s0 mysql
 
Step 3: Re-create the /var/lib/mysql mount point and preserve ownership/group/selinux settings:
[root@server]# cd /var/lib
[root@server]# mv mysql mysql.orig
[root@server]# mkdir mysql
[root@server]# chown mysql mysql
[root@server]# chgrp mysql mysql
[root@server]# chcon -u system_u -r object_r -t mysqld_db_t mysql
 
Step 4: Mount the directory that contains the MySQL data onto the /var/lib/mysql mount point and restart MySQL:
[root@server]# echo "/ephemeral0/var/lib/mysql /var/lib/mysql none bind bind" >> /etc/fstab
[root@server]# mount /var/lib/mysql
[root@server]# service mysqld start
 

Conclusion

The benefit of using this approach is that I didn't have to change any of the settings in the /etc/my.cnf configuration file. Also, I didn't have to fight the selinux security context problem. This approach can also be used for mounting other folders like /opt in order to utilize ephemeral storage.

Fixing SunCertPathBuilderException caused by Maven downloading from self-signed repository

Company Blogs 11 de Agosto de 2011 Por Neil Griffin Staff

If you have a Maven repository running under https with a self-signed certificate, then building a Maven project can report the following error:

Error transferring file: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

There was an Oracle blog posted by Andreas Sterbenz back on Oct 09, 2006 that helped me diagnose the problem, but that blog is no longer available. Thankfully Andreas' blog was re-posted here. For additional information, I found another blog post that was helpful.

Anyways, I fixed this problem by downloading and compiling the source for InstallCert.java and running the following command:

java com.aw.ad.util.InstallCert myhostname.mydomain.com

This generated a file named jssecacerts in the current directory.

On Windows/Linux, this file needs to be copied to the JAVA_HOME/jre/lib/security/ directory.

On Mac needs to be copied to the JAVA_HOME/lib/security/ directory.

After I did this, Maven was able to download the artifacts from the self-signed repository.

 

 

Lightning fast portlet development with JRebel

Company Blogs 22 de Julho de 2011 Por Neil Griffin Staff

Back in April of this year I had the opportunity to speak at the CON-FESS conference in Vienna, Austria. One of the exhibitors there was zeroturnaround.com and I had the privilege of sitting next to founder Jevgeni Kabanov over dinner one night.

Jevgeni described the benefits of JRebel, a JVM-plugin that makes it possible for Java developers to instantly see any code change made to an app without redeploying. Needless to say, redeploying WARs is part of the very fabric of a Liferay portlet developer's life, so I knew that I had to give this product a try with my next ICEFaces 2 portlet with PortletFaces Bridge.

and to my utter amazement... IT WORKED!!!

Simply put, this product is a MUST HAVE for Liferay portlet developers. I'm hooked! Over the past 6 years of portlet development, this product could have saved me COUNTLESS hours of development time waiting for redeploys.

The JRebel documentation is quite good, but here are some quick instructions for how to get started with JRebel and the Liferay+Tomcat bundle:

  1. Download JRebel (30 day free trial)
  2. Install JRebel to it's default location. For example, on the Mac: /Applications/ZeroTurnaround/JRebel
  3. Set the REBEL_HOME environment variable. On the Mac, I find it's best to do this inside the $HOME/.MacOSX/environment.plist file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0"> <dict>
    <key>REBEL_HOME</key>
    <string>/Applications/ZeroTurnaround/JRebel</string>
    </dict>
    </plist>
  4. On Mac, add the following to the LIFERAY_HOME/tomcat/bin/setenv.sh script:
    -javaagent:$REBEL_HOME/jrebel.jar
  5. On Windows, add the following to the LIFERAY_HOME/tomcat/bin/setenv.bat file:
    -javaagent:%REBEL_HOME%\jrebel.jar
  6. Create a rebel.xml file that will be deployed in the runtime classpath of the WAR:Note that if you install the JRebel plugin for Eclipse, IntelliJ 8/9, IntelliJ X, or NetBeans) you can right click on the project and have the IDE generate the file. You can also generate the rebel.xml file with a Maven goal.
    • Maven: src/main/resources/rebel.xml
    • Liferay Plugins SDK: docroot/WEB-INF/src/rebel.xml
  7. Start Tomcat with the liferay/tomcat/bin/startup.sh script (startup.bat on Windows)
  8. Deploy the WAR to the Liferay /deploy folder
  9. Make some Java code changes to your app and click Save in your IDE
  10. Reload your browser, and voila! Instant changes! No redeploy!

 

Mostrando 21 - 40 de 55 resultados.
Items 20
de 3