JavaBeans bean container
I have a JavaBean, where one of the properties of the bean is as a bean container for other beans of a certain type or sub-type. I would like to specify this property as a BeanContext, which is the traditional bean container under Java 1.4 and up. While I can specify the type of this property as a BeanContext, and instantiate a BeanContext from the BeanContextSupport class, how can I get IDE environments which host JavaBeans to generically treat this property as a nested BeanContext ?
Hi
i had the same doubt!
i found this link
http://forum.java.sun.com/thread.jspa?threadID=787649&start=10&tstart=0
hope it helps!!
Regards!!!
Tiago
Similar Messages
-
EJB 3.0 question - saving an entity bean containing another entity bean
Hi,
First, I want to store an entity bean. Secondly, I want to store another entity bean - containing the first entity bean.
I have the following code in a session bean for this:
public void saveFeedScheduling(FeedScheduling feedScheduling, FeedSource feedSource) {
FeedSource feeds = em.merge(feedSource);
em.flush();
feedScheduling.setFeedSource(feeds);
FeedScheduling feedSched = em.merge(feedScheduling);
em.flush();
This seems to work fine - still, is this the proper way to do it?Hello,
This kind of parameter can be specified using the relationship annotation.
I'm not 100% sure, but, lok at the "cascade element".
Regards,
Sebastien Degardin -
Exception in setting up message-driven bean container: [MQJMS1010: not impl
Problem
=======
We are trying to configure and deploy a Message Driven
Bean to listen on a WebSphere MQ queue, using LDAP to
share knowledge of the Queue & Connection Factory.
But when we start the Sun One domain we get an exception:
javax.jms.JMSException: MQJMS1010: not implemented
(see log file at the end of this email)
Can anybody help please ?
The configuration of the various components are listed
below:
WebSphere MQ Configuration
==========================
Version 5.3
Queue Manager
QM_Test
Queues
PATH_MFP.Case.Request
Queue Type: Local
Channels
Channel_Test
Channel Type: Server Connection
Protocol Type: TCP/IP
LDAP configuration
==================
ldap://localhost/o=mqtest
cn=MFP_LOCAL_Factory
javaFactory=com.ibm.mq.jms.MQQueueConnectionFactoryFactory
javaClassName=com.ibm.mq.jms.MQQueueConnectionFactory
javaReferenceAddress=#3#QMGR#QM_Test
javaReferenceAddress=#6#CHAN#Channel_Test
javaReferenceAddress=#14#TM#SYSTEM.DEFAULT.MODEL.QUEUE
cn=MFP_LOCAL_Case_Request_Queue
javaFactory=com.ibm.mq.jms.MQQueueFactory
javaClassName=com.ibm.mq.jms.MQQueue
javaReferenceAddress=#9#QU#PATH_MFP.Case.Request
javaReferenceAddress=#10#QMGR#QM_Test
EJB configuration
=================
ejb-jar.xml
<message-driven>
<display-name>ServerMessageDrivenBean</display-name>
<ejb-name>ServerMessageDrivenBean</ejb-name>
<ejb-class>nz.co.acc.emi.server.connector.mdb.ServerMessageDrivenBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
sun-ejb-jar.xml
<ejb>
<ejb-name>ServerMessageDrivenBean</ejb-name>
<jndi-name>MFP_LOCAL_Case_Request_Queue</jndi-name>
<mdb-connection-factory>
<jndi-name>MFP_LOCAL_Factory</jndi-name>
</mdb-connection-factory>
</ejb>
Sun One configuration
=====================
MFPProcessing: JNDI: External Resources
MFP_LOCAL_Factory Enabled javax.jms.QueueConnectionFactory
JNDI Name: MFP_LOCAL_Factory
Resource Type: javax.jms.QueueConnectionFactory
JNDI Lookup: cn=MFP_LOCAL_Factory
Factoryclass: com.sun.jndi.ldap.LdapCtxFactory
Properties:
java.naming.provider.url ldap://localhost:389/o=mqtest
java.naming.security.authentication none
MFP_LOCAL_Case_Request_Queue Enabled javax.jms.Queue
JNDI Name: MFP_LOCAL_Case_Request_Queue
Resource Type: javax.jms.Queue
JNDI Lookup: cn=MFP_LOCAL_Case_Request_Queue
Factoryclass: com.sun.jndi.ldap.LdapCtxFactory
Properties:
java.naming.provider.url ldap://localhost:389/o=mqtest
server.xml
<mdb-container steady-pool-size="10" pool-resize-quantity="2" max-pool-size="60" idle-timeout-in-seconds="600" monitoring-enabled="true" log-level="FINEST" />
<jms-service port="1240" admin-user-name="admin" admin-password="admin" init-timeout-in-seconds="30" enabled="true" log-level="FINE" />
Sun One log file
================
server.log
[01/Mar/2004:10:06:48] INFO ( 657): CORE1116: Sun ONE Application Server 7.0.0_01
[01/Mar/2004:10:06:51] INFO ( 657): CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_01] from [Sun Microsystems Inc.]
[01/Mar/2004:10:07:09] INFO ( 657): JMS5023: JMS service successfully started. Instance Name = domain1_MFPProcessing, Home = [C:/Sun/AppServer7/imq/bin].
[01/Mar/2004:10:07:13] INFO ( 657): JTS5014: Recoverable JTS instance, serverId = [100]
[01/Mar/2004:10:07:14] INFO ( 657): RAR5060: Install JDBC Datasources ...
[01/Mar/2004:10:07:14] INFO ( 657): RAR5059: Binding [JDBC DataSource Name: jdbc/MfsDataSourceJConn, Pool Name: MFSConnectionPool]
[01/Mar/2004:10:07:15] INFO ( 657): JMS5015: Install JMS resources ...
[01/Mar/2004:10:07:47] WARNING ( 657): [EntityContainer] Created EntityContainer....
[01/Mar/2004:10:07:49] INFO ( 657): LDR5010: All ejb(s) of [mfs] loaded successfully!
[01/Mar/2004:10:07:52] INFO ( 657): MDB00044: Deploying message-driven bean [emi:ServerMessageDrivenBean], consuming from [MFP_LOCAL_Case_Request_Queue]
[01/Mar/2004:10:07:52] FINE ( 657): Messages delivery is part of a container-managed tx
[01/Mar/2004:10:07:52] FINE ( 657): emi:ServerMessageDrivenBean:reconnect-delay-in-seconds=60, reconnect-max-retries=60, reconnect-enabled=true
[01/Mar/2004:10:07:53] INFO ( 657): MDB00028: [emi:ServerMessageDrivenBean]: Message-driven bean container using external connection factory object: [com.ibm.mq.jms.MQQueueConnectionFactory]
[01/Mar/2004:10:07:55] FINE ( 657): emi:ServerMessageDrivenBean: Setting message-driven bean pool max-pool-size=60, steady-pool-size=10, pool-resize-quantity=2, idle-timeout-in-seconds=600
[01/Mar/2004:10:07:55] FINE ( 657): Initializing server session factory
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] INFO ( 657): MDB0001: Create message-driven bean pool with maximum pool size [60], bean idle timeout [600] seconds
[01/Mar/2004:10:07:55] SEVERE ( 657): MDB00030: [emi:ServerMessageDrivenBean]: Exception in setting up message-driven bean container: [MQJMS1010: not implemented]
[01/Mar/2004:10:07:55] FINE ( 657): MDB00018: [emi:ServerMessageDrivenBean]: Closing message-driven bean container connection
[01/Mar/2004:10:07:55] WARNING ( 657): [AbstractPool]: Cancelled pool timer task at: Mon Mar 01 10:07:55 NZDT 2004
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] SEVERE ( 657): MDB00017: [ServerMessageDrivenBean]: Exception in creating message-driven bean container: [javax.jms.JMSException: MQJMS1010: not implemented]
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] SEVERE ( 657): javax.jms.JMSException
javax.jms.JMSException: MQJMS1010: not implemented
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
[01/Mar/2004:10:07:55] SEVERE ( 657): EJB5090: Exception in creating EJB container [javax.jms.JMSException: MQJMS1010: not implemented]
[01/Mar/2004:10:07:55] SEVERE ( 657): appId=emi moduleName=emiEjb_jar ejbName=ServerMessageDrivenBean
[01/Mar/2004:10:07:55] SEVERE ( 657): LDR5004: UnExpected error occured while creating ejb container
javax.jms.JMSException: MQJMS1010: not implemented
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
[01/Mar/2004:10:07:55] WARNING ( 657): CORE5021: Application NOT loaded: [emi]
[01/Mar/2004:10:07:55] INFO ( 657): WEB0100: Loading web module [mfs:mfs.war] in virtual server [MFPProcessing] at [mfs]
[01/Mar/2004:10:08:31] INFO ( 657): HTTP3072: HTTP listener http-listener-1 [http://ch042dysz0405:1080] ready to accept requests
[01/Mar/2004:10:08:31] INFO ( 657): CORE3274: successful server startup
[01/Mar/2004:10:08:33] INFO ( 657): CORE5053: Application onReady complete.Hi,
You have not created the jms destination queue object
jms/Warehouse
Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
Create jms destination queue object using
asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme> jms/Warehouse
Then use list-jms-resources <instance_name> to
find if jms/Warehouse destionation queue object has been created.
Get back in case of any issues -
Exception in setting up message-driven bean container
hello,
I'm trying to deploy a single mdb and I'm getting an exception. I've tried closely following the way things are done with the mdb example in the samples AppServer7 directory. Am I missing something in one of my deployment descriptior files?
Thanks,
Robert
[17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00030: [mdb2-simpleEjb:MessageProcessorBean]: Exception in setting up message-driven bean container: [[C4060]: Login failed.]
[17/Apr/2003:12:18:24] FINE ( 1832): MDB00018: [mdb2-simpleEjb:MessageProcessorBean]: Closing message-driven bean container connection
[17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00017: [MessageProcessorBean]: Exception in creating message-driven bean container: [javax.jms.JMSSecurityException: [C4060]: Login failed.]
[17/Apr/2003:12:18:24] SEVERE ( 1832): javax.jms.JMSSecurityException
javax.jms.JMSSecurityException: [C4060]: Login failed.
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:682)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:615)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:238)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1512)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)Hi,
You have not created the jms destination queue object
jms/Warehouse
Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
Create jms destination queue object using
asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme> jms/Warehouse
Then use list-jms-resources <instance_name> to
find if jms/Warehouse destionation queue object has been created.
Get back in case of any issues -
How does session bean contain in the JSP page
May i know how session bean contains in the JSP page
If the situation is like the following ...
if i dont want to put the session bean in the session
like this :
session.setAttribute("UserBean",userBean);
the way i get the session bean is only
session.getAttribute("UserBean");
Does have the other way to get the Session bean during the JSP
if i dont want to use this kind of way,
what else i can do for?
may i know the solution with detailed
and please attach the solution of code to me if you know...
thanks...Hi,
I am not clear with ur query..
What I understood from ur query is that, u are trying to put the session ejb in the HttpSession Object for some use ahead in future?
If this is the case, then I think are approach is not correct.
StatefulSession beans are meant for this purpose, i.e they will be maintaining the client session. So use the same using the JndiLookup of the HomeInterface and the getting the Home reference and calling the businessmethods
sameer -
How to create non-visual bean container, which will have a children non-visual beans? Is this supported by Netbeans IDE?
Hi Geoff3c,
As you know SQL Server Analysis Services (SSAS) Tabular only supports visual totals. This is a differences between Analysis Services OLAP and Tabular that SSAS OLAP provides one feature that SSAS Tabular does not: non-Visual Totals. It was considered that
non-visual totals are not terribly common, but some developers have worked for clients where non-visual totals were required.
If you have any concern about this feature, you can submit a feedback at
http://connect.microsoft.com/SQLServer/Feedback and hope it is released in the next release of service pack or product. Your feedback enables Microsoft to make software and services the best that they can be, Microsoft might consider to add this feature
in the following release after official confirmation.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here.
Charlie Liao
TechNet Community Support -
Bean containing both UI components and business logic
Hello ADF design experts, please guide me. I came across a critical design aspects. I have main page having bunch of UI components, Region 1, Region 2. I will have to bind the UI components of the page to a managed bean having session scope and the reason is, when control goes to region 1 or region 2, I will be doing lot of processing of business logic and then based on this, I will have to update the UI components of the page. Same thing with region 2 also. And then, I should be able to access the information across regions and also across other UI components etc.
I am seeing only session scoped bean will be able to help me here to get my tasks done across regions and across all other UI components of the page because I am not in a position to pass too many parameters across regions. Now the problem is, I can not serialize this bean because as I mentioned lot of UI components are updated based on logic.
If I do not serialize the bean, I may have problem in future when application has to be deployed to cluster envt.
I do not know how should I go with my design now. Please provide me brilliant ideas and very thankful to your guidance.
thanksHi ADF,
I dont want to disturb the discussion with you and Alej. I'm rising some question from your first post.
I have main page having bunch of UI components,
ok fine.
Region 1, Region 2. I will have to bind the UI components of the page to a managed bean having session scope
1.why need to do this binding for all ui components .?
2.this question lead ask another question are you using ADFBc.? if so binding layer will take care why you bind all those things.
3.why you need to put session scope.?
if you are using region. the region can only be bounded TF right, then communicate with help of pageflow. inside the bounded you may have jsff/jspx,
reason is, when control goes to region 1 or region 2, I will be doing lot of processing of business logic and then based on this, I will have to update the UI components of the page. Same thing with region 2 also.
from the reason i have question? why you need to communicate between two region instead of using Taskflow communication.
And then, I should be able to access the information across regions and also across other UI components etc.
ok fine.
I am seeing only session scoped bean will be able to help me here to get my tasks done across regions and across all other UI components of the page because I am not in a position to pass too many parameters across regions. Now the problem is, I can not serialize this bean because as I mentioned lot of UI components are updated based on logic.
from my point of view. your are using all powerful feature session bean, region communication to do your requirement.
mixing all those things so only you can't able to get consistent results.
I do not know how should I go with my design now.
could you please explain your usecase.
Please provide me brilliant ideas and very thankful to your guidance.
yeah sure. people will do.
thanks -
Entity beans containing relationships to itself, Inherited Relationships
The system i'm working on contains the following entities:
Order
OrderItem
BillingOrder (extends the Order Entity and adds Billing-specific functionality mapped
over 2 tables)
BillingOrderItem (extends the OrderItem Entity and adds Billing-Item-specific functionality,
mapped over 2 tables)
If I could ask two questions about this scenario:
1) The BillingOrder has a one-to-many relationship with BillingOrderItem. Currently
I have had to define the relationship at this level, what i'd really like to be able
to do is define this relationship at the Order-OrderItem level and have the Billing
entities (plus the other Order-subtypes) inherit this relationship.
2) The BillingOrderItem can form a hierarchy (ie can potentially have parent and
child BillingOrderItems). Is it possible for an entity to be in a relationship with
itself? In this case have a one-to-many relationship between the EntityKey PK of
the BillingOrderItem and the ParentEntityKey CMP field contained within itself.
(Hope that's explained clearly). Just as I type this, in respect to the first point
I made, it would be great to again have this relationship defined at the Order-OrderItem
level and be inherited by various subtypes.
Any help/sample code/pointers would be greatly appreciated.
Thanks in advance.jtahlborn wrote:
i'm pretty sure we encountered problems trying to have the entity classes in a different jar from the persistence.xml. i think you need to have that stuff all packaged up together in order to get it to work. one common project is probably the way to go.Good point. Persistence unit A is certainly not going to know about the entities mapped in persistence unit B, so the mappings can't work. And unfortunately JBoss does not have facilities to share resources (only classpath elements if you turn off classpath isolation).
You'd still be able to do a distributed design, but you'd need one common EJB that manages the model so you have all entities in one persistence unit. I'd say a DAO EJB layer would be justified in such a design scheme. So you'd have your services in your EJBs which will invoke DAO ejbs in your model-ejb to do the low level transactions. -
JAXB - when java beans contain lists of each other
I have two classes:
class A {
private List<B> bList;
class B {
private List<A> aList;
}It is like this due to the relationships they have in the database and our beans are mapped that way. When putting through JAXB , however, I would like the XML to only have A as the parent and then the list of B, not each B to list it's list of A, if that makes any sense.
So I want
<A>
<B>
<B>
</A>
not
<A>
<B>
<A>
</A>I have two classes:
class A {
private List<B> bList;
class B {
private List<A> aList;
}It is like this due to the relationships they have in the database and our beans are mapped that way. When putting through JAXB , however, I would like the XML to only have A as the parent and then the list of B, not each B to list it's list of A, if that makes any sense.
So I want
<A>
<B>
<B>
</A>
not
<A>
<B>
<A>
</A> -
Informing an ejb container of dirty beans
I'm working on a system which automatically generates entity beans and one use of this technology is to make legacy databases available as entity beans.
I'd like to provide entity beans as an incremental integration approach for databases which are still being used by legacy systems. To do this I need to be able to tell the bean container when an object has been updated by an external system. I realize this may play hell with transactions and such, but in some cases this will be acceptable and allow a nice incremental movement to j2ee.
Are there ways to tell a container about a "dirty" bean?Never mind - I don't really need the container's involvement (duh). The beans themselves can be made aware of external changes and reload when they need to.
-
Jsp load Javabean contains jpanel
how do i load login ( jpaneled gui ) bean in JSP. pls give me any example code
login bean contains jpanel, jlabel, jtextfield, jpasswordfield, jbuttonNot a assignment. i have login jpanel and i want to place in jsp page. Pls let me know how can i place javax components in jsp. help on this
-
Error while deploying entity javabean (CMP)
Hello,
I have a problem while I'm trying to deploy an entity javabean (with container managed persistance). I'm using JDeveloper 3.2.3 and 8.1.7.2 database.
Here is the error I get:
*** Executing deployment profile E:\Xaris\JDeveloper\General\EJBs\EmpCmp\EmpCmp.prf ***
*** Generating archive file E:\Xaris\JDeveloper\General\EJBs\EmpCmp\empcmp.jar ***
Compiling the project...done
Validating the profile...done
Initializing deployment...done
Scanning project files...done
Generating classpath dependencies...done
Generating archive entries table...done
*** Archive generation completed ***
*** Deploying the EJB to 8i JVM ***
EJB deployment argument list:
"E:\Program Files\Oracle\JDeveloper 3.2.3\java1.2\jre\bin\javaw"
"-DPATH=E:\Program Files\Oracle\JDeveloper 3.2.3\bin;E:\Program Files\Oracle\JDeveloper 3.2.3\java1.2\bin"
-classpath
"E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\aurora_client.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\javax-ssl-1_2.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\jasper.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\vbjorb.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\vbjapp.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\vbjtools.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\vbj30ssl.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\aurora.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\sqlj\lib\translator.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\sqlj\lib\runtime.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\mts.jar;E:\Xaris\JDeveloper\General\EJBs\EmpCmp\classes;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\jdev-rt.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\jdbc\lib\oracle8.1.7\classes12.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\connectionmanager.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\javax_ejb.zip;C:\Program Fil
s\JavaSoft\JRE\1.3.1\lib\i18n.jar;C:\Program Files\JavaSoft\JRE\1.3.1\lib\jaws.jar;C:\Program Files\JavaSoft\JRE\1.3.1\lib\rt.jar;C:\Program Files\JavaSoft\JRE\1.3.1\lib\sunrsasign.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\xmlparserv2.jar"
oracle.aurora.ejb.deployment.GenerateEjb
-u
harris
-p
harris
-s
sess_iiop://192.168.10.218:2481:WORK
-keep
-temp
TEMP
-descriptor
"E:\Xaris\JDeveloper\General\EJBs\EmpCmp\EmpCmp.xml"
-oracledescriptor
E:\Xaris\JDeveloper\General\EJBs\EmpCmp\EmpCmp_oracle.xml
-generated
"E:\Xaris\JDeveloper\General\EJBs\EmpCmp\EmpCmpClient.jar"
"E:\Xaris\JDeveloper\General\EJBs\EmpCmp\empcmp.jar"
Reading Deployment Descriptor...done
Verifying Deployment Descriptor...done
Gathering users...done
Processing container managed persistence bean...done
Generating Comm Stubs.............................................done
Compiling Stubs...done
Generating Jar File...done
Loading EJB Jar file and Comm Stubs Jar file...done
Generating EJBHome and EJBObject on the server...
An exception occurred during code generation: null
*** Errors occurred while deploying the EJB to 8i JVM ***
*** Deployment completed ***
Can anyone help me understand where is the error?
Thanks in advance,
CharalamposVolker,
Let me try again (in the hope that this time you will understand
what I am saying).
"database embedded EJB container" and "EJB" are not the same thing.We are a little bit further in technology, so that we have no single Engine, single
Processor Systems any more.
Distribution over many computers (RAC) is done by Visigenic ORB (9i) or OC4J.
EJB Framework is for distribution of Business Logic or in your words of
Database Logic.
Oracle is abandoning the "database embedded EJB container".
Oracle is not abandoning EJB.Please step into technology and make a comparison of Java Stored
Procedures, look at the native compiler ncomp and try to figure out which
classes are important for Server Side software development.
Oracle recommends using OC4J as the EJB container.
Here is a recent post (from an Oracle employee and regular forum
participant) from the J2EE forum:
High number of http 404 errors from webcache
Here is a quote from that post:
starting from Oracle9i Release 2 Database EJBs are going to be desupported from database. EJBs can only be deployed in OC4J component of Oracle9iASAs far as I can see, it makes no sense to do that step.
I beleave, that this decision is very very short lived.
Unfortunately, my German is very poor -- I can only try to explainYou are right, I am a German.
things to you in English. Hopefully (if you are still not comprehending
what I am saying), some kind soul (who must have a better levelAmerican english is for everyone.
of reading and comprehension in English than you) will explain it
to you in your native tongue.I have understood, what you said!
So let me summarize:
Oracle is abandoning the database embedded EJB container.I don't beleave that! Is that OK!
By the way, something may have gotten lost in the translation, or
this may be just another example of your comprehension problem, but
what is the connection between the TowerJ JVM and the Oracle databasencomp has the same architecture as TowerJ native Compiler.
Ok?
embedded EJB container?
The very best of luck to you,Thanks a lot!
Avi +Volker! -
How to pass a JavaBean from servlet to JSP?
Hi there,
I am working on a project that needs to handle quite a few client requests and I want to use the Front Controller pattern that is described in the J2EE pattern page.
The steps described in the front controller pattern is that:
1. A servlet (controller) process the client request.
2. It calls the appropriate cammand object and the cammand object gets the data from the data source and returns a JavaBean that contains the required data.
3. The servlet dispatch to the appropriate View (jsp page)
4. The JSP page displays the data in the JavaBean to the user.
However, I don't know how to pass the JavaBean from the servlet to the JSP page when the servlet forwards the control to the JSP page. Should I make the JavaBean with a request scope or higher? If so, how to uses it in the JSP page? Just refer by the ID of the JavaBean.
If any one knows there is an example or tutorial on how to use this pattern, please let me know.
Thank you !
Regards
EdmundCould you please give more info? i tried to do this, but always get a "Class not found exception":
response$jsp.java:65: Class org.apache.jsp.TestBean not found. TestBean bean = null;
although the class TestBean (no package name => defalt package) is in the WAR file and the Servlet seems to instantiate it (otherwise an exception would occur sooner in the TestServlet code).
my JSP code is:
<%@ page language="java" info="Response page" %>
<jsp:useBean id="bean" class="TestBean" />
<%
TestBean bean2 = (TestBean) request.getAttribute("TheBean");
%>
<html>
<body>
Your value: <%= bean2.getValue() %><BR>
My val: <%= bean2.getNewValue() %><BR>
<P>
Date: <%= new Date() %>
<P>
Neuen Wert eingeben
</body>
</html>
-------------- -
Message-driven bean CMT can not be supported
Hi,
I�m trying to use IBM MQSeries 5.3 with S1AS7. The AS and MQ run under W2K SP3. At first I had no problem with deploying and running samples. I used C:\Sun\AppServer7\samples\ejb\mdb\simple\
I was able to put a test message into MQSeries queue and I saw it was processed by the MDB
Then I decided to change <transaction-type> from �Bean� to �Container� and I added <assembly-descriptor> where I set <trans-attribute> as �Required�.
Here is my new ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<!-- Copyright 2002 Sun Microsystems, Inc. All rights reserved. -->
<ejb-jar>
<display-name>SimpleMessageJAR</display-name>
<enterprise-beans>
<message-driven>
<display-name>SimpleMessageEJB</display-name>
<ejb-name>SimpleMessageEJB</ejb-name>
<ejb-class>samples.ejb.mdb.simple.ejb.SimpleMessageBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>SimpleMessageEJB</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
In this case I have the following server.log
[15/Dec/2002:15:29:00] FINE ( 1700): Requesting Server Session at: 1039955340843
[15/Dec/2002:15:29:00] FINE ( 1700): Got Server Session at: 1039955340859(1039955340843)
[15/Dec/2002:15:29:00] INFO ( 1700): CORE3282: stdout: In SimpleMessageBean.SimpleMessageBean()
[15/Dec/2002:15:29:00] FINEST ( 1700): Thread[MQQueueAgent (MYASQUEUE),5,RMI Runtime]: got session: com.sun.enterprise.jms.SessionWrapperBase@3c9616 from com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
[15/Dec/2002:15:29:00] INFO ( 1700): CORE3282: stdout: In SimpleMessageBean.setMessageDrivenContext()
[15/Dec/2002:15:29:00] INFO ( 1700): CORE3282: stdout: In SimpleMessageBean.ejbCreate()
[15/Dec/2002:15:29:00] FINEST ( 1700): start(): calling notify... com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
[15/Dec/2002:15:29:00] FINEST ( 1700): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
[15/Dec/2002:15:29:00] FINEST ( 1700): Thread[Thread-28,5,RMI Runtime]: run(): calling Session.run() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
[15/Dec/2002:15:29:00] FINEST ( 1700): Thread[Thread-28,5,RMI Runtime]: message-driven bean container onMessage :
JMS Message class: jms_text
JMSType: null
JMSDeliveryMode: 1
JMSExpiration: 0
JMSPriority: 0
JMSMessageID: ID:414d5120514d5f636c6f7564202020200628fc3d2000020f
JMSTimestamp: 1039955340820
JMSCorrelationID:null
JMSDestination: null
JMSReplyTo: null
JMSRedelivered: false
JMS_IBM_PutDate:20021215
JMSXAppID:C:\WINNT\system32\mmc.exe
JMS_IBM_Format:MQSTR
JMS_IBM_PutApplType:11
JMS_IBM_MsgType:8
JMSXUserID:alex
JMS_IBM_PutTime:12290082
JMSXDeliveryCount:1
111111111111111111
[15/Dec/2002:15:29:00] FINEST ( 1700): beforeMessageDelivery() not called
[15/Dec/2002:15:29:00] INFO ( 1700): MDB00040: [mdb-simple:SimpleMessageEJB]: Message-driven bean CMT can not be supported.
[15/Dec/2002:15:29:00] SEVERE ( 1700): MDB0008: Session.run() throws Exception [Message-driven bean CMT can not be supported.]
[15/Dec/2002:15:29:00] SEVERE ( 1700): MDB0009: Session.run() throws Exception
java.lang.RuntimeException: Message-driven bean CMT can not be supported.
at com.sun.enterprise.jms.SessionWrapperBase.run(SessionWrapperBase.java:200)
at com.iplanet.ias.ejb.containers.IASServerSessionImpl.run(IASServerSessionImpl.java:191)
at java.lang.Thread.run(Thread.java:536)
[15/Dec/2002:15:29:00] FINEST ( 1700): Thread[Thread-28,5,RMI Runtime]: in run(): return object com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0 to pool ...
[15/Dec/2002:15:29:00] FINEST ( 1700): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@3508c0
If I use internal AS JMS I don�t have any trouble. Everything works fine.
Why it is possible to use MDB CMT with internal AS JMS provider?
What should I do to create MDB CMT with IBM MQSeries?
Alexei GladkovHi Alexei,
Sun ONE Application Server 7 does not support CMT MDBs with 3rd party JMS providers. (As you note, BMT MDBs work with MQSeries and Sun ONE App Server).
With the advent of the next J2EE CA spec version (1.5) and J2EE 1.4, a standard means of hooking JMS providers into app servers and MDBs will be made available. Shortly after J2EE 1.4 is released, you'll see this support in Sun ONE App Server.
From the J2EE 1.4 spec: "The Connector API now supports integration with asynchronous messaging systems, including the ability to plug in JMS providers."
Thanks,
Chris -
Hello,
I'm trying to do my first web app. First I must log a user from a server database. I thought using JSP to display html pages and javabean to contain logic and functions. In my first page there are a login form with a submit button. How can I call a javabean after pressing button and then read a validate property value from it to login again or pass to next form? To call logic procedures must call setproperty method and do anything inside?
Thanks,
Julian.You do realize that Java runs on the server don't you? So it you want use java to validate, you would have to do this:
1) submit username + password to a JSP or servlet
2) inside that JSP or servlet, read the values from the request and validate them using your bean
3a) if correct, go on
3b) if not correct, display error message and show login form again
How to call the javabean depends on what you are using. If you are using scriptlets, simply call the method as if it were a regular java class. If you are using JSTL, you should read up on that right now because learning that by just coding away is far to difficult. Check out the book you can download for free on this website.
http://www.coreservlets.com
Maybe you are looking for
-
Hi All, I have created a wbs element. Assigned it in the Asset master. Now, when I create an asset PO for the said asset, it is not populating the WBS element automatically. Which other settings needs to be done other than giving the WBS element in t
-
How do I get my task bar to stop disappearing?
Can someone tell me how to get my taskbar from disappearing? I've done something to make it disappear when my mouse moves away from it, and I don't know how to fix it. Can someone provide me with the steps to get it back?
-
Converting the standard pay slip to pdf
Hi Experts, 1. Develop a Z program using PNP logical DB and use node PERNR. 2. Use FM 'GET_PAYSLIP' in your program in order to get the data that you see in the output of tcode "PC00_M40_CEDT". Then you would like to use FM "CONVERT_PAYSLIP_TO_PDF" t
-
IMovie does not recognize MPEG 4
I have downloaded a 131 MB MPEG 4 movie and am trying to import it into iMovie on my iMac. I have done this successfuly lots of times before. I have the latest version of iMovie. For some reason iMovie says it does not recognize this MPEG 4 movie! I
-
I can't instal flash player 13 on my win xp, ie8 comp.
Tried all the help I could read stil can't HEELLLLPPPP ME PLEASE!!!