[EJB 3.0] - problem
by daviddev
Hi guys,
I do have an error when i deploy my j2ee application on a jboss server.
08:53:02,986 [ScannerThread] ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:ear=MyMMClient1EJB.ear,jar=MessageStoreManagerEJB.jar,name=MessageStoreManagerBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:unitName=messagemanager
ObjectName: jboss.j2ee:ear=MyMMClient1EJB.ear,jar=MessageStoreManagerEJB.jar,name=MessageTargetManagerBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:unitName=messagemanager
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:unitName=messagemanager
State: NOTYETINSTALLED
Depends On Me:
jboss.j2ee:ear=MyMMClient1EJB.ear,jar=MessageStoreManagerEJB.jar,name=MessageStoreManagerBean,service=EJB3
jboss.j2ee:ear=MyMMClient1EJB.ear,jar=MessageStoreManagerEJB.jar,name=MessageTargetManagerBean,service=EJB3
My application is depoyed through a EAR file which has the following structure:
| MyApplicationEJB.ear
| |--lib (my libraries)
| |--META-INF
| | |--Application.xml
| |--MessageManagerEJB.jar (a set of class and message driven bean)
| |--MessageManagerTest (a set of mock class for my test)
| |--MessageStoreManagerEJB.jar ( a set of entity classs and entity bean)
| |--MessageManagerWeb.war (servlet)
| |--MyMMClient1EJB.jar (my application that use the message manager beans)
| |--ejb-jar.xml
| |--persistence.xml
|
the application.xml is defined as:
| <?xml version="1.0" encoding="UTF-8"?>
| <application version="5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
| <display-name>MessageManager</display-name>
| <module>
| <ejb>MyMMClient1EJB.jar</ejb>
| </module>
| <module>
| <ejb>MessageManagerWeb.war</ejb>
| </module>
| <module>
| <ejb>MessageManagerEJB.jar</ejb>
| </module>
|
| <module>
| <ejb>MessageStoreManagerEJB.jar</ejb>
| </module>
|
| <module>
| <ejb>lib/LoggingSubsystem.jar</ejb>
| </module>
| </application>
|
the ejb-jar file in MyMMClient1EJB is defined as
| <?xml version="1.0" encoding="UTF-8"?>
| <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
|
| <display-name>MyMMClient1</display-name>
| <enterprise-beans>
|
| <message-driven >
| <display-name>MessagerReceiver</display-name>
| <ejb-name>MessageReceiver</ejb-name>
| <ejb-class>com.ecebs.multefile.messaging.messagemanager.receiving.MessageReceiver</ejb-class>
|
| <transaction-type>Container</transaction-type>
| <activation-config>
| <activation-config-property>
| <activation-config-property-name>destinationType</activation-config-property-name>
| <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>destination</activation-config-property-name>
| <activation-config-property-value>queue/MyMMClient1</activation-config-property-value>
| </activation-config-property>
| </activation-config>
| </message-driven>
| <message-driven >
| <display-name>IncomingMessageReceiver</display-name>
| <ejb-name>IncomingMessageReceiver</ejb-name>
| <ejb-class>com.ecebs.multefile.messaging.messagemanager.receiving.IncomingMessageReceiver</ejb-class>
|
| <transaction-type>Container</transaction-type>
| <activation-config>
| <activation-config-property>
| <activation-config-property-name>destinationType</activation-config-property-name>
| <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>destination</activation-config-property-name>
| <activation-config-property-value>queue/MyMMClient1EJBInMsg</activation-config-property-value>
| </activation-config-property>
| </activation-config>
| </message-driven>
|
| <message-driven >
| <display-name>MessageDeliverer</display-name>
| <ejb-name>MessageDeliverer</ejb-name>
| <ejb-class>com.ecebs.multefile.messaging.messagemanager.sending.MessageDeliverer</ejb-class>
|
| <transaction-type>Container</transaction-type>
| <activation-config>
| <activation-config-property>
| <activation-config-property-name>destinationType</activation-config-property-name>
| <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
| </activation-config-property>
| <activation-config-property>
| <activation-config-property-name>destination</activation-config-property-name>
| <activation-config-property-value>queue/MyMMClient1EJBOutMsg</activation-config-property-value>
| </activation-config-property>
| </activation-config>
| </message-driven>
|
|
| </enterprise-beans>
| </ejb-jar>
|
the persistence.xml file is defined as
| <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="messagemanager" transaction-type="JTA">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:MESSAGEMANAGER_C1_DS</jta-data-source>
|
| <jar-file>../MessageStoreManagerEJB.jar</jar-file>
|
| <!-- <exclude-unlisted-classes >false</exclude-unlisted-classes> -->
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9iDialect"/>
| <property name="hibernate.show_sql" value="true"/>
| <property name="hibernate.format_sql" value="true"/>
| <property name="hibernate.hbm2ddl.auto" value="create"/>
| </properties>
| </persistence-unit>
|
| </persistence>
|
the bean in the MessageStoreManagerEJB.jar include the annotation for the persistency and session bean
| @Stateless
| @PersistenceContext(
| name = MessageManagerConstants.PERSIST_NAME,
| unitName = MessageManagerConstants.PERSIST_JNDI
| )
| public class MessageStoreManagerBean implements MessageStoreManager, MessageStoreManagerLocal{
| ...
|
| }
|
I could not figure out what is wrong with my code. Does somebody can help me.
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240233#4240233
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240233
15 years
[JBoss Portal] - Found the management interface
by TomHombergs
I downloaded the JBoss Portal source and had a thorough look at the admin portlets (core-admin project), in which the portal structure is modified. Then, I imitated it in my own portlet.
Here is how it works:
Entries in jboss-portlet.xml to get access to some JBoss-Services:
| <service>
| <service-name>PortalObjectContainer</service-name>
| <service-class>org.jboss.portal.core.model.portal.PortalObjectContainer</service-class>
| <service-ref>:container=PortalObject</service-ref>
| </service>
| <service>
| <service-name>InstanceContainer</service-name>
| <service-class>org.jboss.portal.core.model.instance.InstanceContainer</service-class>
| <service-ref>:container=Instance</service-ref>
| </service>
| <service>
| <service-name>AuthorizationDomainRegistry</service-name>
| <service-class>org.jboss.portal.security.AuthorizationDomainRegistry</service-class>
| <service-ref>:service=AuthorizationDomainRegistry</service-ref>
| </service>
| <service>
| <service-name>FederatingPortletInvoker</service-name>
| <service-class>org.jboss.portal.portlet.federation.FederatingPortletInvoker</service-class>
| <service-ref>:service=PortletInvoker,type=Federating</service-ref>
| </service>
|
Java-Code example in the portlet, including iteration through all deployed portlets, creating a portal page, creating a portlet instance and putting in in a window on that page:
PortalObjectContainer container = (PortalObjectContainer) getPortletContext().getAttribute("PortalObjectContainer");
| InstanceContainer instanceContainer = (InstanceContainer) getPortletContext().getAttribute("InstanceContainer");
| FederatingPortletInvoker portletInvoker = (FederatingPortletInvoker) getPortletContext().getAttribute("FederatingPortletInvoker");
| AuthorizationDomainRegistry registry = (AuthorizationDomainRegistry) getPortletContext().getAttribute("AuthorizationDomainRegistry");
|
| try {
| // create a portal page
| Page page = container.getContext().getDefaultPortal().createPage("MyPage" + counter);
|
| // iterate through existing portlets and select one
| List<Portlet> tmpPortlets = new ArrayList(portletInvoker.getFederatedInvoker("local").getPortlets());
| for (Portlet portlet : tmpPortlets) {
| if(portlet.getInfo().getName().equals("WeatherPortlet")){
| // create an instance of the selected portlet
| InstanceDefinition def = instanceContainer.createDefinition("MyPortlet" + counter, portlet.getContext().getId());
| // configuring security
| DomainConfigurator configurator = registry.getDomain("instance").getConfigurator();
| Set constraints = Collections.singleton(new RoleSecurityBinding("view", SecurityConstants.UNCHECKED_ROLE_NAME));
| configurator.setSecurityBindings(def.getId(), constraints);
| // create a window containing the portlet
| Window window = page.createWindow("MyWindow" + counter, ContentType.PORTLET, def.getId());
| window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_REGION, "right");
| window.setDeclaredProperty(ThemeConstants.PORTAL_PROP_ORDER, "" + Integer.MAX_VALUE);
| }
| }
|
| } catch (IllegalArgumentException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| } catch (DuplicatePortalObjectException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| } catch (DuplicateInstanceException e1) {
| // TODO Auto-generated catch block
| e1.printStackTrace();
| } catch (PortletInvokerException e1) {
| // TODO Auto-generated catch block
| e1.printStackTrace();
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240212#4240212
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240212
15 years
[JBoss jBPM] - Re: Best way to get audit or history information
by swatis
to get list of process instances for particular process provide processdefinition id
Query query = session.getNamedQuery("GraphSession.findAllProcessInstancesForADefinition");
| query.setLong("processDefinitionId", processDefinitionId);
| java.util.List processInstances = query.list();
Iterate these instances and for one instance get list of task instances by invoking method of process instance object
java.util.List taskList = processInstance.getTaskMgmtInstance().getTaskInstances();
you can also use this query to get list of all process definitions
Query query = session.getNamedQuery("GraphSession.findAllProcessDefinitions");
to get list of all process instances
Query query = session.getNamedQuery("GraphSession.findAllProcessInstances
| ");
For each task instance use
taskIns.getActorId(); taskIns.getStart(); taskIns.getEnd();
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240201#4240201
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240201
15 years