Archive for the 'Web' Category


JBoss vs WebLogic tidbits..

Jun 10, 2010 in JBoss, Weblogic

Porting JBoss EJB3s to WebLogic is not trivial.. Here are some of the compliance exceptions:

  • weblogic.ejb.container.compliance.ComplianceException: Home methods are not allowed on session beans: BookTestBean.test()

  • weblogic.ejb.container.compliance.ComplianceException: In EJB BookTestBean, method test() on the home interface does not throw java.rmi.RemoteException. This is a required exception.

  • weblogic.ejb.container.compliance.ComplianceException: In EJB BookTestBean, the home interface de.laliluna.library.BookTestBeanLocal must extend the javax.ejb.EJBHome interface.

  • weblogic.ejb.container.compliance.ComplianceException: In EJB BookTestBean, the home interface of a stateless session bean must have one create method that takes no arguments.

  • weblogic.ejb.container.compliance.ComplianceException: In EJB BookTestBean, the return type for the home create method create() must be the remote interface type of the bean.

Persistence-related exception:

org.apache.openjpa.util.MetaDataException: “” declares generator name “book_sequence”, but uses the AUTO generation type. The only valid generator names under AUTO are “uuid-hex” and “uuid-string”.

To fix it, change this:

// For JBoss
@GeneratedValue(strategy = GenerationType.AUTO, generator = "book_sequence")

to this:

// For WebLogic
@GeneratedValue(strategy = GenerationType.AUTO)

More on persistence.. the default provider for WebLogic is a package named ‘Kodo’.
To set the OpenJPA (Java Persistence API) provider, add the element
to persistence.xml , like this:

<persistence xmlns=""

        <persistence-unit name="FirstEjb3Tutorial" transaction-type="JTA">
                        <property name="openjpa.ConnectionURL" value="jdbc:pointbase:server://localhost:18888/fe3t"/>
                        <property name="openjpa.ConnectionDriverName" value="com.pointbase.jdbc.jdbcUniversalDriver"/>
                        <property name="openjpa.ConnectionUserName" value="fe3t"/>                   
                        <property name="openjpa.ConnectionPassword" value="fe3t"/>
                        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/>

Note the “openjpa.” qualifier .. Persistence will not work without it ..

EJB container interface..

Jun 07, 2010 in EJB, JBoss, Weblogic

  1. ejbCreate, ejbPostCreate
  2. ejbLoad, ejbStore
  3. ejbActivate, ejbPassivate

Weblogic 10 Administration notes..

Apr 14, 2010 in Server, Web, Weblogic


— Using the WL Scripting Tool (WLST)
If you are working on the WL server you can use the WL Scripting Tool to browse the available Runtime beans:
D:\Data\bea\wlserver_10.0\server\bin>java weblogic.WLST

— Administer IIOP, Channels (t3)

Environment->Servers->[myServer]->Protocols [tab]

Basic Weblogic 10.3 installation and configuration notes ..

Mar 26, 2010 in Server, Web, Weblogic

— After installing the server, run the configuration and setup the “base_domain”.

— The “base_domain” directory is parallel to the “wlserver_10.3” directory.
IOW: If the root path to the installation directory is “/Oracle/mw”, the “wlserver_10.3” is here:


and “base_domain” is here:


The “base_domain/bin” (and the other domains) directory contains scripts:

— If you cannot log into the administration console, change this file:


from this (like this..):


to this:


(or whatever user/password you wish)

and restart the server. If you cannot stop the server, do a “kill -1 pid” with the server “pid”.

— I find the weblogic app structure confusing..
I am sure that there is a good reason for this
and I just do not know it but it is still confusing..

There are


and there are


Just be aware ..

wget usage example..

Mar 03, 2010 in Linux, Network, Web

wget –recursive -x -l 0 -e robots=off –wait 1 \
-U Mozilla –no-parent –user=user –password=password \

Tomcat performance monitoring..

