The ‘Social Enterprise’ according to salesforce.com

I had the chance to go to the saleforce.com CloudForce/CloudStock event in SF yesterday. I went primarily to attend the tech sessions on using Heroku and Amazon AWS, but it was interesting to sit in the keynote session and hear the salesforce CEO Marc Benioff give his sales speech on why Social Media is big for business. In a nutshell, here’s my summary of what social means to business (from the view of salesforce.com):

  • Social Media has exploded in popularity. It’s massive.
  • Integrating the way you do business with Social Media allows you to connect with your customers/clients and their needs, wants, likes, dislikes – accessing a goldmine of marketing information and the potential to building ongoing/interactive relationships with your customers
  • Integrating social media concepts within the enterprise brings benefits of growing communities within the company, increasing inter-team/group/department interactivity, increasing group collaboration and access to current/relative information and events in real time

As a consumer, I’ve often had the opinion that I don’t want company x knowing what I ‘like’ on Facebook, or what videos I’m watching on YouTube. Hearing Benioff and other salesforce.com customers talk about the profound beneficial changes that Social Media is bringing to their companies, it was interesting to hear why this is an important trend for doing business in today’s world. Information is key to succeeding in business, and it’s obvious why businesses ‘want in’ on the social media scene to use this data for their own advantage. Whether all consumers want businesses they interact with to have access to their personal likes, dislikes and online activity though is another story.

Enabling Spring Security Expression-based Access Control for methods in a Spring Roo app

Expression-based Access Control allows you to annotate specific methods with access rules. To enable, add the following element to your webmvc-config.xml file for your Roo webapp (not the security context file, it must be in the context file for the web app):

<security:global-method-security pre-post-annotations="enabled"/>

The explanation for why this needs to be in your webapp context is covered here.

Adding a Mysql datasource to JBoss AS 7

I haven’t used JBoss since 4.x days. Seems adding a datasource is a few steps more complicated than it used to be. To summarize this post, the steps you need are:

  1. create a com/mysql/main dir under /jobss-as-7.1.final-install-dir/modules
  2. drop your mysql connector in this dir
  3. create a module.xml file in the same dir with the following content:
  4. <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.0" name="com.mysql">
      <resources>
        <resource-root path="mysql-connector-java-5.1.18-bin.jar"/>
      </resources>
      <dependencies>
        <module name="javax.api"/>
      </dependencies>
    </module>
  5. modify your jboss-install-dir/standalone/configuration/standalone.xml file and define your datasource by adding a section like this to the subsystem datasources section:
    <datasource jndi-name="java:jboss/datasources/MysqlDS" pool-name="MysqlDS" enabled="true" use-java-context="true">
                        <connection-url>jdbc:mysql://localhost:3306/your_db_name</connection-url>
                        <driver>mysql</driver>
                        <security>
                            <user-name>your_userid</user-name>
                            <password>your_password</password>
                        </security>
                    </datasource>
                    <drivers>
                        <driver name="mysql" module="com.mysql">
                            <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
                        </driver>
                    </drivers>