[JBoss AOP] - Re: How do you use EnableLoadtimeWeaving for a Windows Servi
by sweetvenkat
"sweetvenkat" wrote : "kabir.khan(a)jboss.com" wrote : First of all make sure that you can get the "injboss" tutorial example running, so that you know how to set up loadtime weaving for an instance you manage yourself.
| |
| | The jar to use for the -javaagent when running with jboss is pluggable-instrumentor.jar
| | not jboss-aop-jdk50.jar
| | :
| | | set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -javaagent:C:\myjboss\bin\pluggable-instrumentor.jar
| | |
| |
| | I am not sure what JBoss IDE or jbosservice use run.bat or if they invoke the jboss Main class themselves. So if modifying the run.bat does not work for you, try to set the -javaagent switch when creating your service:
| |
|
|
| Kabbir;
|
| Yeah, i set JAVA_OPTS to full path of pluggable-instrumentor.jar. But, i see the same problem.
|
| I'll try.
|
| But what about ejb3 interceptors. As an alternative to jboss-aop, can we use ejb3 interceptors?
|
| Here is my sesssion bean..
|
| package com.j3ltd.test.ejbs;
|
| import java.io.Serializable;
| import javax.ejb.Stateless;
| import javax.ejb.AroundInvoke;
| import javax.ejb.InvocationContext;
|
| public @Stateless class TestStatelessBean implements TestStateless,Serializable {
|
| public String testBean() {
| System.out.println("Business Method Called...");
| return "the server returned this string";
| }
|
| @AroundInvoke
| public Object log(InvocationContext ctx) throws Exception {
| System.out.println("Security Check Done!!!");
| return ctx.proceed();
| }
|
| }
|
|
| When I invoked the sesson bean's business method, even ejb3 interceptor did not work? So, where the problem is? I am using Jboss-4.0.4RC1 and configured thru jboss-ide5.
|
| But i see the following when i invoked the business method...
| 13:21:25,578 INFO [STDOUT] FieldsManager in use = org.jboss.serial.classmetamodel.ReflectionFieldsManager
| 3:21:25,703 INFO [STDOUT] Business Mehod Called...
|
| Thanks for letting me know...
| Eswarrao Ankamreddy
EJB Interceptors are working fine with RC9. The annotations were moved from javax.ejb to javax.interceptor package.
I tried with jboss-ide 2 on jboss4.0.5GA. Everything is perfect. But. I am not sure about jboss-aop.
Thanks
Eswar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989141#3989141
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989141
19Â years, 5Â months
[JBoss Seam] - Re: Where is the database?
by seamguy
Thanks for the suggestions, Norman. I tried setting the URL you suggested in the HSQLDB manager connect dialog, but that throws an exception. I tried numerous other variants and they all throw exceptions too.
I really don't want to have to figure out how to launch the DB manager from within the application, or try to install a Seam component just to examine tables. All of that is way too much trouble for what should be a very simple thing.
I find it difficult to believe that I cannot just type in a URL in the HSQLDB manager connect dialog and access my database when using JBoss embedded EJB3 in Tomcat. I have now spent an entire day trying to just view my db tables. I am really, really, frustrated. This is really quite ridiculous.
Does anyone know how to do this? Is anyone running Seam in Tomcat with the JBoss embedded EJB3 server? If so, how do you access the HSQL database?
To summarize: I have a simple Seam app that manipulates one db table and I want to view that table in the database. My application runs in Tomcat with the JBoss embedded EJB3 server. In $JBOSS_HOME/server/default/data/hypersonic, I start the HSQLDB manager with this command:
java -cp /Developer/Java/Tools/hsqldb/lib/hsqldb.jar org.hsqldb.util.DatabaseManagerSwing
I can connect with the default info in the Contact dialog:
Type: HSQL Database Engine In-Memory
Driver: org.hsqldb.jdbcDriver
URL: jdbc:hsqldb:mem:.
User: sa
These are the same as the settings in the embedded-jboss-beans.xml that's in the mc-conf.jar file in resources/WEB-INF/lib, but I don't see any database tables. If I try a different URL, such as jdbc:hsqldb:hsql://localhost:1701, I get a socket connection error.
Does anyone know what to type in the Connect dialog so that I can connect to my database and view my table?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989137#3989137
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989137
19Â years, 5Â months
[Installation, Configuration & Deployment] - Re: JEMS Installer 1.2.0.CR1: Errors when starting JBoss
by cjindahouse
Ok, I downloaded another version using the JEMS installer and this config file was fine.
Vladimir - I've installed several version of JBOSS and it's possible that I was using an "all" installation rather than the "ejb3" install.
Good news, I can deploy my EJB3 annotated session beans and view them from the JMX console, however the EJB3 entity bean is not registered in JMX.
I noticed that the EJBContainer throws a log message after deploying a bean..
""10:26:54,318 INFO [EJBContainer] STARTED EJB: ......"
and that this message appears for my sessions beans, but not for my entity bean.
| 10:26:51,766 INFO [Ejb3Configuration] found EJB3 Entity bean: com.asdf.rightnow.RightnowRegistration
| 10:26:51,785 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
| 10:26:51,863 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml
| 10:26:51,883 INFO [Ejb3Configuration] [PersistenceUnit: oracle-alive] no META-INF/orm.xml found
| 10:26:51,960 INFO [AnnotationBinder] Binding entity from annotated class: com.asdf.rightnow.RightnowRegistration
| 10:26:52,130 INFO [EntityBinder] Bind entity com.asdf.rightnow.RightnowRegistration on table registration
| 10:26:52,695 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
| 10:26:52,716 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
| 10:26:53,275 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
| With the Partitioning, OLAP and Data Mining options
| 10:26:53,275 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 10.1.0.2.0
| 10:26:53,315 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
| 10:26:53,340 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
| 10:26:53,360 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
| 10:26:53,380 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
| 10:26:53,381 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
| 10:26:53,381 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
| 10:26:53,381 INFO [SettingsFactory] JDBC batch size: 15
| 10:26:53,381 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
| 10:26:53,382 INFO [SettingsFactory] Scrollable result sets: enabled
| 10:26:53,401 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
| 10:26:53,401 INFO [SettingsFactory] Connection release mode: auto
| 10:26:53,402 INFO [SettingsFactory] Default batch fetch size: 1
| 10:26:53,420 INFO [SettingsFactory] Generate SQL with comments: disabled
| 10:26:53,421 INFO [SettingsFactory] Order SQL updates by primary key: disabled
| 10:26:53,439 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
| 10:26:53,460 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
| 10:26:53,460 INFO [SettingsFactory] Query language substitutions: {}
| 10:26:53,460 INFO [SettingsFactory] JPA-QL strict compliance: enabled
| 10:26:53,460 INFO [SettingsFactory] Second-level cache: enabled
| 10:26:53,460 INFO [SettingsFactory] Query cache: disabled
| 10:26:53,461 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
| 10:26:53,462 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
| 10:26:53,497 INFO [SettingsFactory] Structured second-level cache entries: disabled
| 10:26:53,522 INFO [SettingsFactory] Echoing all SQL to stdout
| 10:26:53,522 INFO [SettingsFactory] Statistics: disabled
| 10:26:53,522 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
| 10:26:53,523 INFO [SettingsFactory] Default entity-mode: pojo
| 10:26:53,579 INFO [SessionFactoryImpl] building session factory
| 10:26:53,835 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
| 10:26:53,854 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 10:26:53,958 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=integration.ear,jar=integrate-ejb3.jar,name=RegistrationService,service=EJB3 with dependencies:
| 10:26:53,958 INFO [JmxKernelAbstraction] persistence.units:ear=integration.ear,jar=integrate-ejb3.jar,unitName=oracle-alive
| 10:26:54,129 INFO [EJBContainer] STARTED EJB: com.asdf.rightnow.RegistrationService ejbName: RegistrationService
| 10:26:54,163 INFO [SimpleStatefulCache] Initializing SimpleStatefulCache with maxSize: 100000 timeout: 300 for jboss.j2ee:ear=integration.ear,jar=integrate-ejb3.jar,name=RegistrationService,service=EJB3
| 10:26:54,183 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=integration.ear,jar=integrate-ejb3.jar,name=RightnowEmailReaderBean,service=EJB3 with dependencies:
| 10:26:54,183 INFO [JmxKernelAbstraction] persistence.units:ear=integration.ear,jar=integrate-ejb3.jar,unitName=oracle-alive
| 10:26:54,318 INFO [EJBContainer] STARTED EJB: com.asdf.rightnow.RightnowEmailReaderBean ejbName: RightnowEmailReaderBean
| 10:26:54,364 INFO [EJB3Deployer] Deployed: file:/jboss-4.0.5.GA-test-all/server/default/tmp/deploy/tmp11604integration.ear-contents/integrate-ejb3.jar
| 10:26:54,388 INFO [TomcatDeployer] deploy, ctxPath=/integrate, warUrl=.../tmp/deploy/tmp11604integration.ear-contents/integrate-exp.war/
| 10:26:54,590 INFO [EARDeployer] Started J2EE application: file:/jboss-4.0.5.GA-test-all/server/default/deploy/integration.ear
|
Any ideas, is this a configuration problem? The EntityBean is quite simple.
thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989132#3989132
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989132
19Â years, 5Â months