[JBoss Seam] - Re: Selectable linklist without <h:dataTable>
by knuwu
I changed the list to DataModel using DataModel Annotation:
@Stateful
| @Name("configSelector")
| @Scope(ScopeType.SESSION)
| public class ConfigurationSelectorImpl implements ConfigurationSelector {
|
| @Logger private Log log;
|
| @DataModel
| private ArrayList<Module> moduleList = new ArrayList<Module>();
|
| @DataModelSelection
| @Out(required=false)
| private Module selectedModule;
|
| @SuppressWarnings("unused")
| @Create
| public void initModuleList() {
| moduleList.add(AdminModule.getInstance());
| moduleList.add(TestModule.getInstance());
| }
|
| public ArrayList<Module> getModuleList () {
| return this.moduleList;
| }
|
| public void selectModule(Module pModule) {
| this.selectedModule = pModule;
| log.info("#0 selected", this.selectedModule.getName());
| }
|
| @Destroy @Remove
| public void destroy() {}
|
| }
The first entry of the DataModel is automatically stored in variable selectedModule (DataModelSelection annotated). This is not may prefered behavior but would be acceptable if there's no other possiblity.
Unfortunatly the parameter pModule is still null in Methode selectModule() when I click another link in the list. The variable selected Module still points to the first list element.
Any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031524#4031524
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031524
19Â years
[JBossWS] - Re: beginner needs help
by vitor_b
Sorry for such a long time you had to wait for my reply.
First thing you need is: JWSDP (Java Web Services Developer Pack). You can download it from www.sun.com. I use jwsdp-1.4.
And here it is ant task which will generate for you jaxrpc-mapping and wsdl files:
First we need to set path to JWSDP:
<property name="jwsdp.dir" value="<your path>\jwsdp-1.4" />
| <property name="classes.dir" value="<compiled classes>\bin" />
Replace values in <> to your specific ones.
Now we have to specify jar libraries we will use:
<path id="jwsdp.lib.path">
| <fileset dir="${jwsdp.dir}/jwsdp-shared">
| <include name="**/*.jar"/>
| </fileset>
|
| <fileset dir="${jwsdp.dir}/jaxrpc">
| <include name="**/*.jar"/>
| </fileset>
|
| <fileset dir="${jwsdp.dir}/saaj">
| <include name="**/*.jar"/>
| </fileset>
| </path>
We need one more library (we need class com.sun.tools.javac.Main):
<path id="wscompile.task.classpath">
| <path refid="jwsdp.lib.path"/>
| <fileset dir="${java.home}/../lib" includes="tools.jar"/>
| </path>
Now we define our own ant task:
<taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile" classpathref="wscompile.task.classpath"/>
And we run it:
<target name="run-wscompile" depends="xdoclet-build">
| <wscompile base="${res-generated-dir}"
| fork="true"
| server="true"
| features="rpcliteral"
| mapping="${res-gen-ws}/jaxrpc-mapping.xml"
| config="${res-hand-made-dir}/wscompile-config.xml"
| nonClassDir="${res-gen-ws}">
|
| <classpath>
| <path refid="wscompile.task.classpath"/>
| <pathelement location="${classes.dir}"/>
| </classpath>
|
| </wscompile>
| </target>
res-gen-ws and res-hand-made-dir are my dirs.
res-gen-ws is the directory which will contain generated jaxrpc-mapping and wsdl files. But wscompile task needs one more thing: wscompile-config.xml
This file contains info which will be used for generating files for you.
My file looks like that:
<?xml version="1.0" encoding="UTF-8"?>
| <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
| <service name="NameWebService"
| targetNamespace="http://localhost:8080/jmsprototype"
| typeNamespace="http://localhost:8080/jmsprototype/types"
| packageName="ws.bean">
| <interface name="ws.bean.WebService"/>
| </service>
| </configuration>
packageName - package contains web service classes
Element interface contains WebService class, that implements interface java.rmi.Remote.
service name - name for service in wsdl file
<service name="NameWebService">
You still have to create webservices.xml file yourself. But that is not a very hard thing to do.
If you have any questions just ask.
I will check this topic later.
Take care
vitor_b
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031523#4031523
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031523
19Â years
[Installation, Configuration & Deployment] - I can't connect to my BDD (mysql_ds.xml deployer)
by gildov
I install jboss 4.0.0
Now im configuring mysql deployer (mysql_ds.xml):
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>MySqlDSBiootop</jndi-name>
<connection-url>jdbc:mysql://127.0.0.1:3306/biootop</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>biootopBD</user-name>
venezmoi0789
<type-mapping>mySQL</type-mapping>
</local-tx-datasource>
I put the mysql-connector-java-3.1.8-bin.jar in the serveur/default/lib.
When i lauch the server, i get every time get this error:
12:34:48,203 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
Packages waiting for a deployer:
org.jboss.deployment.DeploymentInfo@fbcd8354 { url=file:/C:/jboss-4.0.0/server/d
efault/deploy/mysql_ds.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/C:/jboss-4.0.0/server/default/deploy/mysql_ds.xml
altDD: null
lastDeployed: 1174905286515
lastModified: 1174905284625
mbeans:
Incompletely deployed packages:
org.jboss.deployment.DeploymentInfo@fbcd8354 { url=file:/C:/jboss-4.0.0/server/d
efault/deploy/mysql_ds.xml }
deployer: null
status: null
state: INIT_WAITING_DEPLOYER
watch: file:/C:/jboss-4.0.0/server/default/deploy/mysql_ds.xml
altDD: null
lastDeployed: 1174905286515
lastModified: 1174905284625
mbeans:
Please help, i can connect to my BDD
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031522#4031522
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031522
19Â years
[JBoss Seam] - Tests errors
by artur.chyzy
Hello. I'm trying to run some tests.
When i put following config to orm.xml
|
| <persistence-unit-metadata>
| <persistence-unit-defaults>
| <entity-listeners>
| <entity-listener class="org.jboss.seam.security.EntitySecurityListener"/>
| </entity-listeners>
| </persistence-unit-defaults>
| </persistence-unit-metadata>
|
i've got this error:
|
| java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
| at org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:33)
| at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:78)
| at org.hibernate.ejb.event.EntityCallbackHandler.postLoad(EntityCallbackHandler.java:71)
| at org.hibernate.ejb.event.EJB3PostLoadEventListener.onPostLoad(EJB3PostLoadEventListener.java:35)
| at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:201)
| at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
| at org.hibernate.loader.Loader.doQuery(Loader.java:717)
| at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
| at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
| at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
| at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
| at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821)
| at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:370)
| at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351)
| at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122)
| at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178)
| at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:86)
| at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:801)
| at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:155)
| at pl.alternativ.med.pacjent.DeklaracjaPOZUnitTest.utworz(DeklaracjaPOZUnitTest.java:78)
| at org.hibernate.ejb.event.ListenerCallback.invoke(ListenerCallback.java:30)
| ... 42 more
| Caused by: java.lang.IllegalStateException: No active session context
| at org.jboss.seam.security.Identity.instance(Identity.java:108)
| at org.jboss.seam.security.EntitySecurityListener.postLoad(EntitySecurityListener.java:24)
| ... 47 more
| ... Removed 26 stack frames
|
|
I think seam is trying to get identity to check restrictions (i think it shouldn't in unit tests). If this situation is fine then i need to create two separate configs for tests (unit and integration).
Without it tests works fine.
//-------------------------------------------------------------------------
Also when trying to run integration tests, config from pages.xml file are not read correctly - it doesn't start conversation
I used following config
| <navigation from-action="#{someBean.select}">
| <begin-conversation nested="true"/>
| <redirect view-id="/edit.jspx" />
| </navigation>
|
When i put some object to conversation scope using
| Contexts.getConversationContext().set()
the value is not in context after new request (even if i put the same cid to it). This is my code:
| new FacesRequest("/edit.jspx", cid)
|
|
I changed start and end conversation definition from ejb3 bean annotation to local pages.xml file which doesn't work for tests (but works fine when application is running).
Please post some help if i made mistake. I'm out of ideas.
I marked my questions
Artur
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031519#4031519
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031519
19Â years
[Messaging, JMS & JBossMQ] - Re: import org.jboss.mq.server.jmx.Queue
by milind.uc
Dear Victor,
Feel happy as ur problem get solved... Well I tried the code sample which you have been written for me but I am getting problem in it.
|
| String domain = "jboss.mq.destination";
| String service = "service=Queue";
| String name = "name=testQueue";
|
| String stringObjectName = domain + ":" + service + "," + name;
|
| MBeanServer server = MBeanServerLocator.locateJBoss();
|
| try{
| ObjectName queueObjectName = ObjectName.getInstance(stringObjectName);
|
| org.jboss.mq.server.jmx.QueueMBean queueMBean =
| (org.jboss.mq.server.jmx.QueueMBean) MBeanServerInvocationHandler.newProxyInstance(
| server,
| queueObjectName,
| org.jboss.mq.server.jmx.QueueMBean.class,
| false
| );
|
| logger.info("queue depth: " + queueMBean.getQueueDepth());
|
| }catch (Exception e){
| logger.info("cannot get depth of the queue: " + e.getMessage(),e);
| }
After using it I am getting the error like :-------
java.lang.IllegalStateException: No 'jboss' MBeanServer found!
at org.jboss.mx.util.MBeanServerLocator.locateJBoss(MBeanServerLocator.java:46)
So do you have any idea on it
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031515#4031515
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031515
19Â years