[JBossCache] - One node in two clusters?
by chrismeadows
Is it possible for one cache node to be in two clusters? I've read in a couple of places around the JBoss website that it is possible, but haven't seen how to configure the cache in that way.
What config sections do I duplicate?
The reason I want to do this as follows; I have a cluster in Europe and a cluster in USA. The nodes in each cluster replicate synchronously over LAN via UDP. Then I want one node of each cluster to also replicate asynchronously over WAN via TCP to the other cluster.
What config setup do I need for the nodes that are replicating both within the LAN and the WAN? Do I duplicate the JGroup config, but then how do I relate the UDP config to sync LAN replication and TCP config to async WAN replication?
Or do I have to use a shared cache loader? I've thought about it, but that seems a tricky implementation and so doesn't feel like the right solution.
Can anyone provide any insight? Or better still, an example config file?
Thanks for any help,
Chris
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018870#4018870
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018870
19Â years, 2Â months
[JCA/JBoss] - Re: idle time out question
by arparikh
Here is the code snippets.
Below is the getConnection which returns Connection object
public void init(String resourceId, String resourceName, boolean defaultResource) throws DBException {
try {
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
this.m_sources.put(resourceId, envCtx.lookup(resourceName));
if (defaultResource) {
this.m_defaultResourceId = resourceId;
}
}
catch (NamingException ne) {
throw new DBException(ne);
}
}
public Connection getConn(String resourceId) throws DBException {
if (resourceId == null) {
resourceId = this.m_defaultResourceId;
}
try {
DataSource dataSource = (DataSource) this.m_sources.get (resourceId);
if (dataSource == null) {
m_logger.error("###### FATAL ERROR -- DATA SOURCE NULL #######");
}
Connection conn = dataSource.getConnection();
if (conn == null) {
// try again????
conn = dataSource.getConnection();
if (conn == null) {
m_logger.error("###### FATAL ERROR -- CONNECTION NULL #######");
}
}
conn.setAutoCommit(true);
return conn;
}
catch (SQLException se) {
throw new DBException(se);
}
}
Below is the code where we call getConnection to the connection object. We are getting NullPointer where we do conn.close(). The thing that I am wondering is if we are getting null conn, we should get null pointer at conn.setAutoCommit in getConnection or conn.createStatement. But instead we are getting on conn.close
public void doSelect(String p_sql, int[] p_dataTypes) throws DBException
{
Connection conn = null;
Statement sqlStmt = null;
ResultSet resultSet = null;
RecSet recset = new RecSet(this.m_resourceId);
try
{
conn = DBConnMgr.getInstance().getConn(this.m_resourceId);
// The above code getConn which is pasted above
if (conn != null) {
m_logger.info("@@@@ We got the connection object");
} else {
m_logger.info("######## DBSelect.doSelect CONNECTION IS NULL!!! ########");
}
sqlStmt = conn.createStatement();
/*
if (p_dataTypes != null)
{
for (int i = 0; i < p_dataTypes.length; i++)
{
//sqlStmt.defineColumnType(i+1, p_dataTypes);
}
}
*/
resultSet = sqlStmt.executeQuery(p_sql);
//operate on resultSet here
}
catch (SQLException se)
{
if (DBConnMgr.getInstance().isFatalError(se))
{
throw new DBException("Exception: " + se + ": " + se.getErrorCode() +
"\n" + "Database is down " + "\n", se.getErrorCode());
}
else
{
throw new DBException("Exception: " + se + ": " + se.getErrorCode() +
"\n" + "Could not perform " + p_sql + "\n");
}
}
finally
{
try
{
if (resultSet != null)
{
resultSet.close();
}
if (sqlStmt != null)
{
sqlStmt.close();
}
}
catch (SQLException se)
{
throw new DBException("Exception: " + se + "\n" +
"Could not close sql statement" + "\n");
}
finally
{
try
{
conn.close();
}
catch (SQLException se)
{
m_logger.info("Failed to close DB connection");
}
}
}
m_logger.debug("Successful " + p_sql + "\n");
}
Thanks for the assistance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018868#4018868
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018868
19Â years, 2Â months
[JBoss jBPM] - Re: How to tell how far the process has moved along in the w
by kpalania
Anyone else with some useful answers, please respond (and kukeltje, please ignore this thread).
Are there some samples out there that could help someone get a quick start on this? I've worked on several different technologies over the years, and I don't believe the jBPM documentation is upto the mark (atleast, nowhere compared to the Oracle documentation of related technologies, like Oracle BPEL, etc, that I'm familiar with).
I looked at the jbpm.token table, and it seems to only list the forks. My workflow has a number of nodes and states, following these forks, but I don't see that in that table. And, I haven't been able to find the documentation for these jBPM tables to get a sense for the schema. It has mainly been through a bunch of different queries that I've written, that I've gotten any feel for the data in these tables.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018862#4018862
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018862
19Â years, 2Â months
[JBoss Seam] - parameterised method receives null object
by damatrix
I'm using Seam 1.1.6.GA. My problem is with the following bit of code on my facelet:
| <h:form>
| <h:outputLabel for="name" value="Customer's name: "/>
| <h:outputText id="name" value="#{registration.customer.fullname}"/>
| <br/><br/>
| <h:outputLabel for="fair" value="Fair: "/>
| <h:commandLink id="fair" value="#{registration.fair.title}" action="#{advertManager.beginApplication(regisration)"/>
| <br/><br/>
| <h:outputLabel for="category" value="Product category: "/>
| <h:outputText id="category" value="#{registration.category.title}"/>
| <br/><br/>
| </h:form>
|
The whole page renders with all the outputText values as well as the h:commandLink. However clicking the h:commandLink calls the method expression with the parameter being null.
I don't understand why the method is called with a null parameter, when that same "registration" object being passed is obviously not null from the page preceding the method call. If it is any help the "registration" object is outjected from a SESSION scoped seam component before being displayed on this page.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4018857#4018857
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4018857
19Â years, 2Â months