Skip to content

Instantly share code, notes, and snippets.

View raj-rajaratnam's full-sized avatar

Rajkumar Rajaratnam raj-rajaratnam

View GitHub Profile
package org.wso2.axis2.axiom.service;
public class Product {
private int productId;
private String productName;
private String productDescription;
private double price;
public Product(int productId, String productName, String productDescription, double price) {
<!doctype html>
<html>
<head>
<title>Hoovam eBanking Portal</title>
<link rel="stylesheet" href="styles.css">
</head>
<%
application.put('account',
{
'admin' : {
'name':'Rajkumar',
'accountNumber':'8008006514',
'accountType':'Saving',
'balance':'LKR 28,256.00',
public class CartridgeAgentUtils {
private static final Log log = LogFactory.getLog(CartridgeAgentUtils.class);
public static List<String> splitUsingTokenizer(String string, String delimiter) {
StringTokenizer tokenizer = new StringTokenizer(string, delimiter);
List<String> list = new ArrayList<String>(string.length());
while (tokenizer.hasMoreTokens()) {
list.add(tokenizer.nextToken().trim());
}
return list;
Multiple Network Interfaces Support in Apache Stratos
-----------------------------------------------------
Apache Stratos now supports assigning any number of floting IPs to any interface of your cartridge VM instances. This feature is implemented using Jclouds openstack-neutron APIs. Most importantly it is not breaking existing features. You can still use openstack with nova networking environment and stratos will use Jclouds openstack-nova networking APIs to the networking stuffs as previous. If you have openstack with neutron networking environment, you can get benefit from this feature.
How do you tell Stratos which openstack networking API to use?
---------------------------------------------------------
Which openstack networking API to be used is configurable via cloud-controller xml.
```json
{
class { 'postgresql::server':
ip_mask_deny_postgres_user = '0.0.0.0/32',
ip_mask_allow_all_users = '0.0.0.0/0',
listen_addresses = '*',
manage_firewall = true,
postgres_password = 'postgres'
}
class {'phppgadmin':
db_host = 'localhost',
db_port = '5432',
owned_only = false,
extra_login_security = false
}
postgresql::server::db { 'stratos-postgres-sample':
user = 'root',
password = postgresql_password('root', 'root'),
}
{
"type" : "postgresql",
"provider" : "data",
"host" : "stratos.com",
"displayName" : "postgresql",
"description" : "postgresql Cartridge",
"version" : "7",
"multiTenant" : "false",
"portMapping" : [
{
public class HelloService {
public String sayHello(String name) {
System.out.println("Hello " + name);
}
}