[EJB 3.0] - Can't find EJB Annotations
by ThomasGo
Hi, I'm new to this forum so I don't know if this is the right place for my question, but here it is:
I have serveral embedded classes in my entities, e.g. a field of type 'Address'(embedded class) in entity 'Person'. At Runtime I want to inspect my entities in order to be able to have one class which is able to set/get properties given by name, e.g. MetaData.set(Entity target, String field, Object value) would check if the field exists and then tries to set the value of the field in the given instance.
My embedded classes should not be visible as such, but their properties should appear as properties of the entity. For example, 'MetaData.set(new Person(), "street", "a long street") 'should be equivalent to 'new Person().getAddress().setStreet("a long street")'.
Now, here's the problem: When inspecting my class I want to know if a method 'getXXX()' (e.g. 'getAddress()') is annotated with @Embedded so that I can go and inspect the class Address. However, when calling Method.getAnnotations() on such a method I get a zero-size array.
If I add a custom annotation @Test that one is returned, but @Embedded and the like (doesn't work for @Entity on classes, too) are not.
I'd appreciate any help. Thanks in advance folks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987511#3987511
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987511
19Â years, 5Â months
[JBossCache] - Re: How to, Flush data stored in TreeCache to disk?
by sjeevan
Manik,
Thank you.
My problem has been resolved but in a different way.
I checked the code you pointed out and the xml used to configure the CacheLoader is as
| #DEBUG 15:35:02 [recovery.LedgerImpl] (main) Cache loader
| configuration XML=
| <config>
| <passivation>false</passivation>
| <preload></preload>
| <cacheloader>
| <class>org.jboss.cache.loader.bdbje.BdbjeCacheLoader</class>
| <properties>location=C:\DOCUME~1\124872\LOCALS~1\Temp\dev\Ledgers\INTTEST2</properties>
| <async>false</async>
| <shared>false</shared>
| <fetchPersistentState>true</fetchPersistentState>
| <purgeOnStartup>false</purgeOnStartup>
| </cacheloader>
| </config>
|
As pointed out the value of __async__ is false, but that did not help in acheiving flush to disk.
Anyways I discovered that by setting the TransactionManager of the TreeCache I could achieve flushing to disk.
| this.cache = new TreeCache();
| cache.setClusterName(eventSourceName);
| cache.setCacheMode("local");
|
| //set the Transaction Manager to enable flushing of cache to disk
| cache.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
|
| cache.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("",
| BdbjeCacheLoader.class.getName(), "location="
| + f.getAbsolutePath(), false, true, false));
|
|
thank u
~g1
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987509#3987509
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987509
19Â years, 5Â months
[JBossWS] - Deploying JDeveloper/Oracle webservices on JBossWS
by muted
Hi,
I've been trying to deploy a webservice created in JDeveloper on JBoss. I've tried to search for other messages on both these boards and Oracle's forums but haven't had much luck. The .war file doesn't deploy properly, the error message given is:
2006-11-21 11:31:38,351 ERROR [org.jboss.deployment.MainDeployer] Could not create deployment: file:/C:/jboss-4.0.5.GA/server/default/deploy/DashboardWS.war
| java.lang.ClassCastException: oracle.j2ee.ws.wsdl.xml.WSDLReaderImpl
| at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:142)
| at org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:263)
| at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:90)
| at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:78)
| at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInterceptor.java:80)
| at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(DeployerInterceptorJSE.java:83)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy39.create(Unknown Source)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
|
I'm running JBoss AS 4.0.5GA on Sun JDK 1.5.0_01, with JBossWS 1.0.4.
Is it even possible to deploy the web service and if it is, what steps should I take to accomplish it?
As a related note, I got the same ClassCastException when trying to implement a JBoss DII webservice client based on the same WSDL file we're using on the JDeveloper webservice.
-Pekka
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987504#3987504
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987504
19Â years, 5Â months