Aug 27, 2009 in Java, Tomcat


  • Tomcat Resource Pools.

    Connector Thread Pool

    Database Connection Pool

  • Use Tomcat Valves for implementing lightweight monitoring w/o JMX.

Detecting domain names in php ..

Jul 14, 2009 in php, Web


if (strpos(getenv('SERVER_name'), '')!==false) { 
  echo "<img src='1.jpg'>"; 
} elseif (strpos(getenv('SERVER_name'), '')!==false) { 
  echo "<img src='2.jpg'>"; 

Joomla templates design tutorial ..

Jul 10, 2009 in Joomla

Good article on creating templates for Joomla

Joomla Template Tutorial

Notes on “Java Web Services” ..

Jul 02, 2009 in Books, Java, Software, WebServices

This book is a bit old.. 2002..

  • — SOA – Service Oriented Architecture
    — 3 major roles: Provider, Registry (Broker) and Requester.
    — SOA is based on web services.
  • — SOAP – Simple Object Access Protocol
    — 2 major methods: Message-based Document Exchange AND RPC
    (Remote Procedure Calls).
    — All structures based on XML.
    — A SOAP message contains an Envelope and a Header.
    — A SOAP message may contain (MIME) attachments.
    — Main transport protocol is HTTP(S).
    — Providers (Receivers) are usually based on Servlets.
  • — SOAP-RPC
    — Method signatures contain a single SOAP structure.
    — SOAP service methods must match info in deployment descriptor.
    — Errors and Faults: VersionMismatch, MustUnderstand, DTDNotSupported, etc..
  • — WSDL – Web Services Description Language
    — WSDL is an XML grammar for describing a web service
    as a collection of access end-points capable of exchanging
    messages in a procedure- or document-oriented fashion (p. 72)
    — The reasonable flow is to create service methods and
    than generate WSDL from code using tools.
    — Best practices: web service is (functionally) coarse-grained
    and messages are more business-oriented than programmatic.
  • — UDDI – Universal Description, Discovery and Integration
    — Similar to an Internet search engine for businesses.
    — UBR – UDDI Business Registry (the Public Cloud).
    — Designed for B2B mostly.
    — 2 APIs: inquiry and publishing API.
    — JAXR = Java API for XML Registries.
    — Some details: Categorization (NAICS, ISO, etc..),
    Identifier (DUNS, Thomas Reg, etc),
    tModel (web service metadata)
  • — JAX-RPC and JAXM
    — JAXM = Java API for XML Messaging.
    — JAX-RPC = Java API for XML-based RPC.
    — JAXM may be used as a frontend to SOAP-based messaging
    frameworks through the use of “profiles”.
    — JAX-RPC covers code generation for client and server parts,
    dynamic SOAP, creating services within J2EE and J2SE environments,
    bindings, serialization, mapping of datatypes between WSDL and Java,
  • — The Java Web Service (JWS) Standard
    — Proposed by BEA, using templates to create simple web services.
    — Example (HelloWorld.jws <- note the .jws extension)
    Note the annotations @operation, @conversation ..

    import com.bea.jws.*
    public class HelloWorld extends Service {
      * @operation
      * @conversation stateless
      public String getHelloWorld() {
        return "Hello, World!";

    Other values for @conversation are ‘start’, ‘continue’ or
    ‘finish’. The ‘start’ directive, for example, starts a session.

  • — Security notes
    — Use of SSL (HTTPS), encryption, signing and secure hashing.
    — Security Assertion Markup Language (SAML) – used with Single Sign-On (SSO).
  • — Resources

Colophon – European (Alpine) Ibex – a wild goat.

Hudson continous integration server notes ..

Nov 20, 2008 in Apache, Config Manage

Fastest way to plug tomcat into apache httpd..

Change apache2.conf, add:

<Location /your_tomcat_app>
  ProxyPass ajp://your_host:8009/your_tomcat_app
  Order allow,deny
  allow from all

More notes on Hudson here:

Hudson is here: