Jboss deploiment problem
I have try to deploy my ADF application project to Jboss application server 4.2.2 and 5.0.1 and I have the same problem, when i add jboss in jdevelopper and i want to deploy my
project to jboss this message will appear :
Presentation not available: JSR-88, Interface: javax.enterprise.deploy.spi.DeploymentManager
someone can help me!!!!.
Hi!
I have the same problem, when I try to deploy to Tomcat. Does any one have a solution to this problem, or a work around for deploying an application to a tomcat server.
Br
Casper
Similar Messages
-
I am running with the latest version of JBoss. I have tried to deployee the generated
.war file as per the instruction listed on this forum. When I start JBoss with
the run command I get the following error. What could be the cause of this?
11:34:23,535 WARN [Tomcat5] Failed to parse descriptors for war(file:/C:/jboss-
4.0.2/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/)
org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/jboss-web.xml;
- nested throwable: (org.jboss.deployment.DeploymentException: resource-ref jdb
c/localOracleDatabase found in jboss-web.xml but not in web.xml)
at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer
.java:689)
at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:328
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:828)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:848)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:765)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
The jboss-web.xml is as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE jboss-web PUBLIC
"-//JBoss//DTD Web Application 2.3V2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
<jboss-web>
<resource-ref>
<res-ref-name>jdbc/localOracleDatabase</res-ref-name>
<jndi-name>java:/DefaultDS</jndi-name>
</resource-ref>
</jboss-web>
The applicable part of the web.xml is as follows:
<resource-ref>
<description>Rave generated DataSource Reference</description>
<res-ref-name>jdbc/localOracleDatabase</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
This all runs fine in the sun app server.Good afternoon,
Dongmei's article (http://wiki.java.net/bin/view/Javatools/UsingEJBsDeployedInJBoss) is very helpful. However, our goal is to deploy both the EJB and the .war file in the JBoss server. Could somebody tell me how to deploy both the EJB and the .war file in a JBoss Application Server? I tried deploying the EJB and the .war file separately, or wrapping both in a .ear file, but I still did not get it.
Thank you very much in advance.
Daniel -
Deployement problem in jboss for rar
Hi all,
I may be wrong to post this messsage in this form, sorry. I am new to JCA. I tried to deploy the hello world rar (ibm example for jca) in jboss but it failed, the following is the execption i am getting at the time of deployement
14:19:40,953 ERROR [MainDeployer] Could not initialise deployment: file:/C:/jbos
s-4.0.0RC1/server/default/deploy/hw-ds.xml
org.jboss.deployment.DeploymentException: Could not parse dd; - nested throwable
: (org.xml.sax.SAXParseException: A pseudo attribute name is expected. )
at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:255)
at org.jboss.deployment.XSLSubDeployer.init(XSLSubDeployer.java:188)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:727)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:664)
at org.jboss.deployment.MainDeployer.addDeployer(MainDeployer.java:267)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
Incompletely deployed packages:
org.jboss.deployment.DeploymentInfo@4b279edb { url=file:/C:/jboss-4.0.0RC1/serve
r/default/deploy/hw-ds.xml }
deployer: org.jboss.deployment.XSLSubDeployer@178655
status: null
state: FAILED
watch: file:/C:/jboss-4.0.0RC1/server/default/deploy/hw-ds.xml
altDD: null
lastDeployed: 1124959780953
lastModified: 1124959779093
mbeans:
What i did was
1. created/compiled all the class files (Connection, ConnectionFactory, Records....)
2. created the jar file hw.jar
3. created deployement descriptor META-INF/ra.xml
4. created the rar file hw.rar
5. created hw-ds.xml (i may miss some thing in this file deployment sepcfic to jboss)
<?xml version="1.0" encoding="UTF-8">
<connection-factories>
<no-tx-connection-factory>
<jndi-name>HW</jndi-name>
<rar-name>hw.rar</rar-name>
<connection-definition>
javax.resource.cci.ConnectionFactory
</connection-definition>
</no-tx-connection-factory>
</connection-factories>
i may miss something in this file... please help me what i am missing to run this application
thanks in advance
baijuHi Baiju,
Give a chance to add a final question mark ("?") in the first line of your xml datasource definition file, like this:
<?xml version="1.0" encoding="UTF-8"?>
HTH,
-Brice. -
Deployement problem in oc4j with hibernate + JPA and Spring
Dear All,
From last 2 days I am facing a problem in deployment of our application in oc4j client of oracle app server.
I am getting the following exception
Operation failed with error: [mkclsets:mkclsets] - Exception creating EntityManagerFactory using PersistenceProvider class oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider for persistence unit mkclsetsPersistenceUnit.When I am deploying the same application in tomcat app server its working fine. But I am unable to deploy the same in oc4j.
I am using the following technologies
Spring 2.0
Struts 2.0
Hibernate 3.3
JPA 1.0
OC4J 10.1.3.3.0
IDE : my eclipse 6.0
My persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="mkclsetsPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<!-- jta-data-source>mkclDS</jta-data-source-->
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OC4JTransactionManager"/>
</properties-->
</persistence-unit>
</persistence>Datasource-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" lazy-init="true"/>
<!-- following code is for using oracle -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
<property name="driverClassName">
<value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="url">
<value>jdbc:oracle:thin:@//xxxx.xxxx.xxxx.xxxx:1521/mydb</value>
</property>
<property name="username">
<value>tpsadmin</value>
</property>
<property name="password">
<value>tpsadmin</value>
</property>
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" lazy-init="true">
<property name="persistenceUnitName" value="mkclsetsPersistenceUnit"/>
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" lazy-init="true">
<property name="database" value="ORACLE"/>
<property name="showSql" value="true"/>
</bean>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" lazy-init="true">
<property name="entityManagerFactory" ref="entityManagerFactory"></property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
</beans>Server.xml (oc4j/j2ee/home/config)
<?xml version="1.0"?>
<application-server xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/application-server-10_1.xsd" application-directory="../applications"
check-for-updates="adminClientOnly"
deployment-directory="../application-deployments"
connector-directory="../connectors"
schema-major-version="10" schema-minor-version="0" >
<shared-library name="global.libraries" version="1.0" library-compatible="true">
<code-source path="../applib"/>
</shared-library>
<shared-library name="global.tag.libraries" version="1.0" library-compatible="true">
<code-source path="../../home/jsp/lib/taglib/"/>
<code-source path="../../../j2ee/home/jsp/lib/taglib/"/>
<code-source path="../../../lib/dsv2.jar"/>
<import-shared-library name="oracle.xml"/>
<import-shared-library name="oracle.jdbc"/>
<import-shared-library name="oracle.cache"/>
<import-shared-library name="soap"/>
</shared-library>
<shared-library name="oracle.persistence" version="1.0" library-compatible="true">
<code-source path="../../../toplink/jlib/toplink-essentials.jar"/>
<import-shared-library name="oracle.jdbc"/>
</shared-library>
<shared-library name="hibernatejpa" version="1.0">
<code-source path="ejb3-persistence.jar"/>
<code-source path="hibernate3.jar"/>
<code-source path="hibernate-annotations.jar"/>
<code-source path="hibernate-commons-annotations.jar"/>
<code-source path="hibernate-entitymanager.jar"/>
<code-source path="jboss-archive-browsing.jar"/>
<code-source path="jta.jar"/>
</shared-library>
<shared-library name="db" version="1.0">
<code-source path="ojdbc14.jar"/>
</shared-library>
<shared-library name="displaytab" version="1.0">
<code-source path="commons-beanutils-1.7.0.jar"/>
<code-source path="commons-lang-2.3.jar"/>
<code-source path="displaytag-1.1.1.jar"/>
</shared-library>
<shared-library name="ehCache" version="1.0">
<code-source path="backport-util-concurrent.jar"/>
<code-source path="ehcache-1.4.0-beta2.jar"/>
<code-source path="jsr107cache-1.0.jar"/>
</shared-library>
<shared-library name="json" version="1.0">
<code-source path="ezmorph-1.0.4.jar"/>
<code-source path="json.jar"/>
</shared-library>
<shared-library name="other_sets" version="1.0">
<code-source path="commons-fileupload-1.1.jar"/>
<code-source path="dom4j-1.6.1.jar"/>
<code-source path="dwr.jar"/>
<code-source path="javassist.jar"/>
<code-source path="log4j-1.2.13.jar"/>
</shared-library>
<shared-library name="spring2" version="1.0">
<code-source path="aspectjrt.jar"/>
<code-source path="aspectjweaver.jar"/>
<code-source path="cglib-nodep-2.1_3.jar"/>
<code-source path="spring.jar"/>
</shared-library>
<shared-library name="struts2" version="1.0">
<code-source path="antlr-2.7.2.jar"/>
<code-source path="commons-collections.jar"/>
<code-source path="commons-io-1.1.jar"/>
<code-source path="commons-logging-1.0.4.jar"/>
<code-source path="freemarker-2.3.8.jar"/>
<code-source path="ognl-2.6.11.jar"/>
<code-source path="struts2-core-2.0.9.jar"/>
<code-source path="struts2-spring-plugin-2.0.9.jar"/>
<code-source path="xwork-2.0.4.jar"/>
</shared-library>
<rmi-config path="./rmi.xml" />
<jms-config path="./jms.xml" />
<javacache-config path="../../../javacache/admin/javacache.xml" />
<j2ee-logging-config path="./j2ee-logging.xml" />
<log>
<file path="../log/server.log" />
</log>
<java-compiler name="javac" in-process="false" options="-J-Xmx1024m -encoding UTF8" extdirs="C:\Program Files\Java\jdk1.5.0_07\jre\lib\ext" />
<global-application name="default" path="application.xml" parent="system" start="true" />
<application name="javasso" path="../../home/applications/javasso.ear" parent="default" start="false" />
<application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="true" />
<application name="Test" path="../applications\Test.ear" parent="default" start="true" />
<application name="OraTest" path="../applications\OraTest.ear" parent="default" start="true" />
<global-web-app-config path="global-web-application.xml" />
<transaction-manager-config path="transaction-manager.xml" />
<web-site default="true" path="./default-web-site.xml" />
<cluster id="6745699755968" />
</application-server>Orion-application.xml (oc4j/j2ee/home/config)
<?xml version="1.0"?>
<orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd" deployment-version="10.1.3.1.0" default-data-source="jdbc/OracleDS" component-classification="external"
schema-major-version="10" schema-minor-version="0" >
<imported-shared-libraries>
<import-shared-library name="hibernatejpa"/>
<import-shared-library name="db"/>
<import-shared-library name="displaytab"/>
<import-shared-library name="ehCache"/>
<import-shared-library name="json"/>
<import-shared-library name="other_sets"/>
<import-shared-library name="spring2"/>
<import-shared-library name="struts2"/>
</imported-shared-libraries>
</orion-application>Please help to deploy my application, I created one application with struts2 and spring2 and that is working fine, but when I try to add JPA with hibernate 3.3 I am unable to deploy it.
Thanks a lot in advance.
With best regards,
IshaanHi,
Thank you very much for your reply. the previous Exception has gone but now I get the following one.
Exception: NoClassDefFoundError: Missing class: org.dom4j.DocumentException Dependent class: org.hibernate.ejb.HibernatePersistence Loader: hibernatejpa:1.0 Code-Source: /C:/oracle123/j2ee/home/shared-lib/hibernatejpa/1.0/hibernate-entitymanager.jar Configuration: in /C:/oracle123/j2ee/home/config/server.xml The missing class is available from the following locations: 1. Code-Source: /C:/oracle123/j2ee/home/shared-lib/other_sets/1.0/dom4j-1.6.1.jar (from in /C:/oracle123/j2ee/home/config/server.xml) This code-source is available in loader other_sets:1.0.
[Jun 2, 2008 10:57:17 AM] Operation failed with error: Missing class: org.dom4j.DocumentException Dependent class: org.hibernate.ejb.HibernatePersistence Loader: hibernatejpa:1.0 Code-Source: /C:/oracle123/j2ee/home/shared-lib/hibernatejpa/1.0/hibernate-entitymanager.jar Configuration: in /C:/oracle123/j2ee/home/config/server.xml The missing class is available from the following locations: 1. Code-Source: /C:/oracle123/j2ee/home/shared-lib/other_sets/1.0/dom4j-1.6.1.jar (from in /C:/oracle123/j2ee/home/config/server.xml) This code-source is available in loader other_sets:1.0. with bset regards,
ishaan -
Mysql, Jboss connecting problem
Hello,
I am having problem with mysql database. I am trying to run AccountEJB application from SUN with mysql as my backend.
PLEASE DO NOT FORGET I AM NOT EXPERT IN JBOSS OR EJB BUT I AM TRYING TO LEAN WITH A EXAMPLE.
HERE IS MY SETUP UP TO THIS POINT.
I am running jboss-3.03.0_tomcat-4.0.3
I am including
1. AccountBean
2. ejb-jar.xml
3. web.xml
4. jboss.xml
6. mysql-service.xml ( I add my database name, username, password and i copy it to ..server/default/deploy dir.)
I only modified mysql-service.xml. Do i have to modify any other jboss files. Some people are saying i have to modify "standardjaws.xml, standardjbosscmp.xml"
My AccountBean code is
Please take a look at "setEntityContext" and "makeConnection" that is where problem comes.
Here is the error
10:43:19,950 INFO [Engine] AccountServlet: init
10:43:19,950 INFO [STDOUT] AccountServlet: init()
10:43:20,101 INFO [STDOUT] Got context
10:43:20,311 INFO [STDOUT] Got referance
10:43:20,371 INFO [STDOUT] Got referance to home object
10:43:20,501 INFO [STDOUT] setEntityContext call....
10:43:20,501 INFO [STDOUT] makeConnection call...
10:43:20,501 INFO [STDOUT] Something went wrong within makeConnction call ....
javax.naming.NameNotFoundException: MySqlDS not bound
10:43:20,501 INFO [STDOUT] Came back from makeConnction call ...
10:43:20,501 INFO [STDOUT] ejbCreate call
10:43:20,501 INFO [STDOUT] insertRow call...
10:43:20,511 ERROR [STDERR] Caught an exception.
10:43:20,511 ERROR [STDERR] java.rmi.ServerException: ejbCreate: null; nested ex
ception is:
javax.ejb.EJBException: ejbCreate: null
package com.ps.impl;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import java.sql.*;
import javax.sql.*;
import javax.ejb.*;
import javax.naming.*;
import java.util.*;
import java.rmi.*;
public class AccountBean implements EntityBean
private EntityContext context;
private String id;
private String firstName;
private String lastName;
private double balance;
private Connection con;
//private String dbName = "java:/MySqlDS";
public void debit (double amount)
if (balance - amount < 0)
else
balance = balance - amount;
public void credit (double amount)
balance = balance + amount;
public String getFirstName()
return firstName;
public String getLastName()
return lastName;
public double getBalance()
return balance;
public String ejbCreate(String id, String firstName, String lastName, double balance)
throws CreateException
System.out.println("ejbCreate call");
if (balance < 0.00) {
throw new CreateException
("A negative initial balance is not allowed.");
try {
insertRow(id, firstName, lastName, balance);
} catch (Exception ex) {
throw new EJBException("ejbCreate: " +
ex.getMessage());
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
this.balance = balance;
return id;
public void ejbPostCreate(String id, String firstname, String lastname, double blance)
public String ejbFindByPrimaryKey(String primaryKey)
throws FinderException
System.out.println("ejbFindPrimaryKey call...");
boolean result;
try {
result = selectByPrimaryKey(primaryKey);
} catch (Exception ex) {
throw new EJBException("ejbFindByPrimaryKey: " +
ex.getMessage());
if (result) {
return primaryKey;
else {
throw new ObjectNotFoundException
("Row for id " + primaryKey + " not found.");
public Collection ejbFindByLastName(String lastName)
throws FinderException
System.out.println("ejbFindByLastName call...");
Collection result;
try {
result = selectByLastName(lastName);
} catch (Exception ex) {
throw new EJBException("ejbFindByLastName " +
ex.getMessage());
if (result.isEmpty()) {
throw new ObjectNotFoundException("No rows found.");
else {
return result;
public Collection ejbFindInRange(double low, double high)
throws FinderException
System.out.println("ejbFindRange call ....");
Collection result;
try {
result = selectInRange(low, high);
} catch (Exception ex) {
throw new EJBException("ejbFindInRange: " +
ex.getMessage());
if (result.isEmpty()) {
throw new ObjectNotFoundException("No rows found.");
else {
return result;
public void ejbActivate()
System.out.println("ejbActivate call ...");
id = (String)context.getPrimaryKey();
public void ejbLoad()
System.out.println("ejbLoad call ...");
try {
loadRow();
} catch (Exception ex) {
throw new EJBException("ejbLoad: " +
ex.getMessage());
public void ejbPassivate()
id = null;
public void ejbRemove()
System.out.println("ebjRemove call ...");
try {
deleteRow(id);
} catch (Exception ex) {
throw new EJBException("ejbRemove: " +
ex.getMessage());
public void ejbStore()
System.out.println("ejbStore call ...");
try {
storeRow();
} catch (Exception ex) {
throw new EJBException("ejbLoad: " +
ex.getMessage());
public void setEntityContext(EntityContext context)
this.context = context;
System.out.println("setEntityContext call....");
try {
makeConnection();
System.out.println("Came back from makeConnction call ...");
} catch (Exception ex) {
throw new EJBException("Unable to connect to database " +
ex.getMessage());
public void unsetEntityContext()
System.out.println("unsetEntityContext call ...");
try {
con.close();
} catch (SQLException ex) {
throw new EJBException("unsetEntityContext: " + ex.getMessage());
/*********************** Database Routines *************************/
private void makeConnection() throws NamingException, SQLException
System.out.println("makeConnection call...");
try
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("java:/MySqlDS");
con = ds.getConnection();
catch (Exception ex)
System.out.println("Something went wrong within makeConnction call .... " + ex);
private void insertRow (String id, String firstName, String lastName,
double balance) throws SQLException {
System.out.println("insertRow call...");
String insertStatement =
"insert into account values ( ? , ? , ? , ? )";
PreparedStatement prepStmt =
con.prepareStatement(insertStatement);
prepStmt.setString(1, id);
prepStmt.setString(2, firstName);
prepStmt.setString(3, lastName);
prepStmt.setDouble(4, balance);
prepStmt.executeUpdate();
prepStmt.close();
private void deleteRow(String id) throws SQLException {
System.out.println("deleteRow call ...");
String deleteStatement =
"delete from account where id = ? ";
PreparedStatement prepStmt =
con.prepareStatement(deleteStatement);
prepStmt.setString(1, id);
prepStmt.executeUpdate();
prepStmt.close();
private boolean selectByPrimaryKey(String primaryKey)
throws SQLException {
System.out.println("selectByPrimaryKey call...");
String selectStatement =
"select id " +
"from account where id = ? ";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, primaryKey);
ResultSet rs = prepStmt.executeQuery();
boolean result = rs.next();
prepStmt.close();
return result;
private Collection selectByLastName(String lastName)
throws SQLException {
System.out.println("selectByLastName call...");
String selectStatement =
"select id " +
"from account where lastname = ? ";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, lastName);
ResultSet rs = prepStmt.executeQuery();
ArrayList a = new ArrayList();
while (rs.next()) {
String id = rs.getString(1);
a.add(id);
prepStmt.close();
return a;
private Collection selectInRange(double low, double high)
throws SQLException {
System.out.println("selectInRange call ....");
String selectStatement =
"select id from account " +
"where balance between ? and ?";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setDouble(1, low);
prepStmt.setDouble(2, high);
ResultSet rs = prepStmt.executeQuery();
ArrayList a = new ArrayList();
while (rs.next()) {
String id = rs.getString(1);
a.add(id);
prepStmt.close();
return a;
private void loadRow() throws SQLException {
System.out.println("loadRow call ....");
String selectStatement =
"select firstname, lastname, balance " +
"from account where id = ? ";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, this.id);
ResultSet rs = prepStmt.executeQuery();
if (rs.next()) {
this.firstName = rs.getString(1);
this.lastName = rs.getString(2);
this.balance = rs.getDouble(3);
prepStmt.close();
else {
prepStmt.close();
throw new NoSuchEntityException("Row for id " + id +
" not found in database.");
private void storeRow() throws SQLException {
System.out.println("storeRow call ...");
String updateStatement =
"update account set firstname = ? ," +
"lastname = ? , balance = ? " +
"where id = ?";
PreparedStatement prepStmt =
con.prepareStatement(updateStatement);
prepStmt.setString(1, firstName);
prepStmt.setString(2, lastName);
prepStmt.setDouble(3, balance);
prepStmt.setString(4, id);
int rowCount = prepStmt.executeUpdate();
prepStmt.close();
if (rowCount == 0) {
throw new EJBException("Storing row for id " + id + " failed.");
2. ejb-jar.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<description>Entity Bean ( BMP )</description>
<display-name>Account</display-name>
<ejb-name>Account</ejb-name>
<home>com.ps.AccountHome</home>
<remote>com.ps.Account</remote>
<ejb-class>com.ps.impl.AccountBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
</entity>
</enterprise-beans>
</ejb-jar>
3. web.xml
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<description>Empty web.xml file for Web Application</description>
<servlet>
<servlet-name>AccountServlet</servlet-name>
<servlet-class>com.ps.AccountServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AccountServlet</servlet-name>
<url-pattern>/accountservlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
4. jboss.xml (i am not sure this is righ maybe this is the problem)
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">
<jboss>
<resource-managers>
<resource-manager res-class="">
<res-name>MySqlDS</res-name>
<res-jndi-name>java:/MySqlDS</res-jndi-name>
</resource-manager>
</resource-managers>
</jboss>
5. mysql-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<server>
<!-- ==================================================================== -->
<!-- New ConnectionManager setup for mysql using 2.0.11 driver -->
<!-- Build jmx-api (build/build.sh all) and view for config documentation -->
<!-- ==================================================================== -->
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=MySqlDS">
<!-- Include a login module configuration named MySqlDbRealm.
Update your login-conf.xml, here is an example for a
ConfiguredIdentityLoginModule:
<application-policy name = "MySqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">yourprincipal</module-option>
<module-option name = "userName">yourusername</module-option>
<module-option name = "password">yourpassword</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
</login-module>
</authentication>
</application-policy>
NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
module-option name = "managedConnectionFactoryName"
must match the object name of the ConnectionManager you are configuring here.
-->
<!--uncomment out this line if you are using the MySqlDbRealm above
<attribute name="SecurityDomainJndiName">MySqlDbRealm</attribute>
-->
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=MySqlDS">
<attribute name="JndiName">MySqlDS</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:mysql://localhost:3306/pac</config-property>
<config-property name="DriverClass" type="java.lang.String">org.gjt.mm.mysql.Driver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String">t100</config-property>
<config-property name="Password" type="java.lang.String">t200</config-property>
</properties>
</attribute>
<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=MySqlDS">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)-->
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager</depends>
<attribute name="TransactionManager">java:/TransactionManager</attribute>
<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>
</mbean>
</server>In /JBoss/server/default/conf/standardjaws.xml.
Set
<datasource>java:/mySqlDS</datasource>
<type-mapping>mySql</type-mapping>
In /JBoss/server/default/conf/standardjbosscmp-jdbc.xml.
Set
<defaults>
<datasource>java:/mySqlDS</datasource>
<datasource-mapping>mySql</datasource-mapping></defaults> -
JBoss install problem - nothing is installed
Hello,
I have installed aur/jboss package
aur/jboss 5.1.0.GA-1 [installed] (53)
JBoss Application Server
But there is no /opt/jboss directory, no service added, nothing. When I try to uninstall it, it says:
Packages (1): jboss-5.1.0.GA-1
Total Removed Size: 0,00 MiB
zip file with jboss is installed correctly, all additional files (build, service..) are too.
What is the problem with this process ?Moving to AUR Issues...
-
Hi all,
Although Log4J is not exactly about Java, but it is kind of related, so please don't mind me posting this message.
I am having problems stoping JBoss from reloading the log4j.properties file. Is there anyway to stop it from polling the log4j.properties file every now and then..
Thx for your help
KevinLook at ${JBOSS_HOME}/server/default/jboss-service.xml. It has a section with the following code:
<mbean code="org.jboss.logging.Log4jService"
name="jboss.system:type=Log4jService,service=Logging">
<attribute name="ConfigurationURL">resource:log4j.xml</attribute>
<attribute name="Log4jQuietMode">true</attribute>
<!-- How frequently in seconds the ConfigurationURL is checked for changes -->
<attribute name="RefreshPeriod">60</attribute>
</mbean>You could try setting the refresh periode to 0, but I don't know to what kind of behaviour that will result in. -
Hi all
i am using jboss - UsernamepasswordLoginModule for username and password authentication. I want to know the way to restrict users after 3 bad logins.
if user uses wrong password for three times successively then something should happen like he should not be able to login for next 30 minutes.
It can be done in weblogic, but how to do it in jboss?
thanx in advance.thanx but its not specified thereDid you read this part?:
How do I configure security with JBoss ?
JBoss uses JAAS for security. JBoss includes several JAAS login modules allowing applications to get their user info from LDAP servers, databases or property files (the last to simplify testing). There are also login modules for clients, so that they can send security information to the JBoss server. Note that an application that logs into JBoss must use JAAS to give user name and password. It is not possible to use the JNDI lookup information for that in JBoss. How to configure this is shown in chapter 8 of the free getting started guide.
Did you check the "getting started guide"?
Did you familiarize yourself with JAAS?
Did you implement/configure a login module?
Did you have a specific problem with the login module (errors, etc.)?
Did you post this question at the JBoss Forum?
Did you get an answer?
Did you try anything at all about which you can post the details?
Are you getting my point? -
I am connecting to JBoss application server from a signed applet,
my code is like this
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory" ) ;
env.put("java.naming.provider.url", "SERVER_NAME") ;
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces" ) ;
env.put("java.naming.security.principal", CBGlobals.USER_NAME);
env.put("java.naming.security.credentials", CBGlobals.PASSWORD);
Context ic = new InitialContext (env);
now it gives me an error message
java.lang.ExceptionInInitializerError
at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:42)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at ChrBrowser.ChrBrowser.connectToServer(ChrBrowser.java:609)
at ChrBrowser.ChrBrowser.<init>(ChrBrowser.java:127)
at ChrBrowser.CBMain.init(CBMain.java:111)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any hits or help will be cordially appreciated
Renjith.thanks,
I used the same link
the problem occured becase i didnt sign jbossclient.jar with the same key with which other required jar files are signed -
E:\jboss\jboss-4.0.5.GA\bin>run -c spend
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: E:\jboss\jboss-4.0.5.GA\bin\\..
JAVA: C:\Program Files\java\jsdk1.4\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.g
cInterval=3600000
CLASSPATH: C:\Program Files\java\jsdk1.4\lib\tools.jar;E:\jboss\jboss-4.0.5.GA\bin\\run.jar;E:\jboss\jboss-4.0.5.GA\server\
spend\deploy;E:\jboss\jboss-4.0.5.GA\server\spend\conf;E:\jboss\jboss-4.0.5.GA\server\spend\conf\config;
===============================================================================
log4j:ERROR Could not instantiate class [org.apache.log4j.xml.DOMConfigurator].
java.lang.ClassNotFoundException: org.apache.log4j.xml.DOMConfigurator
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:160)
at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:309)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:449)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
at org.jboss.logging.Log4jLoggerPlugin.init(Log4jLoggerPlugin.java:77)
at org.jboss.logging.Logger.getDelegatePlugin(Logger.java:338)
at org.jboss.logging.Logger.<init>(Logger.java:96)
at org.jboss.logging.Logger.getLogger(Logger.java:309)
at org.jboss.system.server.ServerImpl.doInit(ServerImpl.java:166)
at org.jboss.system.server.ServerImpl.init(ServerImpl.java:147)
at org.jboss.Main.boot(Main.java:197)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:536)
log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].
log4j:WARN No appenders could be found for logger (org.jboss.system.server.Server).
log4j:WARN Please initialize the log4j system properly.
please can any body tell me how to solve this problemProblems like this don't cease to amaze me.
We are in the year of 2009 and this problem is most probably caused because jboss is started from a path which contains one or more space.
Try move your jboss installation or eclipse installation (i am not familiar how jboss in installed inside eclipse) to a folder with no spaces and the problem should go away.
It is sad that nice software like jboss has stupid bugs like this. Oh and it migh not be jboss but the JVM. It is silly in any case... -
JMS - MDB, jboss deployment problem
Hi everybody,
I'm new to JMS/MDB and have following problem while deploying MDB under JBOSS:
22:58:47,735 INFO [EjbModule] Deploying MyPublisher
22:58:47,745 INFO [EjbModule] Deploying topicMessageBean
22:58:47,795 WARN [StatelessSessionContainer] message-destination 'PhysicalTopic' has no jndi-name in jboss.xml
22:58:47,845 INFO [ProxyFactory] Bound EJB Home 'MyPublisher' to jndi 'ejb/MyEj
bReference'
22:58:47,865 INFO [EJBDeployer] Deployed: file:/D:/DownLoads/ejb/JBoss/jboss-4.
0.3/jboss-4.0.3/server/default/deploy/simplemessage.jar
jboss.xml
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>topicMessageBean</ejb-name>
<destination-jndi-name>topic/MyMDBTopic</destination-jndi-name>
<mdb-connection-factory>
<jndi-name>jms/MyTopicConnectionFactory</jndi-name>
</mdb-connection-factory>
</message-driven>
<message-destination>
<message-destination-name>PhysicalTopic</message-destination-name>
<jndi-name>topic/MyMDBTopic</jndi-name>
</message-destination>
<session>
<ejb-name>MyPublisher</ejb-name>
<jndi-name>ejb/MyEjbReference</jndi-name>
<resource-ref>
<res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>
<jndi-name>jms/TopicConnectionFactory</jndi-name>
<default-resource-principal>
<name>guest</name>
<password>guest</password>
</default-resource-principal>
</resource-ref>
</session>
</enterprise-beans>
</jboss>
ejb-jar.xml
<ejb-jar>
<display-name>MessageJAR</display-name>
<enterprise-beans>
<message-driven>
<display-name>Topic Message Bean</display-name>
<ejb-name>topicMessageBean</ejb-name>
<ejb-class>MessageBean</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<message-selector></message-selector>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<message-destination-link>PhysicalTopic</message-destination-link>
</message-driven-destination>
<activation-config>
<activation-config-property>
<activation-config-property-name>messageSelector</activation-config-property-name>
<activation-config-property-value>NewsType = 'Sports' OR NewsType = 'Opinion'</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>subscriptionDurability</activation-config-property-name>
<activation-config-property-value>NonDurable</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
<session>
<display-name>MyPublisher</display-name>
<ejb-name>MyPublisher</ejb-name>
<home>PublisherHome</home>
<remote>Publisher</remote>
<ejb-class>PublisherBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<resource-ref>
<res-ref-name>jms/MyTopicConnectionFactory</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<message-destination-ref>
<!--message-destination-ref-name>topic/TopicName</message-destination-ref-name-->
<message-destination-ref-name>topic/MyMDBTopic</message-destination-ref-name>
<message-destination-type>javax.jms.Topic</message-destination-type>
<message-destination-usage>Produces</message-destination-usage>
<message-destination-link>PhysicalTopic</message-destination-link>
</message-destination-ref>
<security-identity>
<use-caller-identity/>
</security-identity>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>topicMessageBean</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>MyPublisher</ejb-name>
<method-intf>Remote</method-intf>
<method-name>publishNews</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<message-destination>
<message-destination-name>PhysicalTopic</message-destination-name>
</message-destination>
</assembly-descriptor>
</ejb-jar>
can somebody help???
ZahidHi,
if possible, try with "max-bean-in-free-pool=1".
note: it would be performance impact, as there would be single bean instance.
Thanks,
Qumar Hussain -
Deployement problem in Oracle App Serv with hibernate + JPA and Spring
Dear All,
I am facing a problem in deployment of a web application in oracle application server 10g. but the same is working fine with Tomcat. The following Exception. Is being thrown.
Failed to deploy web application "OraTest". Failed to deploy web application OraTest". . Nested exception Resolution:
Base Exception:
java.rmi.RemoteException
deploy failed!: ; nested exception is:
oracle.oc4j.admin.internal.DeployerException: Unknown assembly root-tag attribute: version. deploy failed!: ; nested exception is:
oracle.oc4j.admin.internal.DeployerException: Unknown assembly root-tag attribute: version I am using the following technologies
1. Spring 2.0.7
2. Struts 2.0.9
3. Hibernate 3.3
4. JPA 1.0
5. Oracle App Server 10.1.2.0.2
Web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>My Application</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>
org.directwebremoting.servlet.DwrServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/conf/spring/datasource-context.xml,
/WEB-INF/conf/spring/aop-context.xml
</param-value>
</context-param>
</web-app>
/Datasource-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" lazy-init="true"/>
<!-- following code is for using oracle -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
<property name="driverClassName">
<value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="url">
<value>jdbc:oracle:thin:@//xxx.xxx.xxx.xxx/mydb</value>
</property>
<property name="username">
<value>admin</value>
</property>
<property name="password">
<value>admin</value>
</property>
</bean>
<!-- following code is for using mysql -->
<!--
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
<property name="driverClassName">
<value>org.gjt.mm.mysql.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://192.168.10.157:3306/tpsadmin</value>
</property>
<property name="username">
<value>tpsadmin</value>
</property>
<property name="password">
<value>tpsadmin</value>+
</property>
</bean>
-->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" lazy-init="true">
<property name="persistenceUnitName" value="mkclsetsPersistenceUnit"/>
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" lazy-init="true">
<property name="database" value="ORACLE"/>
<property name="showSql" value="true"/>
</bean>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" lazy-init="true">
<property name="entityManagerFactory" ref="entityManagerFactory"></property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
</beans>Aop-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<!-- Bean Definition of all the required Interceptors -->
<bean id="methodLoggingAdvice" class="com.mkcl.sets.common.interceptor.MehodLogInterceptor"/>
<!--
<bean id="appCacheManager" class="net.sf.ehcache.CacheManager">
<constructor-arg index="0" type="java.net.URL" value="classpath:country-ehcache.xml"/>
</bean>
-->
<!--bean id="methodCacheInterceptor" -->
<bean id="methodCachingAdvice"
class="com.mkcl.sets.common.interceptor.MethodCacheInterceptor">
<property name="cache">
<ref local="methodCache" />
</property>
</bean>
<bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation">
<value>WEB-INF/conf/other/ehcache.xml</value>
</property>
</bean>
<bean id="methodCache"
class="org.springframework.cache.ehcache.EhCacheFactoryBean">
<property name="cacheManager">
<ref local="cacheManager" />
</property>
<property name="cacheName">
<value>mkclSetsCache</value>
</property>
</bean>
<!--
<bean id="methodCachingAdvice" class="interceptor.MethodCachingInterceptor"/>
-->
<aop:config>
<aop:pointcut id="getCountriesPointCut" expression="execution(* com.mkcl.sets.dao.master.impl.LocationDAOImpl.getCountries())"/>
<!-- <aop:pointcut id="methodLogPointCut" expression="execution(* com.mkcl.sets.service.master.impl.CategoryServiceImpl.getAllCategories(..))"/> -->
<aop:pointcut id="methodLogPointCutDao" expression="execution(* com.mkcl.sets.dao..*.*(..))"/>
<aop:pointcut id="methodLogPointCutService" expression="execution(* com.mkcl.sets.service..*.*(..))"/>
<aop:advisor id="methodCachingAdvisor" advice-ref="methodCachingAdvice" pointcut-ref="getCountriesPointCut"/>
<aop:advisor id="methodLoggingAdvisorDao" advice-ref="methodLoggingAdvice" pointcut-ref="methodLogPointCutDao"/>
<aop:advisor id="methodLoggingAdvisorService" advice-ref="methodLoggingAdvice" pointcut-ref="methodLogPointCutService"/>
</aop:config>
</beans>Persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="mkclsetsPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<!-- jta-data-source>mkclDS</jta-data-source-->
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OC4JTransactionManager"/>
</properties-->
</persistence-unit>
</persistence>Do I need to add some other configuration in the existing files or do I need to add some other configuration files ? Please help to deploy my application.
Thanks a lot in advance.
With Best Regards,
Ishaan
nullDid you ever find a solution to this Ishaan?
I imagine you ended up having to upgrade 10gR2 to 10gR3 at least. Correct? -
Deployement problem in weblogic 12c and as well as weblogic 10.3.0.0
Hello All,
I am newbie to Ejb and weblogic so i need your assist, please help me guys.
while deploying my jar file into weblogic i got these errors on admin console i.e
*"An error occurred during activation of changes, please see the log for details.*
*Exception preparing module: EJBModule(demo) [EJB:011023]An error occurred while reading the deployment descriptor.*
*The error was: Error processing annotations: .*
*There are 1 nested errors: weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load class com.ejb.model.MyIntfImpl in Jar F:\Oracle\Middleware\user_projects\domains\phanidevnew\servers\AdminServer\upload\demo.jar : java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'com.ejb.model.MyIntfImpl'*
*The deployment has been successfully installed. "*
and in server console displaying like this
"*<30 Apr, 2012 11:39:02 AM IST> <Warning> <Deployer> <BEA-149004> <Failures were*
*detected while initiating deploy task for application 'demo'.>*
*<30 Apr, 2012 11:39:02 AM IST> <Warning> <Deployer> <BEA-149078> <Stack trace fo*
*r message 149004*
*weblogic.application.ModuleException: Exception preparing module: EJBModule(demo*
*[EJB:011023]An error occurred while reading the deployment descriptor. The error*
*was:*
*Error processing annotations: .*
*at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)*
*at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
*leListenerInvoker.java:93)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
*oymentCallbackFlow.java:387)*
*at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
*river.java:37)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
*loymentCallbackFlow.java:58)*
*Truncated. see log file for complete stacktrace*
*weblogic.utils.ErrorCollectionException:*
*There are 1 nested errors:*
*weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load clas*
*s com.ejb.model.MyIntfImpl in Jar F:\Oracle\Middleware\user_projects\domains\pha*
*nidevnew\servers\AdminServer\upload\demo.jar : java.lang.ClassNotFoundException:*
*Class bytes found but defineClass()failed for: 'com.ejb.model.MyIntfImpl'*
*at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
*aseJ2eeAnnotationProcessor.java:1264)*
*at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
*ror(BaseJ2eeAnnotationProcessor.java:1269)*
*at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
*ns(EjbAnnotationProcessor.java:172)*
*at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
*Annotations(EjbDescriptorReaderImpl.java:324)*
*at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
*escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
*at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJar*
*File(EjbDescriptorFactory.java:93)*
*at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule*
*.java:1198)*
*at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)*
*at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
*leListenerInvoker.java:93)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
*oymentCallbackFlow.java:387)*
*at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
*river.java:37)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
*loymentCallbackFlow.java:58)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
*loymentCallbackFlow.java:42)*
*at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja*
*va:615)*
*at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
*river.java:37)*
*at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j*
*ava:191)*
*at weblogic.application.internal.SingleModuleDeployment.prepare(SingleMo*
*duleDeployment.java:16)*
*at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme*
*ntStateChecker.java:155)*
*at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App*
*ContainerInvoker.java:60)*
*at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr*
*eateAndPrepareContainer(ActivateOperation.java:197)*
*at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do*
*Prepare(ActivateOperation.java:89)*
*at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr*
*epare(AbstractOperation.java:217)*
*at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym*
*entPrepare(DeploymentManager.java:723)*
*at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy*
*mentList(DeploymentManager.java:1190)*
*at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare*
*(DeploymentManager.java:248)*
*at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre*
*pare(DeploymentServiceDispatcher.java:159)*
*at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
*ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)*
*at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
*ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)*
*at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
*ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)*
*at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin*
*gWorkManagerImpl.java:516)*
*at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
*at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
*at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
*aseJ2eeAnnotationProcessor.java:1263)*
*at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
*ror(BaseJ2eeAnnotationProcessor.java:1269)*
*at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
*ns(EjbAnnotationProcessor.java:172)*
*at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
*Annotations(EjbDescriptorReaderImpl.java:324)*
*at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
*escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
*Truncated. see log file for complete stacktrace*
*>*
*<30 Apr, 2012 11:39:02 AM IST> <Error> <Console> <BEA-240003> <Console encounter*
*ed the following error weblogic.application.ModuleException: Exception preparing*
*module: EJBModule(demo)*
*[EJB:011023]An error occurred while reading the deployment descriptor. The error*
*was:*
*Error processing annotations: .*
*at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)*
*at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
*leListenerInvoker.java:93)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
*oymentCallbackFlow.java:387)*
*at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
*river.java:37)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
*loymentCallbackFlow.java:58)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
*loymentCallbackFlow.java:42)*
*at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja*
*va:615)*
*at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
*river.java:37)*
*at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j*
*ava:191)*
*at weblogic.application.internal.SingleModuleDeployment.prepare(SingleMo*
*duleDeployment.java:16)*
*at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme*
*ntStateChecker.java:155)*
*at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App*
*ContainerInvoker.java:60)*
*at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr*
*eateAndPrepareContainer(ActivateOperation.java:197)*
*at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do*
*Prepare(ActivateOperation.java:89)*
*at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr*
*epare(AbstractOperation.java:217)*
*at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym*
*entPrepare(DeploymentManager.java:723)*
*at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy*
*mentList(DeploymentManager.java:1190)*
*at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare*
*(DeploymentManager.java:248)*
*at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre*
*pare(DeploymentServiceDispatcher.java:159)*
*at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
*ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)*
*at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
*ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)*
*at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
*ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)*
*at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin*
*gWorkManagerImpl.java:516)*
*at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
*at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
*Caused by: weblogic.utils.ErrorCollectionException:*
*There are 1 nested errors:*
*weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load clas*
*s com.ejb.model.MyIntfImpl in Jar F:\Oracle\Middleware\user_projects\domains\pha*
*nidevnew\servers\AdminServer\upload\demo.jar : java.lang.ClassNotFoundException:*
*Class bytes found but defineClass()failed for: 'com.ejb.model.MyIntfImpl'*
*at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
*aseJ2eeAnnotationProcessor.java:1264)*
*at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
*ror(BaseJ2eeAnnotationProcessor.java:1269)*
*at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
*ns(EjbAnnotationProcessor.java:172)*
*at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
*Annotations(EjbDescriptorReaderImpl.java:324)*
*at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
*escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
*at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJar*
*File(EjbDescriptorFactory.java:93)*
*at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule*
*.java:1198)*
*at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)*
*at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
*leListenerInvoker.java:93)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
*oymentCallbackFlow.java:387)*
*at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
*river.java:37)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
*loymentCallbackFlow.java:58)*
*at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
*loymentCallbackFlow.java:42)*
*at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja*
*va:615)*
*at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
*river.java:37)*
*at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j*
*ava:191)*
*at weblogic.application.internal.SingleModuleDeployment.prepare(SingleMo*
*duleDeployment.java:16)*
*at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme*
*ntStateChecker.java:155)*
*at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App*
*ContainerInvoker.java:60)*
*at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr*
*eateAndPrepareContainer(ActivateOperation.java:197)*
*at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do*
*Prepare(ActivateOperation.java:89)*
*at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr*
*epare(AbstractOperation.java:217)*
*at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym*
*entPrepare(DeploymentManager.java:723)*
*at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy*
*mentList(DeploymentManager.java:1190)*
*at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare*
*(DeploymentManager.java:248)*
*at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre*
*pare(DeploymentServiceDispatcher.java:159)*
*at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
*ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)*
*at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
*ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)*
*at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
*ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)*
*at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin*
*gWorkManagerImpl.java:516)*
*at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
*at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
*at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
*aseJ2eeAnnotationProcessor.java:1263)*
*at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
*ror(BaseJ2eeAnnotationProcessor.java:1269)*
*at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
*ns(EjbAnnotationProcessor.java:172)*
*at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
*Annotations(EjbDescriptorReaderImpl.java:324)*
*at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
*escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
*at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJar*
*File(EjbDescriptorFactory.java:93)*
*at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule*
*.java:1198)*
*at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)*
*>*
*My application is*
*MyIntf:*
package com.ejb.model;
import javax.ejb.;
@Remote
public interface MyIntf
public String getMsg();
*MyIntfImpl:*
+package com.ejb.model;+
+import javax.ejb.*;+
+import javax.annotation.*;+
+@Stateless(mappedName="demoapp")+
+public class MyIntfImpl implements MyIntf+
public String getMsg()
System.out.println("in getMsg() method" );
return "Hello I am from getMsg() method" ;
@PostConstruct
public void init()
System.out.println("in init() method" );
@PreDestroy+
public void destroy()
System.out.println("in destroy() method" );
*persistence.xml in META-INF folder is*
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"+
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"+
+xsi:schemaLocation="http://java.sun.com/xml/ns/persistence+
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="myunit" transaction-type="JTA">
<jta-data-source>myds</jta-data-source>
</persistence-unit>
</persistence>
The above code is compiled fine,
I create it as demo.jar by using jar -cvf demo.jar com META-INF,
After that i deployed then i got above errors,
I deployed same app into glassfish then it works fine with out prob.
I configured DATA SOURCE properly,
But why i got these error and solve it..
Please guysNote that WebLogic 12c endorses JavaEE6.
Look ups and how JNDI works is explained in the JavaEE6 tutorial: http://docs.oracle.com/javaee/6/tutorial/doc/gipjf.html -
I created a ear file wich contains a jar and war file. The jar contains an entity and session bean. The war file contains my junitee test case.
When I deploy the file I can surf to the url and my test goes fine. When I move the file from the deploy dir to someplace else (jboss starts undeploying) and move it back couple seconds later (jboss deploys again) I get this error while doing the same test again:
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293) ...........
The error appears at the line where I try to narrow cast the object to my home interface.
When I restard jboss , the test runs fine again.
Anyone ideas ?When I move the file from the deploy dir to someplace else (jboss starts undeploying) and move it back couple seconds later (jboss deploys again)
This feature is called hot redeploy, the deploy directory is a place where you keep the files you want to deploy on the server. Whenever there are any changes in this directory .. moving files etc, the JBoss redeploys the new files, or undeploys the files removed from that place.
This is needed, because practically the servers are supposed to be up all the time, so if you need to make any updates etc, you could just paste the new files(or new versions) and they are redeployed.
I get this error while doing the same test again
When I restard jboss , the test runs fine again
This is happening because your test case is typically looking at the old version of your beans. But then why are you moving the files ... testing ? or do u really need to do that ?
If you are changing some implementation, just redploy the bean class and leave the interfaces like that. You should be fine
Regards
Meka Toka -
I am not sure if this issue belongs to this forum. If not, please let me know and I will post it in the appropriate forum.
My application has clustered remote SLSBs with "FirstAvaliable" policy.
The BMP Entity Beans are set for cache invalidation as they exist at local level only. They is no clustering of entity beans.
I am using Commit Option A.
I want cache to invalidate bean on all nodes except the node it was accessed from.
Here the cache is being cleared even on the node it was last accessed from.
I executed a business method on the same node (due to FirstAvailable) and here is the list of methods encountered.
setEntityContext
ejbFindByPrimaryKey
ejbActivate
ejbLoad
getAllAccounts
ejbStore
setEntityContext
ejbActivate
ejbLoad
getAllAccounts
ejbStore
setEntityContext
ejbActivate
ejbLoad
getAllAccounts
ejbStore
My expectation is that second and third time, in addition to my business method, only ejbLoad and ejbStore should be executed.
After info from guides and forum topics, I have configured as under :
cluster-service.xml
============
I am using the default behaviour of JBoss-Cluster based bridge
jboss.cache:service=InvalidationManager
${jboss.partition.name:DefaultPartition}
DefaultJGBridge
jboss:service=${jboss.partition.name:DefaultPartition}
jboss.cache:service=InvalidationManager
standardjboss.xml
============
Container Configuration is defined as under : (Commit Option is A)
<container-configuration>
<container-name>Standard BMP 2.x EntityBean with cache invalidation</container-name>
<call-logging>false</call-logging>
<invoker-proxy-binding-name>entity-rmi-invoker</invoker-proxy-binding-name>
<sync-on-commit-only>true</sync-on-commit-only>
<insert-after-ejb-post-create>false</insert-after-ejb-post-create>
<container-interceptors>
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
org.jboss.ejb.plugins.LogInterceptor
org.jboss.ejb.plugins.SecurityInterceptor
org.jboss.ejb.plugins.TxInterceptorCMT
org.jboss.ejb.plugins.EntityCreationInterceptor
org.jboss.ejb.plugins.EntityLockInterceptor
org.jboss.ejb.plugins.EntityInstanceInterceptor
org.jboss.ejb.plugins.EntityReentranceInterceptor
org.jboss.resource.connectionmanager.CachedConnectionInterceptor
org.jboss.ejb.plugins.EntitySynchronizationInterceptor
org.jboss.cache.invalidation.triggers.EntityBeanCacheBatchInvalidatorInterceptor
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor
</container-interceptors>
<instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>
<instance-cache>org.jboss.ejb.plugins.InvalidableEntityInstanceCache</instance-cache>
<persistence-manager>org.jboss.ejb.plugins.BMPPersistenceManager</persistence-manager>
<locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</locking-policy>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
<cache-policy-conf>
<min-capacity>50</min-capacity>
<max-capacity>1000000</max-capacity>
<overager-period>300</overager-period>
<max-bean-age>600</max-bean-age>
<resizer-period>400</resizer-period>
<max-cache-miss-period>60</max-cache-miss-period>
<min-cache-miss-period>1</min-cache-miss-period>
<cache-load-factor>0.75</cache-load-factor>
</cache-policy-conf>
</container-cache-conf>
<container-pool-conf>
100
</container-pool-conf>
<commit-option>A</commit-option>
</container-configuration>
jboss.xml
======
<?xml version="1.0"?>
<security-domain>java:/jaas/defaultLdap</security-domain>
<enterprise-beans>
<ejb-name>ejb/ApplicationService</ejb-name>
<security-domain>java:/jaas/defaultLdap</security-domain>
<resource-ref>
<res-ref-name>jdbc/OracleDS</res-ref-name>
<jndi-name>java:/jdbc/OracleDS</jndi-name>
</resource-ref>
True
<cluster-config>
<home-load-balance-policy>
org.jboss.ha.framework.interfaces.FirstAvailable
</home-load-balance-policy>
<bean-load-balance-policy>
org.jboss.ha.framework.interfaces.FirstAvailable
</bean-load-balance-policy>
</cluster-config>
<ejb-name>ejb/ApplicationEntity</ejb-name>
<security-domain>java:/jaas/defaultLdap</security-domain>
<resource-ref>
<res-ref-name>jdbc/OracleDS</res-ref-name>
<jndi-name>java:/jdbc/OracleDS</jndi-name>
</resource-ref>
<configuration-name>Standard BMP 2.x EntityBean with cache invalidation</configuration-name>
<cache-invalidation>True</cache-invalidation>
cache-invalidation.xml (No Change)
==============
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<!-- $Id: cache-invalidation-service.xml,v 1.4 2003/08/27 04:31:54 patriot1burke Exp $ -->
<!-- ===================================================================== -->
<!-- -->
<!-- Cache Invalidation Service -->
<!-- -->
<!-- ===================================================================== -->
<!--
Uncomment if you want to activate the cache invalidation mechanism accross
nodes using the JMS bridge
PropagationMode can be : IN_OUT = 1, IN_ONLY = 2, OUT_ONLY = 3
You can also set the ProviderUrl attribute to another IP:port setting if you
must lookup your JMS information in other JMS trees i.e.
MyOtherNode:1099
-->
<!--
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
<depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager
jboss.cache:service=InvalidationManager
jboss.mq.destination:service=Topic,name=JMSCacheInvalidationBridge
jboss.cache:service=InvalidationManager
java:/ConnectionFactory
topic/JMSCacheInvalidationBridge
1
-->
Thanks.hi ,
In this scenario u can use the load balancer instead of fail over clustering .
I would suggest u to create apache proxy for redirect the request for many jboss instance.
Rgds
kathir
Maybe you are looking for
-
Why cant we used sy-subrc in loop and endloop?why?where exactly it is used
hi can u help me for this
-
I can no longer import photos into 4.2
Up until a few days ago I could import photos with no issues into LR 4.2. Today I am having big issues. After I select Import Photos and Video from the File menu, the Import screen launches but it is incredibly slow. At first it has only some text an
-
My V1 video app is use on my iPhone and iPad but I can not get them to merge when I back up to the iCloud. I want to be able to take the video of a swing with the iPhone and play it back on the iPad. What am I missing?
-
Business Intelligence and performance point problem
Hi Everyone, Please does anyone know why creating a dashboard from a Sharepoint list is such a hassle. I have configured performance point services, a secure store and a business intelligent website that has a data connection library and Performance
-
BDC Session Saves Data Only in Foreground
I have created a bdc program to create an SM35 session of CA02. The wierd thing is that the session will run in background with no errors, but the data is not updated. If I run the session in foreground the data is updated. Have I overlooked somet