[EJB 3.0] - MDB abstract base class and EJB3 annotations
by ajay662
I have following scenario where my MDB class extends an abstract class which implements the MessageListener interface.
public abstract class MDBBase implements MessageListener {
| public void onMessage(Message message) {
| ....
| processJob(some-params)
| }
| public abstract void processJob (some-params);
| }
|
| public class MyMDB extends MDBBase {
| public abstract void processJob (some-params) {
|
| }
| }
I use following EJB3 annotations in MyMDB class
@TransactionManagement(TransactionManagementType.BEAN)
| @SecurityDomain("myapp")
| @RunAs ("Internal")
The question is does the abstract base class also need these annotations?
What I am see'ing is that without @RunAs ("Internal") on the abstract base class, jboss gives insufficient permissions exception because the message queue requires role "Internal". Is this a bug or working as designed? I was expecting that I wouldn't have to annotate the abstract base class.
What about the other annotations @SecurityDomain and @TransactionManagement?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034719#4034719
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034719
19 years
[JBoss Seam] - Tomahawk Scheduler
by fduo
Hello,
I am try to use the Tomahawk Scheduler. I know it's not recommended to use Tomahawk together with seam. But rightnow Tomahawk is the only libery with a Scheduler component and it fits just perfect into my application. Unfortunatly I am trying to get it working since 2 days with no luck. I hope someone has experinence with it.
No errors are thrown, but it doesn't react to any model updates and I only see a day view. Without any entries, functionality or something.
I used the example Model Handler and extended it with Seam annotations
(@Name) and a Interface.
At the login time I set it up:
| @In(create = true)
| @Out
| ScheduleHandlerBean scheduleHandler;
| ..........
| ..........
| ScheduleModel model = new SimpleScheduleModel();
| model.setMode(ScheduleModel.MONTH);
| scheduleHandler.setModel(model);
|
Then i use it:
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:t="http://myfaces.apache.org/tomahawk">
| <head>
| <link href="stylesheet/basic.css" rel="stylesheet" type="text/css" />
| </head>
| <f:view>
| <h:form>
| <!-- The schedule itself -->
| <t:div style="position: absolute; left: 220px; top: 5px; right: 5px;">
| <t:schedule value="#{model}" id="schedule"
| rendered="true" visibleEndHour="18" visibleStartHour="8"
| workingEndHour="17" workingStartHour="9" readonly="false"
| theme="evolution" tooltip="true"/>
| </t:div>
| <!-- The column on the left, containing the calendar and other controls -->
| <t:div style="position: absolute; left: 5px; top: 5px; width: 210px; overflow: auto">
| <h:panelGrid columns="1">
| <t:inputCalendar id="scheduleNavigator"
| value="#{model.selectedDate}" />
| <h:commandButton
| actionListener="#{scheduleHandler.addSampleEntries}"
| value="add sample entries" />
| <h:commandButton
| actionListener="#{scheduleHandler.addSampleHoliday}"
| value="add sample holiday" />
| </h:panelGrid>
| </t:div>
| </h:form>
| <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
| </f:view>
| <ui:debug rendered="true" hotkey="h"/>
| </ui:composition>
|
But the only thing I see is a day view without any functionality. There are also no errors or warnigs and I have no clue what to try.
I am using:
- Seam 1.2 patch 1
- JBoss 4.0.5
- myfaces 1.1.6 snapshot from today
- tomahawk 1.1.5
I will be happy for any hints or ideas.
Best regards
Fabio
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034716#4034716
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034716
19 years
[JBoss Seam] - Re: Question regarding page parameter
by kingcu
I read the pages.dtd to find the action element and got it working with that. Here is how I did it:
1. Add a String property "selectedTab" to the backing EntityHome of the main page;
2. In each child page's Seam page config XML (child.page.xml), add an action element that calls "setSelectedTab('value')";
3. On the main page, using EL to value the selectedTab property of the rich:tabPanel tag.
I feel that introducing one more property in the backing bean may not be necessary (it also pollutes the EntityHome). I would imagine there be a way to pass parameters around the pages and use their values in EL, but I don't know how. I saw that in pages.dtd, there are also "in" and "out" elements, wonder if these can do exactly what I wanted, but couldn't find their description/usage on the reference doc. Any clarification/education?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034714#4034714
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034714
19 years
[JBoss Seam] - Re: binding UIData and Seam
by christian.bauer@jboss.com
You can bind it to an EVENT scoped component if you just need the index:
| <h:dataTable value="#{wikiTextAttachments}" var="link" style="width:450px;"
| binding="#{wikiUtil.datatable}"
| styleClass="datatable rightBorder leftBorder topBorder bottomBorder"
| headerClass="regularHeader alignLeft"
| columnClasses="fivePercentColumn alignLeft, defaultColumn alignLeft"
| rowClasses="rowOdd,rowEven"
| cellpadding="0" cellspacing="0" border="0">
| <h:column>
| <f:facet name="header">Attachments:</f:facet>
| <h:panelGrid columns="3" columnClasses="onePercentColumn alignRight, onePercentColumn alignLeft, onePercentColumn alignRight">
| <s:span><a name="attachment#{wikiUtil.datatable.rowIndex + 1}"/></s:span>
| <h:outputText value="# #{wikiUtil.datatable.rowIndex + 1}"/>
| <h:graphicImage value="/themes/#{globalPrefs.themeName}/img/#{fileMetaMap[link.node.contentType].displayIcon}"
| width="18" height="20"/>
| </h:panelGrid>
| </h:column>
|
| @Name("wikiUtil")
| public class WikiUtil {
|
|
| /**
| * Need to bind UI components to non-conversational backing beans.
| * That this is even needed makes no sense. Why can't I call the UI components
| * in the EL directly? Don't try #{components['id']}, it won't work.
| */
| private UIData datatable;
| public UIData getDatatable() { return datatable; }
| public void setDatatable(UIData datatable) { this.datatable = datatable; }
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034711#4034711
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034711
19 years