[EJB 3.0] - Re: kindly help in running this deployment
by karan42in
hi fhh..
i m using jboss IDE 1.6, jboss server 4.0.5 and its running...
HelloBean.java
package hello;
public interface HelloBean
{
public String hello ();
}
StatelessHelloBean.java
package hello;
import org.jboss.annotation.ejb.LocalBinding;
import javax.ejb.*;
@Stateless
public class StatelessHelloBean implements HelloBean {
public String hello () {
return "Hello World!";
}
}
hello.jsp
<%@ page import="hello.*, javax.naming.*, java.text.*"%>
<%!
private HelloBean hb = null;
public void jspInit () {
try {
InitialContext ctx = new InitialContext();
hb = (HelloBean) ctx.lookup(
"HelloWorld/StatelessHelloBean/local");
} catch (Exception e) {
e.printStackTrace ();
}
}
%>
<%
String result;
try {
result = hb.hello();
} catch (Exception e) {
result = e.getMessage();
}
%>
<%=result%>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043168#4043168
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043168
19 years, 1 month
[JBoss Seam] - Re: Transaction Demarcation
by toni
How and where ca I turn this on?
I noticed something very interesing so: I used "@TransactionAttribute(TransactionAttributeType.NEVER)"
on the first call to the SLSB (stateless) and the transaction gets stopped! In the logfile I see:
007-05-04 14:56:08,090 ERROR [org.jboss.ejb.txtimer.TimerImpl] Error invoking ejbTimeout: javax.ejb.EJBException: java.lang.IllegalStateException: Transaction present on server in Never call
However, if I place the annotation on the method, which actually creates a single entity and gets called by, then nothing happens. So this explains why placing @TransactionAttribute(REQUIRES_NEW) on it does not work either!
The big question now is why? Do you have idea? Here once more the flow of execution:
1. User clicks button
2. userSchedule() gets called on SFSB1
3. scheduleMessages() gets called on SLSB1 by SFSB1
4. scheduleMessage() gets called by SLSB1 many times
Placing "@TransactionAttribute(TransactionAttributeType.NEVER)" on scheduleMessages() stops the flow of execution. However, placing it on scheduleMessage() has no effect!!
Why is that?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043164#4043164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043164
19 years, 1 month
[JBoss Portal] - New Portlet Instance Preferences
by leejameskevan
Hi,
I'm getting an error when doing the following:
- navigate to admin page on vanilla (binary installation) 2.4.2 deployment
- click on 'portlets'
- create new instance of CMS portlet
- navigate to 'Instances'
- navigate to my new instance, click on 'preferences'
- insert new value for 'indexpage' key and press 'update'
The error is always "The server encountered an internal error () that prevented it from fulfilling this request"
I'm on a clean deployment of 2.4.2 (CR1) - to deploy this I did the following;
- undeployed the old version by closing AS, removing server/default/data/portal folder, removing old portal .sar, dropping all tables
- restart AS
- stop AS
- deploy 2.4.2 .sar
- restart AS
Is this a know issue?
I'm using the following versions:
AS 4.0.5.GA
Portal 2.4.2 (CR1)
MySQL 5.0.26 with truncation workaround applied
JDK 1.5.0_09
Windows XP Prof
Anything else you need to know?
Thanks
Lee
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043160#4043160
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043160
19 years, 1 month